-
Notifications
You must be signed in to change notification settings - Fork 70
fix: connect gui-submit --parameter validation to live queue signal #1288
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
Open
crowecawcaw
wants to merge
7
commits into
aws-deadline:mainline
Choose a base branch
from
crowecawcaw:review-fix/gui-submit-signal
base: mainline
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
99dfd42
fix: connect gui-submit --parameter validation to live queue signal
crowecawcaw fc80043
Merge branch 'mainline' into review-fix/gui-submit-signal
crowecawcaw 29590fa
fix: make gui-submit --parameter validation single-shot and dialog-sc…
crowecawcaw f84a53a
fix: gate gui-submit --parameter validation on load completion, not p…
crowecawcaw 5fda4e1
fix: validate gui-submit --parameter only on successful queue param l…
crowecawcaw e979dcf
fix: guard double-disconnect of gui-submit validation callback
crowecawcaw 7a00b93
fix: tear down gui-submit validation on dialog close, not only deletion
crowecawcaw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The cleanup relies on submitter_dialog.destroyed to tear down the connection to the singleton controller, but destroyed only fires when the QObject is actually deleted, not when the dialog is merely closed/hidden. SubmitJobToDeadlineDialog does not set WA_DeleteOnClose (nor call deleteLater), so a user who closes the dialog before the first successful queue-parameter load leaves this connection live on the long-lived singleton.
If any other consumer then triggers a successful queue-parameters fetch, validate_parameters_after_queue_load fires against the closed-but-alive dialog: it pops a QMessageBox parented to a dead window and may call submitter_dialog.close() on it. The comment claims the disconnect protects against firing against a closed dialog, but that only holds for the single-shot self-disconnect after a load, not for a plain close before any load.
Note that test_dialog_destroyed_disconnects_validator emits destroyed explicitly, so it does not exercise the ordinary close path where destroyed never fires. Consider tying the teardown to the dialog close event (or setting WA_DeleteOnClose) rather than destroyed.
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.
Confirmed:
SubmitJobToDeadlineDialogdoes not setWA_DeleteOnClose, and the gui-submit CLI path holds a reference throughapp.exec(), so an ordinary close never emitsdestroyedand the connection would have stayed live on the singleton.The teardown is now also connected to
QDialog.finished, which fires on accept/reject/close of a shown dialog, so close-before-any-load disconnects the callback immediately.destroyedremains connected to cover deletion withoutdone(), and a shared connected-state guard makes all three teardown paths (single-shot self-disconnect,finished,destroyed) idempotent.The test stand-in dialog is now a real
QDialog(noWA_DeleteOnClose, matching production), andtest_dialog_closed_before_load_disconnects_validatorshows and closes it through the normal close path — nodestroyedemission — then asserts a subsequentqueue_parameters_load_succeededemission does not invoke the validator or touch the closed dialog. This test fails without thefinishedhook.