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

DAOS-14850 control: Allow logging.Logger in Context #13569

Merged
merged 4 commits into from
Jan 23, 2024
Merged

Conversation

mjmac
Copy link
Contributor

@mjmac mjmac commented Jan 4, 2024

Updates control plane tools to set a context in a logger
for ease of debug/trace logging.

Change-Id: I94ea454ca83afa3ba035bdcc8ec419b0ad7897e7
Required-githooks: true
Signed-off-by: Michael MacDonald mjmac@google.com

Updates control plane tools to set a context in a logger
for ease of debug/trace logging.

Change-Id: I94ea454ca83afa3ba035bdcc8ec419b0ad7897e7
Required-githooks: true
Signed-off-by: Michael MacDonald <mjmac@google.com>
@mjmac mjmac requested a review from a team as a code owner January 4, 2024 20:27
@mjmac mjmac requested review from tanabarr and kjacque and removed request for a team January 4, 2024 20:27
Copy link

github-actions bot commented Jan 4, 2024

Bug-tracker data:
Ticket title is 'Allow logging.Logger to be conveyed via context.Context'
Status is 'In Review'
https://daosio.atlassian.net/browse/DAOS-14850

@mjmac mjmac requested a review from knard-intel January 9, 2024 14:57
@brianjmurrell
Copy link
Contributor

@mjmac Just an FYI/reminder that you can use the Run-GHA: true commit pragma to run your functional testing on GitHub Actions and see the results of the testing in this PRs Checks tab.

@mjmac mjmac requested a review from chowes January 9, 2024 18:13
@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-13569/4/execution/node/484/log

@daosbuild1
Copy link
Collaborator

Test stage Functional Hardware Medium completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13569/4/execution/node/392/log

@mjmac
Copy link
Contributor Author

mjmac commented Jan 9, 2024

@mjmac Just an FYI/reminder that you can use the Run-GHA: true commit pragma to run your functional testing on GitHub Actions and see the results of the testing in this PRs Checks tab.

This is an either/or choice though, right? In other words, if I run the tests in GHA, then the Jenkins tests won't run, which means that I have to run it again in order to land. In cases like this, where the change is focused and test analysis is unlikely to be needed, there's no particular benefit to the extra step, IMO.

@mjmac
Copy link
Contributor Author

mjmac commented Jan 9, 2024

@mjmac Just an FYI/reminder that you can use the Run-GHA: true commit pragma to run your functional testing on GitHub Actions and see the results of the testing in this PRs Checks tab.

fyi, I tried this on a draft PR that I'm not trying to land with any urgency... Seems like it's totally busted? https://github.com/daos-stack/daos/actions/runs/7466679565/job/20318574941

Change-Id: Ib1685ba48ec4abf382b7dd5e4e41ff36605c94c3
Required-githooks: true
@brianjmurrell
Copy link
Contributor

This is an either/or choice though, right?

Correct.

In other words, if I run the tests in GHA, then the Jenkins tests won't run, which means that I have to run it again in order to land.

You should not have to re-run to land. The GHA testing should be accepted as equal to Jenkins testing. We have some work to do to get the _Required) checks to align (either by making Jenkins use the GHA check names or having GHA manually set the existing Jenkins labels -- which way is yet to be determined) between the two, so a force-landing would be required but I think should be acceptable.

In cases like this, where the change is focused and test analysis is unlikely to be needed, there's no particular benefit to the extra step, IMO.

Agreed, if there were an extra step. But I don't think there should be. If you set the force-landing label and fill out the checklist explaining explaining why the force-landing is necessary the gatekeeper should be able to see the alternative GHA testing checks and be comfortable landing.

Indeed, this is all new process so there are things to be worked out, but we won't know what unless we start using it.

But ultimately it's up to you as the submitter. I just thought/think it might be helpful if you can actually see your test results and not (presumably -- I'm not sure how you get failed test results from Jenkins) need a relay from inside of Intel to tell you why a test failed.

@brianjmurrell
Copy link
Contributor

fyi, I tried this on a draft PR that I'm not trying to land with any urgency... Seems like it's totally busted? daos-stack/daos/actions/runs/7466679565/job/20318574941

This is known. This is just an "alternate" (to the one that works -- but only if your run completes within 24h of your submitting it) JUnit report that could not be tested before landing due to a catch-22 in some kinds of GHA workflow structures.

The actual workflow for that run can be found at https://github.com/daos-stack/daos/actions/runs/7466584253 which you can get to by clicking the Checks tab on the PR:

image

and then choosing the RPM Build and Test workflow:

image

You can see there that your Leap 15 RPM build failed. If you click the failed step:

image

and then open the Build RPM failure log step:

image

But the log is missing so something more rudimentary failed. Look at the Build RPM step and you can see there is a repo missing in artifactory. That's because the GH workflow is still at 15.4. This workflow should have been updated to 15.5 when the Jenkins workflow was updated to 15.5. This stuff is still pretty new so it got forgotten about in that effort unfortunately. Apologies for that.

If you change

LEAP15_VERSION: 15.4
to 15.5 (and may as well change to 8.8 although for your purposes that is probably not particularly important but would be consistent with Jenkins) that should fix that Leap 15 build failure.

@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-13569/5/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-13569/5/execution/node/1388/log

Copy link
Contributor

@knard-intel knard-intel left a comment

Choose a reason for hiding this comment

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

LGTM

Change-Id: Ia99e4e240719007c35fd8d8cdda3051521f0d28a
@brianjmurrell
Copy link
Contributor

That's because the GH workflow is still at 15.4. This workflow should have been updated to 15.5 when the Jenkins workflow was updated to 15.5. This stuff is still pretty new so it got forgotten about in that effort unfortunately.

Fixed in #13608 -- just waiting to land.

@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-13569/6/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-13569/6/testReport/

Change-Id: I6579a0dbd24ba07226d6a61eaed6421d351bca58
Copy link
Contributor

@kjacque kjacque left a comment

Choose a reason for hiding this comment

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

A nice addition. Will the actual usage of the logger from the context be added with some future change?

@mjmac mjmac merged commit 3469328 into master Jan 23, 2024
48 checks passed
@mjmac mjmac deleted the mjmac/DAOS-14850 branch January 23, 2024 17:48
mjmac added a commit that referenced this pull request Apr 20, 2024
Updates control plane tools to set a context in a logger
for ease of debug/trace logging.

Signed-off-by: Michael MacDonald <mjmac@google.com>
mjmac added a commit that referenced this pull request Apr 23, 2024
Updates control plane tools to set a context in a logger
for ease of debug/trace logging.

Required-githooks: true

Change-Id: I1adf4bf02cb1955128b5a279a520215530db96a1
Signed-off-by: Michael MacDonald <mjmac@google.com>
mjmac added a commit that referenced this pull request Apr 24, 2024
Updates control plane tools to set a context in a logger
for ease of debug/trace logging.

Signed-off-by: Michael MacDonald <mjmac@google.com>
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.

6 participants