denis: introduce dummy assignments whose deadlines are manually triggered#298
Merged
denis: introduce dummy assignments whose deadlines are manually triggered#298
Conversation
theyoyojo
reviewed
Sep 25, 2025
Contributor
|
I'm going to rebase the new test PR onto this and make the changes |
Contributor
|
assuming it all works I'll approve, seems to work so far |
theyoyojo
requested changes
Sep 25, 2025
Contributor
theyoyojo
left a comment
There was a problem hiding this comment.
no such assignment asdf
no such component 1
Traceback (most recent call last):
File "/usr/local/share/denis/./configure.py", line 169, in <module>
exit(main())
^^^^^^
File "/usr/local/share/denis/./configure.py", line 77, in main
subparser_func(**kwargs)
File "/usr/local/share/denis/./configure.py", line 164, in trigger
if err := sigqueue(1, signal.SIGRTMIN, asn.id * 3 + component_id):
^^^^^^
AttributeError: 'NoneType' object has no attribute 'id'
joel@fedora:~/src/singularity$ ./denis/configure.sh trigger -a se -c 1
no such component 1
Traceback (most recent call last):
File "/usr/local/share/denis/./configure.py", line 169, in <module>
exit(main())
^^^^^^
File "/usr/local/share/denis/./configure.py", line 77, in main
subparser_func(**kwargs)
File "/usr/local/share/denis/./configure.py", line 164, in trigger
if err := sigqueue(1, signal.SIGRTMIN, asn.id * 3 + component_id):
^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'component_id' where it is not associated with a value
when you run ./denis/configure.sh trigger -a $X -c $Y where $X doesn't refer to an extant assignment or $Y doesnt refer to on of the three valid options you get this error
…ered dummy assignments can be created using the new `dummy` option to configure initially all deadlines are set in the far future so that testing code can make submissions request oopsies etc without racing against the clock when the relevant scenario has been staged, the `trigger` option can be passed to configure specifying an assignment and component name and the due date will be set to the current moment and the corresponding event will be run synchronously.
dcf7a10 to
bf08067
Compare
Right now configure.py always exits with code 0 because even though errors are detected, we just print a message. Introduce an `errx` helper that prints to stderr and exits the program and use throughout replacing the existing calls to `print` in error cases.
Contributor
|
I'll take a look later |
Contributor
|
bet lgtm: |
theyoyojo
approved these changes
Sep 27, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
dummy assignments can be created using the new
dummyoption to configure initially all deadlines are set in the far future so that testing code can make submissions request oopsies etc without racing against the clockwhen the relevant scenario has been staged, the
triggeroption can be passed to configure specifying an assignment and component name and the due date will be set to the current moment and the corresponding event will be run synchronously.