-
Notifications
You must be signed in to change notification settings - Fork 301
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
Add a check for Jenkins results. #13533
Conversation
Bug-tracker data: |
Test stage Python Bandit check completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13533/1/execution/node/123/log |
3559db1
to
0ea196f
Compare
Test stage Python Bandit check completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13533/2/execution/node/125/log |
0ea196f
to
4b2565c
Compare
Test stage Python Bandit check completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13533/3/execution/node/125/log |
decef3f
to
bd04920
Compare
Test stage Python Bandit check completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13533/5/execution/node/124/log |
bd04920
to
f6e5f57
Compare
Test stage Python Bandit check completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13533/6/execution/node/125/log |
585d4bf
to
c5c6b02
Compare
Required-githooks: true Signed-off-by: Ashley Pittman <ashley.m.pittman@intel.com>
c5c6b02
to
0ab2971
Compare
Required-githooks: true Signed-off-by: Ashley Pittman <ashley.m.pittman@intel.com>
Required-githooks: true
Skip-build: true Required-githooks: true Signed-off-by: Ashley Pittman <ashley.m.pittman@intel.com>
@@ -0,0 +1,212 @@ | |||
#!/usr/bin/env python |
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.
This is probably okay, but some distros point python -> python2
so personally I tend to use python3
here
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.
I hope we're beyond that now!
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.
Hopefully, but some older (still supported) distros still use python2 by default last I checked. Also, some distros don't symlink python
at all. E.g.
$ cat /etc/os-release
NAME="SLES"
VERSION="15-SP4"
VERSION_ID="15.4"
PRETTY_NAME="SUSE Linux Enterprise Server 15 SP4"
ID="sles"
ID_LIKE="suse"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:suse:sles:15:sp4"
DOCUMENTATION_URL="https://documentation.suse.com/"
$ which python
which: no python in ...
$ which python3
/usr/bin/python3
name = data["name"] | ||
if "-" in name: | ||
try: | ||
(num, full) = name.split("-", 1) | ||
test_num = int(num) | ||
if full[-5] == "-": | ||
full = full[:-5] | ||
name = f"{full} ({test_num})" |
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.
What does the original data["name"]
look like?
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.
this is the weird 8 digits of sha hash at the end of the PR name which is making matching fail.
self.skipped = False | ||
self.passed = False | ||
self.failed = False | ||
assert data["status"] in ("PASSED", "FIXED", "SKIPPED", "FAILED", "REGRESSION") |
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.
Maybe better to gracefully handle?
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.
For an internal script I'm OK with this, if there is another status then we want to know about it so we handle it properly. As we're scraping Jenkins then we can stress-test this code against previous builds.
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 problem with assert
is that the entire script will fail without much debug info.
|
||
failed = [] | ||
|
||
assert not jdata["testActions"] |
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.
Graceful?
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.
I could just remove this, it was me trying to understand the output.
for test in failed: | ||
all_failed.add(test) |
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.
JFYI you can add a list to another list like this:
>>> list1 = [1,2,3]
>>> list2 = [4,5,6]
>>> list1.extend(list2)
>>> list1
[1, 2, 3, 4, 5, 6]
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.
all_failed is a set, not list.
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.
Ah, then JFYI
>>> set1 = set([1,2,3])
>>> list2 = [4,5,6]
>>> set1.update(list2)
>>> set1
{1, 2, 3, 4, 5, 6}
Skip-build: true Required-githooks: true Signed-off-by: Ashley Pittman <ashley.m.pittman@intel.com>
Skip-build: true Required-githooks: true Signed-off-by: Ashley Pittman <ashley.m.pittman@intel.com>
Required-githooks: true
Required-githooks: true Signed-off-by: Ashley Pittman <ashley.m.pittman@intel.com>
Test stage Functional Hardware Large completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13533/16/execution/node/1479/log |
Test stage Functional Hardware Medium completed with status UNSTABLE. https://build.hpdd.intel.com/job/daos-stack/job/daos//view/change-requests/job/PR-13533/16/testReport/ |
Test stage Functional Hardware Medium Verbs Provider completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13533/16/execution/node/1417/log |
Skip-build: true
Required-githooks: true
Signed-off-by: Ashley Pittman ashley.m.pittman@intel.com