Skip to content
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

Closed
wants to merge 9 commits into from
Closed

Conversation

ashleypittman
Copy link
Contributor

Skip-build: true

Required-githooks: true

Signed-off-by: Ashley Pittman ashley.m.pittman@intel.com

Copy link

Bug-tracker data:
Errors are component not formatted correctly,Ticket number prefix incorrect,PR title is malformatted. See https://daosio.atlassian.net/wiki/spaces/DC/pages/11133911069/Commit+Comments,Unable to load ticket data
https://daosio.atlassian.net/browse/Add

@daosbuild1
Copy link
Collaborator

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

@daosbuild1
Copy link
Collaborator

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

@daosbuild1
Copy link
Collaborator

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

@ashleypittman ashleypittman force-pushed the amd/daily-query branch 2 times, most recently from decef3f to bd04920 Compare December 21, 2023 21:53
@daosbuild1
Copy link
Collaborator

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

@daosbuild1
Copy link
Collaborator

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

@ashleypittman ashleypittman force-pushed the amd/daily-query branch 2 times, most recently from 585d4bf to c5c6b02 Compare December 21, 2023 22:04
Required-githooks: true

Signed-off-by: Ashley Pittman <ashley.m.pittman@intel.com>
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>
@@ -0,0 +1,212 @@
#!/usr/bin/env python
Copy link
Contributor

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

Copy link
Contributor Author

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!

Copy link
Contributor

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

Comment on lines +18 to +25
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})"
Copy link
Contributor

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?

Copy link
Contributor Author

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")
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Graceful?

Copy link
Contributor Author

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.

Comment on lines +187 to +188
for test in failed:
all_failed.add(test)
Copy link
Contributor

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]

Copy link
Contributor Author

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.

Copy link
Contributor

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>
jolivier23
jolivier23 previously approved these changes Jan 9, 2024
Skip-build: true
Required-githooks: true
Signed-off-by: Ashley Pittman <ashley.m.pittman@intel.com>
Required-githooks: true
Signed-off-by: Ashley Pittman <ashley.m.pittman@intel.com>
@daosbuild1
Copy link
Collaborator

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

@daosbuild1
Copy link
Collaborator

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/

@daosbuild1
Copy link
Collaborator

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

@ashleypittman ashleypittman deleted the amd/daily-query branch February 26, 2024 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants