Skip to content

Commit f48f680

Browse files
authored
Merge branch 'master' into sarahchen6/add-ruby-3.5
2 parents ebb7427 + 7cce081 commit f48f680

File tree

721 files changed

+3421
-2361
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

721 files changed

+3421
-2361
lines changed

.gitlab-ci.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,3 +191,18 @@ vaccine:
191191
after_script:
192192
# Revoke the token after usage
193193
- dd-octo-sts revoke -t $(cat token.txt)
194+
195+
# Config inversion CI steps
196+
validate_supported_configurations_local_file:
197+
rules:
198+
- when: on_success
199+
extends: .validate_supported_configurations_local_file
200+
variables:
201+
LOCAL_JSON_PATH: "supported-configurations.json"
202+
203+
update_central_configurations_version_range:
204+
extends: .update_central_configurations_version_range
205+
variables:
206+
LOCAL_JSON_PATH: "supported-configurations.json"
207+
LANGUAGE_NAME: "ruby"
208+
MULTIPLE_RELEASE_LINES: "false"

.gitlab/one-pipeline.locked.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# DO NOT EDIT THIS FILE MANUALLY
22
# This file is auto-generated by automation.
33
include:
4-
- remote: https://gitlab-templates.ddbuild.io/libdatadog/one-pipeline/ca/d44e89797a5a47c43cf712193abefe2178a004176606f7e01b77d1ec49a3ef5e/one-pipeline.yml
4+
- remote: https://gitlab-templates.ddbuild.io/libdatadog/one-pipeline/ca/bc1184decb7b0dedcce721eb08819b3bd8a36c0473e832b3ec1b804c8f1b5807/one-pipeline.yml

datadog.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Gem::Specification.new do |spec|
6565
spec.add_dependency 'datadog-ruby_core_source', '~> 3.4', '>= 3.4.1'
6666

6767
# Used by appsec
68-
spec.add_dependency 'libddwaf', '~> 1.25.1.0.1'
68+
spec.add_dependency 'libddwaf', '~> 1.25.1.1.0'
6969

7070
# When updating the version here, please also update the version in `libdatadog_extconf_helpers.rb`
7171
# (and yes we have a test for it)

docs/AccessEnvironmentVariables.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ The configuration inversion system works as follows:
6363

6464
To add support for a new environment variable:
6565

66-
### Step 1: Add to supported-configurations.json
66+
### Step 1: Add to supported-configurations.json & central registry
67+
68+
If the configuration key has never been registered by any tracer it needs to be added to the [Configuration Registry](https://feature-parity.us1.prod.dog/#/configurations?viewType=configurations) (available only for internal contributors) with proper documentation. In the case of an already existing key the behavior needs to be verified in order to know if a new version of the same key needs to be created on the registry.
6769

6870
Edit the `supported-configurations.json` file and add your variable (Please keep any new keys in the file sorted!):
6971

@@ -80,18 +82,20 @@ Edit the `supported-configurations.json` file and add your variable (Please keep
8082
#### Configuration Structure
8183

8284
- **supportedConfigurations**: Maps variable names to configuration metadata
83-
- `version`: (Currently always set to `["A"]`) Array indicating which implementations the tracer supports. Implementations are defined in the Feature Parity Dashboard and multiple implementations could be set for a single environment variable (e.g. the base one `A`, and an extra one `B` that adds new possible values). Versions are non-numeric to avoid confusion with library versions.
85+
- `version`: (Defaults to `["A"]`) Array indicating which implementations the tracer supports. Implementations are defined in the Configuration Registry and multiple implementations could be set for a single environment variable (e.g. the base one `A`, and an extra one `B` that adds new possible values). Versions are non-numeric to avoid confusion with library versions.
8486

8587
In the future, the structure will also contain more information such as the type, the default value...
8688

8789
- **aliases**: Maps canonical variable names to arrays of alias names
90+
8891
```json
8992
"aliases": {
9093
"DD_SERVICE": ["OTEL_SERVICE_NAME"]
9194
}
9295
```
9396

9497
- **deprecations**: Adds a log message to deprecated environment variables.
98+
9599
```json
96100
"deprecations": {
97101
"DD_OLD_VARIABLE": "Please use DD_NEW_VARIABLE",
@@ -151,6 +155,28 @@ rescue RuntimeError => e
151155
end
152156
```
153157

158+
### CI jobs
159+
160+
#### Local file validation
161+
162+
The `validate_supported_configurations_local_file` CI job in charge of validating the content of the `supported-configurations.json` file against the central Configuration Registry runs on GitLab in the `shared-pipeline` stage. This job verifies that all configuration keys present in the local file are correctly registered on the central registry. When a new key is introduced it has to be registered in order to pass this job.
163+
164+
Example of a failed run output:
165+
166+
```json
167+
Missing properties:
168+
{
169+
"DD_TRACE_GRAPHQL_ERROR_TRACKING": [
170+
"A"
171+
]
172+
}
173+
The above configuration was found locally but missing from the configuration registry.
174+
```
175+
176+
#### Updating supported versions
177+
178+
The `update_central_configurations_version_range` CI job runs upon tagging a new release. This job updates the central registry with the new version released indicating newly supported or dropped configuration keys.
179+
154180
## Validation
155181

156182
To ensure your configuration changes are valid:
@@ -159,6 +185,7 @@ To ensure your configuration changes are valid:
159185
# Validate that generated assets match the JSON file
160186
bundle exec rspec spec/datadog/core/configuration/supported_configurations_spec.rb
161187
```
188+
162189
This will also be run by the main RSpec rake task.
163190

164191
This task will exit with an error if there's a mismatch between `supported-configurations.json` and the generated assets. It is run by the CI, thus a mismatch will make the CI fail.

gemfiles/jruby_9.2_activesupport.gemfile.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gemfiles/jruby_9.2_aws.gemfile.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gemfiles/jruby_9.2_contrib.gemfile.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gemfiles/jruby_9.2_contrib_old.gemfile.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gemfiles/jruby_9.2_core_old.gemfile.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gemfiles/jruby_9.2_dalli_2.gemfile.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)