spawner.py: upload a basic results summary page #24
Conversation
Setting the commit status URL to the branch itself when there are testsuites marked required is not very intuitive. Additionally, the commit can disappear from the branch, giving users no way to discover the statuses. We now instead link to a very simple summary page containing the links to all the other test results. When redhat-ci is used in combination with homu, this will be accessible directly from the PR through the comment homu posts. Closes: #23
@ashcrow Can you give a quick sanity check on the Jinja2 stuff? |
spawner.py
Outdated
s3_key = '%s/%s/%s.%s/%s' % (os.environ['s3_prefix'], | ||
os.environ['github_repo'], | ||
os.environ['github_commit'], | ||
random.randint(0, 2**15-1), |
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.
Hm, why a random number here instead of e.g. a timestamp or global counter?
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 random number (also done in the testrunner) is a cheap way to avoid overwriting results if the same commit gets tested again (it's useful to keep the old results not only for historical reasons, but also e.g. if you have independent runs of redhat-ci against the same commit). Though maybe it's time to do this the proper way (i.e. check if it already exists rather than hope for the best).
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.
Yeah, I understand why it's there, I mean why allow the possibility of overwriting? A timestamp would be more reliably unique.
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.
That said it doesn't seem like a big deal, I'm fine with it as is.
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.
Meh, a bit overkill but I updated it to use date +%s%N
.
I don't think you need the i18n extension since nothing is being translated in the template but, from a quick eye parse, the jinja2 stuff looks fine. |
👍 |
Setting the commit status URL to the branch itself when there are
testsuites marked required is not very intuitive. Additionally, the
commit can disappear from the branch, giving users no way to discover
the statuses.
We now instead link to a very simple summary page containing the links
to all the other test results. When redhat-ci is used in combination
with homu, this will be accessible directly from the PR through the
comment homu posts.
Closes: #23