[APMAPI-1594] Config inversion basic implementation #459
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.
What does this PR do?
This PR adds config inversion to datadog-ci-rb, without backfilling the configs yet (this will be done in a subsequent PR), nor adding the CI jobs (also in a later PR) nor adding the two custom cops, to prevent direct access to ENV, and to detect unregistered DD_ or OTEL_ env vars.
Motivation
We currently miss all datadog-ci-rb env vars in the config registry.
Additional Notes
This depends on DataDog/dd-trace-rb#5256 to use config inversion, but this should not introduce any breaking change on lower versions of dd-trace-rb.
How to test the change?
I'm unsure how to tell the CI to use a specific branch of dd-trace-rb for the tests. Locally, you can change the Gemfile to use dd-trace-rb
vpellan/config-inversion-datadog-ci-rbbranch. You also need to bump the version to 1.27.0.