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

[CIVIS] Add contains deployment tag to deployment mark command #1216

Merged
merged 2 commits into from
Mar 5, 2024

Conversation

rodrigo-roca
Copy link
Contributor

@rodrigo-roca rodrigo-roca commented Mar 4, 2024

What and why?

The deployment mark command is basically a wrapper on top of the tag command. This PR changes this "wrapper". It adds the tag ci.contains_deployment: true to pipeline level. After these changes the command will:

  • One request to attach tags to the job (with whatever the user wants to attach to the deployment such as service or env). No changes here
  • One request to attach tags to the pipeline (for now with only contains_deployment). This is the new behavior

I have seen that when both tag commands succeed they print Tags sent twice now (since they are 2 commands). This should not be a problem right? Or should we make a "silent" option for the tag command?

How?

A brief description of implementation details of this PR.

Review checklist

  • Feature or bugfix MUST have appropriate tests (unit, integration)

@rodrigo-roca rodrigo-roca self-assigned this Mar 4, 2024
@datadog-datadog-prod-us1
Copy link

Datadog Report

Branch report: rodrigo.roca/add-contains-deployment-tag
Commit report: b0bf095
Test service: datadog-ci-tests

✅ 0 Failed, 2464 Passed, 0 Skipped, 2m 17.49s Total duration (39.06s time saved)

@rodrigo-roca rodrigo-roca changed the title deployment mark add contains tag to pipeline level [CIVIS] Add contains deployment tag to deployment mark command Mar 4, 2024
@rodrigo-roca rodrigo-roca marked this pull request as ready for review March 4, 2024 13:33
@rodrigo-roca rodrigo-roca requested a review from a team as a code owner March 4, 2024 13:33
Copy link
Contributor

@juan-fernandez juan-fernandez left a comment

Choose a reason for hiding this comment

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

I have seen that when both tag commands succeed they print Tags sent twice now (since they are 2 commands). This should not be a problem right? Or should we make a "silent" option for the tag command?

it's probably a good idea, as I don't think it's a great experience to see the message twice (it leaks an implementation detail to the user). The command is still in beta, right? We can do changes later on.

Also: we might want to consider e2e tests at some point.

@rodrigo-roca rodrigo-roca merged commit 1d93994 into master Mar 5, 2024
14 checks passed
@rodrigo-roca rodrigo-roca deleted the rodrigo.roca/add-contains-deployment-tag branch March 5, 2024 13:46
@dastrong dastrong mentioned this pull request Mar 12, 2024
@Drarig29 Drarig29 added the ci-visibility Related to [junit, gate, metric, tag, trace, dora, deployment] label Mar 13, 2024
This was referenced Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-visibility Related to [junit, gate, metric, tag, trace, dora, deployment]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants