Do not tag traces with shared libraries Git metadata#483
Merged
nikita-tkachenko-datadog merged 2 commits intoJan 7, 2025
Merged
Conversation
nikita-tkachenko-datadog
marked this pull request as ready for review
January 2, 2025 15:36
Comment on lines
+169
to
+176
| FilePath parent = workspace.getParent(); | ||
| if (parent == null) { | ||
| return false; | ||
| } | ||
| String name = parent.getName(); | ||
| if (!name.endsWith("@libs")) { | ||
| return false; | ||
| } |
Collaborator
There was a problem hiding this comment.
Can this happen in the workspace instance (not in the parent) ?
Collaborator
Author
There was a problem hiding this comment.
The parent is the common folder where all shared libraries for a pipeline are stored, while the workspace is a folder which contains a specific shared library (for example /var/jenkins_home/workspace/test-pipeline-shared-library@libs/fbf88f8b22e51df9124d2af6a9cc72fd2567aecb8b4f0d8b40967d2a6ebbe198).
The names look like some kind of hashes, I don't think we can get any useful clues from checking them
drodriguezhdez
approved these changes
Jan 7, 2025
nikita-tkachenko-datadog
deleted the
nikita-tkachenko/ignore-shared-libs-git-info
branch
January 7, 2025 10:58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requirements for Contributing to this repository
What does this PR do?
Updates Git checkout listener to ignore shared libraries checkouts.
When a pipeline uses a shared library, the library typically resides in a separate repo and is being checked out when the pipeline is run.
These library checkouts trigger the plugin's Git checkout listener just as any other Git repo checkout.
However we do not want to tag traces with shared libraries' Git metadata.
Description of the Change
Alternate Designs
Possible Drawbacks
Verification Process
Additional Notes
Release Notes
Review checklist (to be filled by reviewers)
changelog/label attached. If applicable it should have thebackward-incompatiblelabel attached.do-not-merge/label attached.kind/andseverity/labels attached at least.