-
Notifications
You must be signed in to change notification settings - Fork 12
denis: introduce dummy assignments whose deadlines are manually triggered #298
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
Conversation
|
I'm going to rebase the new test PR onto this and make the changes |
|
assuming it all works I'll approve, seems to work so far |
theyoyojo
left a comment
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.
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.
|
I'll take a look later |
|
bet lgtm: |
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.