-
Notifications
You must be signed in to change notification settings - Fork 52
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
Support linking downstream pipelines to upstream pipelines in CI Visibility #405
Merged
nikita-tkachenko-datadog
merged 5 commits into
master
from
nikita-tkachenko/downstream-pipelines-support
Mar 26, 2024
Merged
Support linking downstream pipelines to upstream pipelines in CI Visibility #405
nikita-tkachenko-datadog
merged 5 commits into
master
from
nikita-tkachenko/downstream-pipelines-support
Mar 26, 2024
Conversation
This file contains 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
nikita-tkachenko-datadog
added
the
changelog/Added
Added features results into a minor version bump
label
Mar 22, 2024
…to provisioned jobs
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've dropped some comments.
src/main/java/org/datadog/jenkins/plugins/datadog/model/BuildData.java
Outdated
Show resolved
Hide resolved
src/main/java/org/datadog/jenkins/plugins/datadog/model/BuildData.java
Outdated
Show resolved
Hide resolved
src/main/java/org/datadog/jenkins/plugins/datadog/model/BuildData.java
Outdated
Show resolved
Hide resolved
src/main/java/org/datadog/jenkins/plugins/datadog/traces/BuildSpanManager.java
Outdated
Show resolved
Hide resolved
src/main/java/org/datadog/jenkins/plugins/datadog/traces/BuildSpanManager.java
Show resolved
Hide resolved
src/main/java/org/datadog/jenkins/plugins/datadog/traces/BuildSpanManager.java
Outdated
Show resolved
Hide resolved
src/main/java/org/datadog/jenkins/plugins/datadog/listeners/DatadogBuildListener.java
Show resolved
Hide resolved
src/main/java/org/datadog/jenkins/plugins/datadog/traces/BuildSpanAction.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Daniel Rodriguez Hernandez <[email protected]>
drodriguezhdez
approved these changes
Mar 26, 2024
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.
LGTM
nikita-tkachenko-datadog
deleted the
nikita-tkachenko/downstream-pipelines-support
branch
March 26, 2024 14:03
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
changelog/Added
Added features results into a minor version bump
documentation
Documentation related changes
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?
Implements linking downstream pipelines to upstream pipelines in CI Visibility.
In order to link the two pipelines, the downstream pipeline's webhook payload should contain an additional section that has the URL and trace ID of its upstream pipeline.
The needed data are obtained from the
CauseAction
of the downstream's pipeline and from theBuildSpanManager
in-memory cache.The
BuildSpanManager
is changed from only storing info about the running jobs to also storing info about the latest N (1024 by default) finished jobs.Storing info about the finished jobs is required because the downstream pipeline event handler needs to obtain the trace ID of the upstream pipeline (by the time this happens the upstream pipeline has already finished its execution).
The size of the cache should be in the hundreds of kilobytes.
It should be very unlikely that the upstream pipeline trace context is already removed by the time the downstream pipeline is executed, but if it happens the only logic that stops working is the one that links upstream to downstream.
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-incompatible
label attached.do-not-merge/
label attached.kind/
andseverity/
labels attached at least.