Skip to content

ci: upload RUM nginx module snapshots to S3#363

Open
pawelchcki wants to merge 6 commits into
masterfrom
port_rum_release
Open

ci: upload RUM nginx module snapshots to S3#363
pawelchcki wants to merge 6 commits into
masterfrom
port_rum_release

Conversation

@pawelchcki

Copy link
Copy Markdown
Collaborator

Summary

  • Port snapshot-upload jobs from httpd-datadog (upload-rum-branch-snapshots / -snapshots / -snapshots-latest + 30-day branch-snapshot lifecycle), under a new aws stage.
  • Expand build-nginx-rum-fast to every supported nginx version (1.24.0 → 1.30.0) so snapshots cover all variants on every commit.
  • .build-nginx-rum now also emits upload/ngx_http_datadog_module-${VERSION}-${ARCH}.zip.
  • Drop explicit needs: on ssi-build (mirrors existing ssi-build-all workaround) since the 62-entry matrix exceeds GitLab's 50-need limit.

Test plan

  • CI pipeline succeeds on this branch
  • upload-rum-branch-snapshots publishes zips to s3://rum-auto-instrumentation/nginx/branch-snapshots/pipeline-<id>/
  • After merge to master: upload-rum-snapshots and upload-rum-snapshots-latest populate snapshots/pipeline-<id>/ and snapshots/latest/

Port snapshot upload jobs from httpd-datadog and build RUM-enabled
modules for every supported nginx version on every commit so they
can be published to s3://rum-auto-instrumentation/nginx/.
Copilot AI review requested due to automatic review settings May 6, 2026 12:25
@pawelchcki pawelchcki requested a review from a team as a code owner May 6, 2026 12:25
Upload raw .so files named ngx_http_datadog_module-${ARCH}-${VERSION}.so
to s3://rum-auto-instrumentation/nginx/latest/ to match the layout
referenced by the public RUM nginx setup docs.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the GitLab CI pipeline to publish RUM-enabled nginx module snapshot artifacts to S3, aligning with the snapshot upload workflow used in httpd-datadog and ensuring snapshots exist across all supported nginx versions.

Changes:

  • Expands build-nginx-rum-fast to build RUM modules for nginx 1.24.0 → 1.30.0 (both amd64/arm64).
  • Updates the RUM build to also emit per-build zip artifacts into an upload/ directory and includes that directory in job artifacts.
  • Adds a new aws stage with snapshot upload jobs (branch snapshots + default-branch snapshots/latest) and a job to configure a 30-day lifecycle rule for branch snapshots; removes needs: from ssi-build to avoid GitLab’s 50-needs limit.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
.gitlab/ssi-package.yml Removes needs from ssi-build to avoid exceeding GitLab dependency limits.
.gitlab/common.yml Produces zip artifacts for RUM builds and exports them via upload/ artifacts.
.gitlab/build-and-test-fast.yml Expands RUM build matrix and adds S3 upload + lifecycle configuration jobs under a new aws stage.
.gitlab-ci.yml Adds the new aws stage to the pipeline stage list.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .gitlab/common.yml
Comment thread .gitlab/build-and-test-fast.yml
Comment thread .gitlab/build-and-test-fast.yml
Comment thread .gitlab/build-and-test-fast.yml Outdated
pawelchcki added 3 commits May 6, 2026 14:36
- Move S3 accessibility verification into the main script so a HEAD
  failure now fails the upload job (after_script failures don't).
- Skip upload-rum-branch-snapshots on tag pipelines, where
  $CI_COMMIT_BRANCH is empty and the build artifacts don't exist.
- Restrict test-nginx-rum-fast needs to its tested matrix subset to
  stay under GitLab's 50-need limit (build-nginx-rum-fast now has 62
  matrix entries).
@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented May 6, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 67.62% (+0.00%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: d99009b | Docs | Datadog PR Page | Give us feedback!

Revert the fast-pipeline matrix expansion and the related
50-need-limit workarounds. The S3 upload jobs introduced here will
publish snapshots only for the 7 versions already built by the fast
pipeline; full-coverage uploads will follow in a separate change
that hooks into build-nginx-rum-all.
@tabgok tabgok requested review from tabgok and removed request for tabgok May 21, 2026 14:11

@xlamorlette-datadog xlamorlette-datadog left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, looks great! Please address the few comments.

upload-rum-snapshots-latest:
extends: .upload-rum-snapshot-template
variables:
S3_PATH: s3://rum-auto-instrumentation/nginx/snapshots/latest

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could we rather do a server side copy (cheaper and faster)?:

aws s3 cp --recursive s3://rum-auto-instrumentation/nginx/snapshots/pipeline-${CI_PIPELINE_ID} s3://rum-auto-instrumentation/nginx/snapshots/latest

(to be tested)

- DD_API_KEY=$(vault kv get -field key kv/k8s/gitlab-runner/nginx-datadog/datadoghq-api-key 2>/dev/null) make coverage

.upload-rum-snapshot-template:
stage: aws

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would prefer a bit more descriptive stage name. Suggestions: aws-upload, aws-s3-upload, aws-rum-upload, aws-s3-rum-upload.

rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH

configure-rum-branch-snapshot-expiry:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we also define an expiry rule for nginx/snapshots (to avoid indefinite accumulation)?
(Maybe more than 30 days?)

script:
- DD_API_KEY=$(vault kv get -field key kv/k8s/gitlab-runner/nginx-datadog/datadoghq-api-key 2>/dev/null) make coverage

.upload-rum-snapshot-template:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please move the jobs of this new stage in a dedicated file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants