Always publish app on each upload#333
Conversation
🎉 All green!❄️ No new flaky tests detected 🔗 Commit SHA: f6dbcc3 | Docs | Datadog PR Page | Give us feedback! |
There was a problem hiding this comment.
💡 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".
There was a problem hiding this comment.
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 👍 / 👎.
There was a problem hiding this comment.
intentionally ignoring for now


What and why?
Previously, the apps plugin published the uploaded version to live only when
APPS_VERSION_NAMEwas set as an environment variable, and theversion_idsent 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_idfrom the upload response.How?
APPS_VERSION_NAMEguard around the release PUT request is removed. Therelease now fires whenever the upload response contains
version_id,application_id, andapp_builder_id.response.version_idinstead of theAPPS_VERSION_NAMEenv var value.request so it only appears once the version is live.
the integration test now mocks the release endpoint.