fix: release branch npm retry + semver comparison issues#7
fix: release branch npm retry + semver comparison issues#7deepshekhardas wants to merge 7 commits into
Conversation
Lets us ship a patch (e.g. 4.4.6) from a release/4.4.x branch without
including unreleased work merged into main, and without the patch
clobbering floating tags incorrectly.
The release-pipeline pieces this touches and how each behaves now:
npm dist-tag latest if version > current latest, else release-<M.m>
Docker :v4-beta same gate (highest version only)
Docker :release-X.Y new per-line floating tag, always set on a semver build
GitHub release --latest=true|false set explicitly (no auto-detect)
How the gate is computed:
release.yml's 'Compare new version to current latest' step queries
npm view @trigger.dev/sdk dist-tags.latest, compares via sort -V,
sets is_latest=true|false. Drives every floating tag.
Triggers / refs:
- pull_request:branches[main, release/**]
- if-conditions allow head.ref starting with 'changeset-release/'
- workflow_dispatch ref must be reachable from main OR a release/* branch
- changesets-pr.yml fires on push to release/** too; PR-enhance step
discovers source branch dynamically (no more hardcoded changeset-release/main)
Other changes:
- gh release create: drop --target main (tag carries right commit)
- dispatch-changelog payload includes is_latest so the marketing site
can render lagged-line releases differently
- enhance-release-pr.mjs prepends a Release prep header on release/*
branches showing version, current latest, and whether the PR will
take the latest dist-tag
release-helm.yml unchanged — already creates as draft+prerelease so it
can't claim Latest. publish-worker.yml (coordinator/provider) unchanged
since those don't have a :v4-beta-equivalent floating tag.
Validated end-to-end in ericallam/pkgring-sandbox across both scenarios:
Scenario A (lagged hotfix): latest stays put, only release-X.Y moves
Scenario B (main has unreleased work, hotfix is highest): latest moves
- enhance-release-pr.mjs: fix dead try/catch, use proper semver comparison - release.yml: add retry loop for npm view to prevent silent failures incorrectly promoting lagged hotfix to :latest
|
|
||
| - name: Setup node | ||
| uses: buildjet/setup-node@v4 | ||
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 |
| id: release | ||
| uses: softprops/action-gh-release@v1 | ||
| if: github.event_name == 'push' | ||
| uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3.0.0 |
There was a problem hiding this comment.
1 issue found across 1164 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name=".server-changes/dev-cli-disconnect-md">
<violation number="1" location=".server-changes/dev-cli-disconnect-md:1">
P1: File extension typo: `dev-cli-disconnect-md` should be `dev-cli-disconnect.md`. The hyphen before `md` prevents this file from being recognized as a markdown file, so it will be silently skipped during release note generation.</violation>
</file>
Note: This PR contains a large number of files. cubic only reviews up to 100 files per PR, so some files may not have been reviewed. cubic prioritizes the most important files to review.
On a pro plan you can use ultrareview for larger PRs.
Re-trigger cubic
| @@ -0,0 +1,6 @@ | |||
| --- | |||
There was a problem hiding this comment.
P1: File extension typo: dev-cli-disconnect-md should be dev-cli-disconnect.md. The hyphen before md prevents this file from being recognized as a markdown file, so it will be silently skipped during release note generation.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .server-changes/dev-cli-disconnect-md, line 1:
<comment>File extension typo: `dev-cli-disconnect-md` should be `dev-cli-disconnect.md`. The hyphen before `md` prevents this file from being recognized as a markdown file, so it will be silently skipped during release note generation.</comment>
<file context>
@@ -0,0 +1,6 @@
+---
+area: webapp
+type: feature
</file context>
There was a problem hiding this comment.
2 issues found across 4 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/webapp/app/v3/otlpAttributeLimits.ts">
<violation number="1" location="apps/webapp/app/v3/otlpAttributeLimits.ts:96">
P1: Backstop deletion order only includes exact prefix keys, so matched nested AI attribute keys are never removed.</violation>
</file>
<file name="apps/webapp/app/services/replicationErrorRecovery.server.ts">
<violation number="1" location="apps/webapp/app/services/replicationErrorRecovery.server.ts:31">
P2: This new replication recovery module is currently unused, so none of its reconnect/exit behavior is applied at runtime.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
Re-trigger cubic
| } | ||
| } | ||
|
|
||
| const sortedAiKeys = dropPriority.filter((k) => aiKeys.has(k)); |
There was a problem hiding this comment.
P1: Backstop deletion order only includes exact prefix keys, so matched nested AI attribute keys are never removed.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/webapp/app/v3/otlpAttributeLimits.ts, line 96:
<comment>Backstop deletion order only includes exact prefix keys, so matched nested AI attribute keys are never removed.</comment>
<file context>
@@ -0,0 +1,115 @@
+ }
+ }
+
+ const sortedAiKeys = dropPriority.filter((k) => aiKeys.has(k));
+
+ for (const key of sortedAiKeys) {
</file context>
| dispose(): void; | ||
| }; | ||
|
|
||
| export function createReplicationErrorRecovery( |
There was a problem hiding this comment.
P2: This new replication recovery module is currently unused, so none of its reconnect/exit behavior is applied at runtime.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/webapp/app/services/replicationErrorRecovery.server.ts, line 31:
<comment>This new replication recovery module is currently unused, so none of its reconnect/exit behavior is applied at runtime.</comment>
<file context>
@@ -0,0 +1,162 @@
+ dispose(): void;
+};
+
+export function createReplicationErrorRecovery(
+ deps: ReplicationErrorRecoveryDeps
+): ReplicationErrorRecovery {
</file context>
Fixes for PR triggerdotdev#3530:\n\n- enhance-release-pr.mjs: Fix dead try/catch block (Promise only calls resolve), use proper semver comparison instead of naive cmp function\n- release.yml: Add retry loop for npm view to handle transient registry failures. Previously silent npm errors were treated as "no latest yet", which incorrectly promoted lagged hotfixes to :latest. Now distinguishes between "npm unreachable" (fail fast) vs "no latest yet" (0.0.0 fallback).
Summary by cubic
Fixes release version detection and npm registry flakiness in the release pipeline to stop bad :latest promotions and stalled releases. Also hardens CI/release with pinned actions and vouch gating, and ships supervisor compute/tracing upgrades plus stability fixes across workers and server paths.
Bug Fixes
scripts/enhance-release-pr.mjs: proper semver comparison; remove dead try/catch.release.yml: retry/backoff fornpm view; distinguish “registry unreachable” (fail fast) vs “no latest yet” (fallback to 0.0.0).process.disconnect, and dropping packets when the channel is closed (.changeset/dev-worker-disconnect-loop.md).uncaughtExceptioninstead of drifting to max duration; runs fail fast and respect retry policy (.changeset/uncaught-exception-fail-attempt.md).TASK_RUN_UNCAUGHT_EXCEPTIONto failed status; and targeted fixes like sanitizing API 500s, RedisREADONLY/LOADINGreconnect, instant LLM pricing reload, per‑org stream basins, run-view inspector Firefox glitch fix, dev CLI disconnect auto-cancel endpoint, and session auto‑logout (.server-changes/*).CI/Release
workflow-checks.yml(actionlint + zizmor),claude-md-audit.yml, and vouch gating (vouch-check-pr.yml,vouch-manage-by-issue.yml,.github/VOUCHED.td,.vouch.yml).changesets-pr.ymlonrelease/**and.server-changes/**; create a single unified GitHub release and update it after images push; adddependabot.ymlfor actions.publish*.yml): newis_latestinput, better tagging, optional Sentry token; pass DockerHub creds to tests; adde2e-webapp.yml; unify Helm prerelease workflow (helm-prerelease.yml).Written for commit fccc2fc. Summary will update on new commits. Review in cubic