Skip to content

Fix node name propagation on Jenkins pipelines traces#205

Merged
drodriguezhdez merged 13 commits into
masterfrom
drodriguezhdez/fix_node_name_propagation
Apr 30, 2021
Merged

Fix node name propagation on Jenkins pipelines traces#205
drodriguezhdez merged 13 commits into
masterfrom
drodriguezhdez/fix_node_name_propagation

Conversation

@drodriguezhdez

@drodriguezhdez drodriguezhdez commented Apr 26, 2021

Copy link
Copy Markdown
Collaborator

Requirements for Contributing to this repository

  • Fill out the template below. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • The pull request must only fix one issue at the time.
  • The pull request must update the test suite to demonstrate the changed functionality.
  • After you create the pull request, all status checks must be pass before a maintainer reviews your contribution. For more details, please see CONTRIBUTING.

What does this PR do?

Currently, the node name reported in the indexed spans for Jenkins pipelines doesn't have the correct information because the correct node name information is reported after the Allocate node : Start child is executed.

This PR fixes the node name information reported in the indexed spans (pipeline and stage) using the correct node name propagated from the child spans.

Description of the Change

We use the following approaches to propagate the correct node name to the indexed spans:

  • For the Pipeline span (root span):
    • Use the PipelineNodeNameInfoAction action. This action is populated in the DatadogStepListener listener taking into account the first Allocate node : Start flow node that is a child of the Start of Pipeline flow node.
    • We cannot use the same approach used for the Stages because the BuildPipeline#completeInformation method because is executed after the root span is sent.
  • For the Stage spans:
    • During the execution of the BuildPipeline#completeInformation method, the executable child node is searched and the node name is propagated to its parent (in this case, the stage we're evaluating)

Alternate Designs

Possible Drawbacks

Verification Process

Additional Notes

Release Notes

Review checklist (to be filled by reviewers)

  • Feature or bug fix MUST have appropriate tests (unit, integration, etc...)
  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have one changelog/ label attached. If applicable it should have the backward-incompatible label attached.
  • PR should not have do-not-merge/ label attached.
  • If Applicable, issue must have kind/ and severity/ labels attached at least.

@drodriguezhdez drodriguezhdez added the changelog/Fixed Fixed features results into a bug fix version bump label Apr 26, 2021
@drodriguezhdez
drodriguezhdez marked this pull request as ready for review April 26, 2021 11:01
@drodriguezhdez
drodriguezhdez merged commit bf25a69 into master Apr 30, 2021
@drodriguezhdez
drodriguezhdez deleted the drodriguezhdez/fix_node_name_propagation branch April 30, 2021 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/Fixed Fixed features results into a bug fix version bump

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants