Skip to content

ci(marketplace-pre-release): track daily pre-releases across manual and scheduled runs - #1834

Merged
eitsupi merged 5 commits into
mainfrom
eitsupi-patch-1
Oct 6, 2026
Merged

eitsupi merged 5 commits into
mainfrom
eitsupi-patch-1

Conversation

@eitsupi

@eitsupi eitsupi commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Enable manual pre-releases on main, sharing the existing one-release-per-UTC-date limit with scheduled runs.

The history helper checks actual publishing steps across both trigger types and all attempts, so successful no-op runs cannot mark an unpublished SHA as released. Partial failures reserve the date for the original run's retry, and the publish job rechecks eligibility when rerun.

For long idle periods, consecutive same-SHA runs are searched from their earliest run, avoiding a job-history request per skipped day. Run history is fetched in bounded pages.

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.

Copilot review overview

🟡 Changes recommended

Manual dispatch must be restricted to main to prevent publishing unmerged refs.

Review effort: Balanced
Findings: 1 High severity

Open (1)
What changed in this PR

Adds manual triggering for the Marketplace pre-release workflow.

Changes:

  • Enables workflow_dispatch alongside the daily schedule.
File Description
.github/​workflows/​marketplace-pre-release.yml Allows manual pre-release workflow runs.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/marketplace-pre-release.yml
@eitsupi
eitsupi marked this pull request as draft October 6, 2026 14:06

@renkun-ken renkun-ken 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.

Two issues need addressing before enabling manual publishing.

  1. Restrict publishing to main. I confirmed the existing branch-selection finding: prepare.if checks only the repository, and the reusable verification workflow plus publishing checkout use the dispatch ref. Selecting a feature branch can therefore publish unmerged code into the public daily pre-release channel. Extend the prepare guard with github.ref == 'refs/heads/main' so downstream verification and publishing are skipped for other refs.
  2. Account for manual publications in the daily bookkeeping. The inline comment describes a reproduced sequence where a successful manual release causes a newer main commit to remain unpublished, even after the next scheduled run.

Validation: parsed the exact PR workflow, executed its preparation shell script against mocked GitHub API run history, and checked the installed vsce/ovsx duplicate handlers. The five existing extension-version tests pass. No publishing workflow was dispatched.

on:
schedule:
- cron: '23 3 * * *'
workflow_dispatch:

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.

[P2] Track manual publications before deduplicating daily versions

Adding dispatch exposes a gap in prepare: the previous-run query still filters with event=schedule, so successful manual publications are invisible. For example, a manual run publishes main SHA A as 3.1.20261006 before the daily cron; SHA B then lands, and the scheduled run builds B with the same version. Both registry commands return success via --skip-duplicate while leaving A published. The next day, prepare sees that successful scheduled run with head_sha == B and skips B again, so B stays unpublished until another commit arrives. I reproduced this three-run sequence using the exact preparation script. Update publication tracking to include dispatches and distinguish actual publications from successful no-op runs, so a duplicate-version skip cannot mark an unpublished SHA as released.

@eitsupi
eitsupi requested review from renkun-ken and a balanced review from Copilot October 6, 2026 14:11

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.

Copilot review overview

🟢 Approval recommended

The workflow remains safely restricted to the upstream repository’s main branch.

Review effort: Balanced
Findings: None

Resolved since last review (1)

@eitsupi
eitsupi marked this pull request as ready for review October 6, 2026 14:12

@renkun-ken renkun-ken 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.

Reviewed commit 6f6a302. The main guards on both prepare and publish address the branch-selection finding.

The [P2] publication-bookkeeping issue remains open (original finding). I reran the exact preparation script from this revision against mocked GitHub API history and reproduced:

  • A manual run publishes main SHA A as 3.1.20261006.
  • SHA B lands before the daily cron. The scheduled run builds B with the same version; --skip-duplicate leaves A published but makes the run successful.
  • The next day's scheduled run sees the previous successful scheduled run's SHA B and skips it, so B remains unpublished until another commit arrives.

The query at lines 31–33 still excludes workflow_dispatch runs and the SHA check at line 37 still treats a successful no-op as a publication. Please track actual publications across both trigger types and avoid marking a duplicate-version skip as a release of a different SHA. Simply adding dispatches to the query is insufficient if successful preparation-only skips can still become the latest publication record.

Keeping the changes request for this remaining issue. Validation used the current workflow's shell script with mocked API history and modeled registry duplicate behavior; no publishing workflow was dispatched.

@eitsupi
eitsupi marked this pull request as draft October 6, 2026 14:17
@eitsupi eitsupi changed the title ci(marketplace-pre-release): allow workflow dispatch fix(ci): track daily pre-releases across manual and scheduled runs Oct 6, 2026
@eitsupi eitsupi changed the title fix(ci): track daily pre-releases across manual and scheduled runs ci(marketplace-pre-release): track daily pre-releases across manual and scheduled runs Oct 6, 2026
@eitsupi
eitsupi requested a review from renkun-ken October 6, 2026 14:40
@eitsupi
eitsupi marked this pull request as ready for review October 6, 2026 15:07

@renkun-ken renkun-ken 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.

Reviewed dd5c709. Both earlier findings are addressed: publication stays restricted to upstream main, and the history helper considers publishing steps across manual and scheduled runs without treating preparation-only skips as releases.

Verified the original sequence now behaves correctly: a manual publication reserves its UTC date, the same-day scheduled run skips, and the unpublished newer SHA remains eligible the next day. Also checked partial failures, original-run retries, completed-run retries, and the publish-job eligibility recheck.

Validation: all 18 helper tests passed, eight additional process-level helper checks passed using mocked API history with real jq projection and GitHub output formatting, and the API adapter worked against read-only GitHub run/job responses. All current PR checks are green. No remaining actionable findings. No publishing workflow was dispatched.

@eitsupi
eitsupi merged commit 3a78b41 into main Oct 6, 2026
7 checks passed
@eitsupi
eitsupi deleted the eitsupi-patch-1 branch October 6, 2026 15:26
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