-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid double messaging on subset creation #2515
base: main
Are you sure you want to change the base?
Conversation
f96f365
to
7608a6c
Compare
@dhomeier - would you like to review this? I've had confirmation from the jdaviz side that it works for them. |
Actually, maybe hold off on merging - I think we might need a small PR in Jdaviz, I'm seeing spectral extraction fail to extract when a spatial subset is created. Hopefully a quick fix on our end. |
But nothing needed on this side, is that right? |
I'm pretty sure that's correct, still investigating the fix on our end. |
@astrofrog It seems like at the point we get the
with the error
It seems like this is a timing conflict, would it be possible to send the |
The setter is already calling |
Great, I'll try to test it today before I'm off for vacation. |
I've tested this with the Cubeviz example, which seems to work – uncertainty subsets are updated on main; automated spectral extraction still needs spacetelescope/jdaviz#3238 (
Not sure; functionality within datasets seemed a bit undertested in general, but since your test caught the actual issue, that's obviously the more important one. |
… followed by an update message, instead just broadcast a create subset message with the correct subset state
…een created before message is emitted
7f6d7ab
to
8fcce5a
Compare
It looks like this works now, extracted spectra are getting created automatically as expected with spacetelescope/jdaviz#3238. |
@dhomeier sounds good, could you push your test as a commit to this PR? |
Ah, in the commit view it looked like |
Co-authored-by: Derek Homeier <[email protected]>
Hmm assert len(data1.subsets) == len(data2.subsets)
> assert data2.subsets[0].subset_state is data1.subsets[0].subset_state
E IndexError: tuple index out of range any idea why this is passing in a local run, but failing in all CI envs?? |
@dhomeier - I think that error makes sense once the subset is removed as there should no longer be any subsets. Maybe you should have an |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Obviously; that's what you get from not properly syncing your local branch ;-)
I think they are still planning to make some tests in spacetelescope/jdaviz#3238, but this looks good to go now.
Avoid broadcasting a create subset message with an empty subset state followed by an update message, instead just broadcast a create subset message with the correct subset state