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

[ci-visibility] Add --tags-file and --measures-file options #1426

Merged
merged 8 commits into from
Aug 29, 2024

Conversation

rodrigo-roca
Copy link
Contributor

@rodrigo-roca rodrigo-roca commented Aug 23, 2024

What and why?

Adds the option --tags-file for the tag command and the --measures-file for the measure command. Also improves error handling in the tag command (by displaying the error details and not only the status code). Those options allow to send multiple tags in bulk using a JSON file. The reason we are adding this is that adding large amounts of tags is very tedious to do through the command line only.

How?

The user can provide a file path to a .json file and we will read all the tags / measures inside of it.

  • For the tag command, we will convert booleans and numbers to strings, emitting a warning if it is a number since it should be reported using the measure command instead.
  • For the measure command, everything that is not a number will be ignored.

Review checklist

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

@rodrigo-roca rodrigo-roca added the ci-visibility Related to [junit, gate, metric, tag, trace, dora, deployment] label Aug 23, 2024
@rodrigo-roca rodrigo-roca self-assigned this Aug 23, 2024
@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Aug 23, 2024

Datadog Report

Branch report: rodrigo.roca/add-json-file-for-sending-tags
Commit report: 3c8b6a1
Test service: datadog-ci-tests

✅ 0 Failed, 2978 Passed, 0 Skipped, 1m 47.55s Total duration (1m 4.05s time saved)

@rodrigo-roca rodrigo-roca marked this pull request as ready for review August 26, 2024 08:49
@rodrigo-roca rodrigo-roca requested review from a team as code owners August 26, 2024 08:49
@rodrigo-roca rodrigo-roca requested review from anmarchenko and juan-fernandez and removed request for anmarchenko August 26, 2024 08:50
src/commands/tag/README.md Show resolved Hide resolved
@rodrigo-roca rodrigo-roca merged commit e089527 into master Aug 29, 2024
18 checks passed
@rodrigo-roca rodrigo-roca deleted the rodrigo.roca/add-json-file-for-sending-tags branch August 29, 2024 13:13
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