Skip to content

feat(e2e): re-enable automated Marketplace publish + auto-update - #648

Closed
naveenku-jfrog wants to merge 3 commits into
devfrom
feat/e2e-auto-publish
Closed

feat(e2e): re-enable automated Marketplace publish + auto-update#648
naveenku-jfrog wants to merge 3 commits into
devfrom
feat/e2e-auto-publish

Conversation

@naveenku-jfrog

Copy link
Copy Markdown
Contributor

Summary

Re-enables the fully automated e2e flow so jobs 2 & 3 always test the PR's own code:

  • Adds a Publish to Marketplace, share and install step in Job 1. It publishes the freshly built private .vsix, shares it with the dev org, and installs it — after which ADO auto-updates the org to each new version.
  • Fixes the versioning bug that caused this step to be removed before: the version is now 0.<run_number>.<run_attempt>, which is strictly increasing across runs and re-runs. This avoids the old "version must increase" failure that made Job 1 fail and silently skip jobs 2 & 3.
  • Gated on the ADO_E2E_MARKETPLACE_PAT secret. If it is unset, the step is a no-op and the manual artifact-upload flow still works.
  • Updates the job-summary wording to describe manual upload as a fallback.

Behavior

  • Secret set → build → publish + share + install → ADO auto-updates → jobs 2 & 3 verify the version matches and run against this PR's code.
  • Secret unset → build + upload artifact only (unchanged manual fallback).

Notes

  • The extension id is shared across all e2e runs, so the version must be globally monotonic; PR-number-based versions could go backwards when an older PR runs after a newer one. run_number is globally monotonic per workflow, run_attempt covers re-runs.
  • The pre-existing 7-minute propagation wait + version-match guard in jobs 2 & 3 now line up with an actual publish.

Test plan

  • Label a PR "safe to test" and confirm Job 1 publishes without a version error (including on a manual "Re-run all jobs").
  • Confirm jobs 2 & 3 report version MATCH and run against the new build.
  • Re-run the same run and confirm no "version must increase" failure.
  • Unset the secret path: confirm the step is skipped and the artifact is still produced.

Restore the automated Marketplace publish in Job 1 (publish + share +
install), so jobs 2 & 3 always exercise the PR's own code without a
manual UI upload.

The step was previously removed because it failed with "version must
increase" on re-runs (same run_number => same version). Fix the version
scheme to 0.<run_number>.<run_attempt>, which is strictly increasing
across both new runs and re-runs, and is globally monotonic for the
shared extension id.

Gated on ADO_E2E_MARKETPLACE_PAT: unset => no-op, manual artifact
upload still works.

Co-authored-by: Cursor <cursoragent@cursor.com>
Prefer the traceable 0.<PR#>.<run_number>, but if the version currently
live on Marketplace is >= that candidate, take the live version and bump
its patch instead. This satisfies Marketplace's "version must increase"
rule (the private e2e extension already has higher publishes like
0.647.87) while keeping versions meaningful when the candidate is ahead.

Adds a "Resolve next extension version" step that queries tfx extension
show and computes the final version; the package + publish steps consume
it. Falls back to the candidate when no Marketplace PAT is available.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
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.

1 participant