Skip to content

Commit d4bbeb2

Browse files
authored
Merge branch 'master' into ivoanjo/prof-9476-managed-string-storage-try2
2 parents 9536838 + 6021b3d commit d4bbeb2

File tree

1,154 files changed

+13162
-6709
lines changed

Some content is hidden

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

1,154 files changed

+13162
-6709
lines changed

.circleci/config.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,8 @@ orbs:
240240
command: |
241241
DOCKERIZE_URL="https://github.com/powerman/dockerize/releases/download/v0.17.0/dockerize-$(uname -s | tr '[:upper:]' '[:lower:]')-$(arch | sed 's/aarch64/arm64/')"
242242
DOCKERIZE_URL: $DOCKERIZE_URL
243-
curl --silent --show-error --location --fail --retry 3 --output /usr/local/bin/dockerize $DOCKERIZE_URL
243+
set -e
244+
curl --silent --show-error --location --fail --retry 5 --output /usr/local/bin/dockerize $DOCKERIZE_URL
244245
chmod +x /usr/local/bin/dockerize
245246
dockerize --version
246247
# Wait for containers to start
@@ -275,11 +276,13 @@ orbs:
275276
name: Upload JUnit reports to Datadog
276277
when: always
277278
command: |
279+
set -e
280+
278281
sed -i 's/file="\.\//file="/g' tmp/rspec/*.xml
279282
280283
ls -l tmp/rspec/*.xml
281284
282-
curl -L --fail --retry 3 "https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_linux-x64" --output "/usr/local/bin/datadog-ci" && chmod +x /usr/local/bin/datadog-ci
285+
curl -L --fail --retry 5 "https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_linux-x64" --output "/usr/local/bin/datadog-ci" && chmod +x /usr/local/bin/datadog-ci
283286
284287
datadog-ci version
285288

.github/dependabot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "github-actions"
9+
directory: "/"
10+
schedule:
11+
interval: "monthly"
12+
groups:
13+
gh-actions-packages:
14+
patterns:
15+
- "*"

.github/forced-tests-list.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
{
2-
2+
"AGENT_NOT_SUPPORTING_SPAN_EVENTS":
3+
[
4+
"tests/test_span_events.py"
5+
],
6+
"PARAMETRIC":
7+
[
8+
"tests/parametric/test_span_events.py"
9+
]
310
}

.github/labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ dev/testing:
1818
# Changes to Profiling
1919
profiling:
2020
- changed-files:
21-
- any-glob-to-any-file: [ '{lib/datadog/profiling/**,ext/datadog_profiling_loader/**,ext/datadog_profiling_native_extension/**}' ]
21+
- any-glob-to-any-file: [ '{lib/datadog/profiling/**,ext/datadog_profiling_native_extension/**}' ]
2222

2323
# Changes to CI-App
2424
ci-app:

.github/scripts/generate_table_versions.rb

Lines changed: 0 additions & 23 deletions
This file was deleted.

.github/scripts/find_gem_version_bounds.rb renamed to .github/scripts/update_supported_versions.rb

Lines changed: 69 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ class GemfileProcessor
1414
EXCLUDED_INTEGRATIONS = ["configuration", "propagation", "utils"].freeze
1515

1616
def initialize(directory: 'gemfiles/', contrib_dir: 'lib/datadog/tracing/contrib/')
17+
unless Dir.exist?(directory)
18+
warn("Directory #{directory} does not exist")
19+
end
20+
21+
unless Dir.exist?(contrib_dir)
22+
warn("Directory #{contrib_dir} does not exist")
23+
end
1724
@directory = directory
1825
@contrib_dir = contrib_dir
1926
@min_gems = { 'ruby' => {}, 'jruby' => {} }
@@ -25,7 +32,7 @@ def process
2532
parse_gemfiles
2633
process_integrations
2734
include_hardcoded_versions
28-
write_output
35+
write_markdown_output
2936
end
3037

3138
private
@@ -106,18 +113,18 @@ def process_integrations
106113
def include_hardcoded_versions
107114
# `httpx` is maintained externally
108115
@integration_json_mapping['httpx'] = [
109-
'0.11', # Min version Ruby
110-
'infinity', # Max version Ruby
111-
'0.11', # Min version JRuby
112-
'infinity' # Max version JRuby
116+
'[3rd-party support](https://honeyryderchuck.gitlab.io/httpx/)', # Min version Ruby
117+
'[3rd-party support](https://honeyryderchuck.gitlab.io/httpx/)', # Max version Ruby
118+
'[3rd-party support](https://honeyryderchuck.gitlab.io/httpx/)', # Min version JRuby
119+
'[3rd-party support](https://honeyryderchuck.gitlab.io/httpx/)', # Max version JRuby
113120
]
114121

115122
# `makara` is part of `activerecord`
116123
@integration_json_mapping['makara'] = [
117-
'0.3.5', # Min version Ruby
118-
'infinity', # Max version Ruby
119-
'0.3.5', # Min version JRuby
120-
'infinity' # Max version JRuby
124+
'0.5.1', # Min version Ruby
125+
'0.5.1', # Max version Ruby
126+
'0.5.1', # Min version JRuby
127+
'0.5.1' # Max version JRuby
121128
]
122129
end
123130

@@ -131,10 +138,60 @@ def resolve_integration_name(integration)
131138
integration
132139
end
133140

134-
def write_output
135-
@integration_json_mapping = @integration_json_mapping.sort.to_h
136-
File.write("gem_output.json", JSON.pretty_generate(@integration_json_mapping))
141+
def write_markdown_output
142+
output_file = 'docs/integration_versions.md'
143+
comment = <<~COMMENT
144+
<!--
145+
# Please do NOT manually edit this file.
146+
# This file is generated by `bundle exec ruby .github/scripts/update_supported_versions.rb`
147+
148+
### Supported Versions Table ###
149+
150+
This markdown file is generated from the minimum and maximum versions of the integrations we support, as tested in our `gemfile.lock` lockfiles.
151+
For a list of available integrations, and their supported version ranges, refer to the following:
152+
-->
153+
COMMENT
154+
column_widths = {
155+
integration: 24,
156+
ruby_min: 19,
157+
ruby_max: 19,
158+
jruby_min: 19,
159+
jruby_max: 19
160+
}
161+
columns = {
162+
integration: "Integration",
163+
ruby_min: "Ruby Min",
164+
ruby_max: "Ruby Max",
165+
jruby_min: "JRuby Min",
166+
jruby_max: "JRuby Max"
167+
}
168+
169+
adjusted_widths = columns.transform_values.with_index do |title, index|
170+
[title.length, column_widths.values[index]].max
171+
end
172+
173+
header = "| " + columns.map { |key, title| title.ljust(adjusted_widths[key]) }.join(" | ") + " |"
174+
separator = "|-" + adjusted_widths.map { |_, width| "-" * width }.join("-|-") + "-|"
175+
rows = @integration_json_mapping
176+
.sort_by { |name, _versions| name.downcase }
177+
.map do |name, versions|
178+
integration_name = name.ljust(column_widths[:integration])
179+
ruby_min = (versions[0] || "None").ljust(column_widths[:ruby_min])
180+
ruby_max = (versions[1] == 'infinity' ? 'latest' : versions[1] || 'None').ljust(column_widths[:ruby_max])
181+
jruby_min = (versions[2] || "None").ljust(column_widths[:jruby_min])
182+
jruby_max = (versions[3] == 'infinity' ? 'latest' : versions[3] || 'None').ljust(column_widths[:jruby_max])
183+
184+
"| #{integration_name} | #{ruby_min} | #{ruby_max} | #{jruby_min} | #{jruby_max} |"
185+
end
186+
187+
File.open(output_file, 'w') do |file|
188+
file.puts comment
189+
file.puts header
190+
file.puts separator
191+
rows.each { |row| file.puts row }
192+
end
137193
end
138194
end
139195

196+
140197
GemfileProcessor.new.process

.github/workflows/add-milestone-to-pull-requests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
steps:
1515
- name: Checkout code
1616
# Checks out the branch that the pull request is merged into
17-
uses: actions/checkout@v4
17+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1818
with:
1919
ref: ${{ github.event.pull_request.base.ref }}
2020

@@ -26,7 +26,7 @@ jobs:
2626
2727
- name: Get project milestones
2828
id: milestones
29-
uses: actions/github-script@v7
29+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
3030
with:
3131
github-token: ${{secrets.GITHUB_TOKEN}}
3232
script: |
@@ -39,7 +39,7 @@ jobs:
3939
4040
- name: Update Pull Request
4141
# Update the merged pull request with the milestone starts with the major version
42-
uses: actions/github-script@v7
42+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
4343
with:
4444
github-token: ${{secrets.GITHUB_TOKEN}}
4545
script: |

.github/workflows/build-gem.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ jobs:
2727
name: Build gem (${{ matrix.type }})
2828
steps:
2929
- name: Checkout
30-
uses: actions/checkout@v4
31-
- uses: ruby/setup-ruby@v1
30+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
31+
- uses: ruby/setup-ruby@8388f20e6a9c43cd241131b678469a9f89579f37 # v1.216.0
3232
with:
3333
ruby-version: '3.2'
3434
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
@@ -60,7 +60,7 @@ jobs:
6060
run: |
6161
find pkg
6262
- name: Upload artifact
63-
uses: actions/upload-artifact@v4
63+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
6464
with:
6565
name: 'datadog-gem-${{ matrix.type }}-gha${{ github.run_id }}-g${{ github.sha }}'
6666
path: 'pkg/*.gem'
@@ -77,14 +77,14 @@ jobs:
7777
- build
7878
steps:
7979
- name: Download artifact
80-
uses: actions/download-artifact@v4
80+
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
8181
with:
8282
name: 'datadog-gem-${{ matrix.type }}-gha${{ github.run_id }}-g${{ github.sha }}'
8383
path: 'pkg'
8484
- name: List gem
8585
run: |
8686
find pkg
87-
- uses: ruby/setup-ruby@v1
87+
- uses: ruby/setup-ruby@8388f20e6a9c43cd241131b678469a9f89579f37 # v1.216.0
8888
with:
8989
ruby-version: '3.2'
9090
- name: Install gem
@@ -103,7 +103,7 @@ jobs:
103103
if: ${{ inputs.push }}
104104
steps:
105105
- name: Download artifact
106-
uses: actions/download-artifact@v4
106+
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
107107
with:
108108
name: 'datadog-gem-${{ matrix.type }}-gha${{ github.run_id }}-g${{ github.sha }}'
109109
path: 'pkg'

.github/workflows/cache-cleanup.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Reference:
2+
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/caching-dependencies-to-speed-up-workflows#force-deleting-cache-entries
3+
4+
name: Cleanup caches by a branch
5+
on:
6+
pull_request:
7+
types:
8+
- closed
9+
10+
jobs:
11+
cleanup:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Cleanup
15+
run: |
16+
echo "Fetching list of cache key"
17+
cacheKeysForPR=$(gh cache list --ref $BRANCH --limit 100 --json id --jq '.[].id')
18+
19+
## Setting this to not fail the workflow while deleting cache keys.
20+
set +e
21+
echo "Deleting caches..."
22+
for cacheKey in $cacheKeysForPR
23+
do
24+
gh cache delete $cacheKey
25+
done
26+
echo "Done"
27+
env:
28+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
GH_REPO: ${{ github.repository }}
30+
BRANCH: refs/pull/${{ github.event.pull_request.number }}/merge

0 commit comments

Comments
 (0)