Always publish app on each upload by oliverli · Pull Request #333 · DataDog/build-plugins · GitHub
Skip to content

Always publish app on each upload#333

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 3 commits into
masterfrom
oliver/always-publish-app-on-each-upload
Apr 29, 2026
Merged

Always publish app on each upload#333
gh-worker-dd-mergequeue-cf854d[bot] merged 3 commits into
masterfrom
oliver/always-publish-app-on-each-upload

Conversation

@oliverli

@oliverli oliverli commented Apr 29, 2026

Copy link
Copy Markdown
Collaborator

What and why?

Previously, the apps plugin published the uploaded version to live only when
APPS_VERSION_NAME was set as an environment variable, and the version_id
sent in the release request used that env var's value rather than the ID
returned by the upload API. This meant a live publish was skipped on every
upload that didn't set the env var, even though the upload itself succeeded.

This PR makes the live publish happen on every successful upload, using the
version_id from the upload response.

How?

  • The APPS_VERSION_NAME guard around the release PUT request is removed. The
    release now fires whenever the upload response contains version_id,
    application_id, and app_builder_id.
  • The PUT body is updated to use response.version_id instead of the
    APPS_VERSION_NAME env var value.
  • The "Your application is available at" log is moved to after the release
    request so it only appears once the version is live.
  • Tests are updated to reflect the new trigger condition and log message, and
    the integration test now mocks the release endpoint.

Copy link
Copy Markdown
Collaborator Author

@datadog-prod-us1-5

datadog-prod-us1-5 Bot commented Apr 29, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

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

@oliverli oliverli marked this pull request as ready for review April 29, 2026 19:11
@oliverli oliverli requested a review from yoannmoinet as a code owner April 29, 2026 19:11

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f6dbcc3aa8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Honor custom intake when publishing releases

When DATADOG_APPS_INTAKE_URL/DD_APPS_INTAKE_URL is set, getIntakeUrl sends the upload to that full custom URL, but the new unconditional publish still computes https://api.${site} here. In that documented override scenario, a successful upload to a staging/custom intake is followed by a release against the default Datadog site, which can fail the build or publish the app with the same identifier in the wrong environment; derive the release target from the override or make it separately overridable.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

intentionally ignoring for now

@yoannmoinet yoannmoinet left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot merged commit da5223d into master Apr 29, 2026
6 checks passed
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot deleted the oliver/always-publish-app-on-each-upload branch April 29, 2026 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants