Skip to content

Release app version after upload#273

Merged
yoannmoinet merged 2 commits intomasterfrom
oliver/release-app-version-after-upload
Feb 24, 2026
Merged

Release app version after upload#273
yoannmoinet merged 2 commits intomasterfrom
oliver/release-app-version-after-upload

Conversation

@oliverli
Copy link
Collaborator

@oliverli oliverli commented Feb 20, 2026

What and why?

After uploading the built zip archive to Datadog (presumably in a CI environment), also mark that version as the latest released version by making a PUT call to release/live

Making this call in the build script was the best possible move because various configs e.g. the Datadog site is configured in the Datadog vite plugin, which would be non-trivial to extract in a CI script and it would be user-unfriendly to have the user configure that again e.g. in the GH action.

How?

Call /release/live using doRequest after the application has been uploaded

Copy link
Collaborator Author

oliverli commented Feb 20, 2026

@datadog-official
Copy link

datadog-official bot commented Feb 20, 2026

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 7d11050 | Docs | Datadog PR Page | Was this helpful? Give us feedback!

@oliverli oliverli force-pushed the oliver/release-app-version-after-upload branch from a83fc18 to 35cda9b Compare February 20, 2026 07:53
Base automatically changed from oliver/allow-passing-version-name-via-environmental-variable-to-apps-plugin to master February 20, 2026 19:30
@oliverli oliverli force-pushed the oliver/release-app-version-after-upload branch from 35cda9b to 78322bb Compare February 20, 2026 19:58
@oliverli oliverli force-pushed the oliver/release-app-version-after-upload branch from 78322bb to 872da69 Compare February 20, 2026 20:34
@oliverli oliverli marked this pull request as ready for review February 20, 2026 20:39
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

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: 872da69279

ℹ️ 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
Member

@yoannmoinet yoannmoinet left a comment

Choose a reason for hiding this comment

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

Two small nits, otherwise looks good.

One note, I'm not sure how we should handle it when the upload succeed but the release does not.
It's fine as is, but maybe something to keep in mind for the future, unless you have an idea now.

Comment on lines +78 to +92
expect(getIntakeUrl('datadoghq.com', 'my-app')).toBe(
'https://api.datadoghq.com/api/unstable/app-builder-code/apps/my-app/upload',
);
expect(getIntakeUrl('datadoghq.eu', 'my-app')).toBe(
'https://api.datadoghq.eu/api/unstable/app-builder-code/apps/my-app/upload',
);
expect(getIntakeUrl('ddog-gov.com', 'my-app')).toBe(
'https://api.ddog-gov.com/api/unstable/app-builder-code/apps/my-app/upload',
);
expect(getIntakeUrl('us5.datadoghq.com', 'my-app')).toBe(
'https://api.us5.datadoghq.com/api/unstable/app-builder-code/apps/my-app/upload',
);
expect(getIntakeUrl('dd.datad0g.com', 'my-app')).toBe(
'https://api.dd.datad0g.com/api/unstable/app-builder-code/apps/my-app/upload',
);
Copy link
Member

Choose a reason for hiding this comment

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

Not sure we need to test for all DD sites.
One should be well enough to verify the string update.
Same for the following test.

Suggested change
expect(getIntakeUrl('datadoghq.com', 'my-app')).toBe(
'https://api.datadoghq.com/api/unstable/app-builder-code/apps/my-app/upload',
);
expect(getIntakeUrl('datadoghq.eu', 'my-app')).toBe(
'https://api.datadoghq.eu/api/unstable/app-builder-code/apps/my-app/upload',
);
expect(getIntakeUrl('ddog-gov.com', 'my-app')).toBe(
'https://api.ddog-gov.com/api/unstable/app-builder-code/apps/my-app/upload',
);
expect(getIntakeUrl('us5.datadoghq.com', 'my-app')).toBe(
'https://api.us5.datadoghq.com/api/unstable/app-builder-code/apps/my-app/upload',
);
expect(getIntakeUrl('dd.datad0g.com', 'my-app')).toBe(
'https://api.dd.datad0g.com/api/unstable/app-builder-code/apps/my-app/upload',
);
expect(getIntakeUrl('datadoghq.eu', 'my-app')).toBe(
'https://api.datadoghq.eu/api/unstable/app-builder-code/apps/my-app/upload',
);

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

They're all valid DD sites, and imo more tests/more explicit tests are better than fewer

Copy link
Member

Choose a reason for hiding this comment

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

This is just string substitution, apart from adding overhead and unnecessary execution time, there is no added value to test these.

We could test for getIntakeUrl('toto', 'hello') giving us 'https://api.toto/api/unstable/app-builder-code/apps/hello/upload' with the same result in coverage and testing efficiency.

Here, more tests only means more executions for no added value at all.

Co-authored-by: Yoann Moinet <597828+yoannmoinet@users.noreply.github.com>
@oliverli
Copy link
Collaborator Author

/merge

@gh-worker-devflow-routing-ef8351
Copy link

gh-worker-devflow-routing-ef8351 bot commented Feb 23, 2026

View all feedbacks in Devflow UI.

2026-02-23 23:44:43 UTC ℹ️ Start processing command /merge


2026-02-23 23:44:48 UTC ℹ️ MergeQueue: waiting for PR to be ready

This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
It will be added to the queue as soon as checks pass and/or get approvals. View in MergeQueue UI.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2026-02-24 00:54:06 UTC ⚠️ MergeQueue: This merge request was unqueued

oliver.li@datadoghq.com unqueued this merge request

@oliverli
Copy link
Collaborator Author

/remove

@gh-worker-devflow-routing-ef8351
Copy link

gh-worker-devflow-routing-ef8351 bot commented Feb 24, 2026

View all feedbacks in Devflow UI.

2026-02-24 00:54:02 UTC ℹ️ Start processing command /remove


2026-02-24 00:54:04 UTC ℹ️ Devflow: /remove

@oliverli
Copy link
Collaborator Author

/merge

@gh-worker-devflow-routing-ef8351
Copy link

gh-worker-devflow-routing-ef8351 bot commented Feb 24, 2026

View all feedbacks in Devflow UI.

2026-02-24 04:57:38 UTC ℹ️ Start processing command /merge


2026-02-24 04:57:44 UTC ℹ️ MergeQueue: waiting for PR to be ready

This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
It will be added to the queue as soon as checks pass and/or get approvals. View in MergeQueue UI.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2026-02-24 09:01:05 UTC ⚠️ MergeQueue: This merge request was unqueued

devflow unqueued this merge request: It did not become mergeable within the expected time

@oliverli
Copy link
Collaborator Author

/merge

@gh-worker-devflow-routing-ef8351
Copy link

gh-worker-devflow-routing-ef8351 bot commented Feb 24, 2026

View all feedbacks in Devflow UI.

2026-02-24 15:32:59 UTC ℹ️ Start processing command /merge


2026-02-24 15:33:06 UTC ℹ️ MergeQueue: waiting for PR to be ready

This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
It will be added to the queue as soon as checks pass and/or get approvals. View in MergeQueue UI.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2026-02-24 15:35:34 UTC ℹ️ MergeQueue: This merge request was already merged

This pull request was merged directly.

@yoannmoinet yoannmoinet merged commit 6e042b9 into master Feb 24, 2026
5 checks passed
@yoannmoinet yoannmoinet deleted the oliver/release-app-version-after-upload branch February 24, 2026 15:35
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