Skip to content

Add fallback for 1Password /latest endpoint outages in setup-certificate-1p#93

Merged
grgia merged 2 commits into
mainfrom
beaman-op-cli-fallback-cert-action
Jul 23, 2026
Merged

Add fallback for 1Password /latest endpoint outages in setup-certificate-1p#93
grgia merged 2 commits into
mainfrom
beaman-op-cli-fallback-cert-action

Conversation

@Beamanator

@Beamanator Beamanator commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Details

Follow-up to #84, which added the same fallback to setupGitForOSBotify. Georgia flagged in that PR that setup-certificate-1p/action.yml has the same vulnerability, and confirmed evidence exists — Ionatan hit it in an Auth PR on 2026-04-09 during a /latest outage:

Anyone knows why web-e tests in an auth PR could be failing on Setup Mirror Certificates?
Getting latest version number
error: TypeError: fetch failed
at getLatestVersion (...install-cli-action/9a0c9dd934086b7ab1d90115d455bda1c53c2bdb/dist/index.js:32673:17)

(Auth run 24194818059 / job 70625239693) — the SHA in that stack trace matches the install-cli-action pinned in setup-certificate-1p/action.yml:17 exactly.

Callers that hit this action independently of setupGitForOSBotify (i.e. would fail even after #84):

  • Expensify/App: buildIOS, buildAndroid, androidBump, various deploy jobs
  • Expensify/Web-Expensify: web-expensify, agent-zero-full-suite, agent-zero-targeted-tests, failure-rate-report
  • Expensify/Web-Secure: web-secure
  • Expensify/Auth: auth
  • Expensify/FuzzyBot: fuzzybot

Applying the same pattern here: pre-flight resolve step with S3 changelog fallback, then pass a concrete version: to install-cli-action so the flaky endpoint is skipped entirely.

Related Issues

n/a — infra resilience, no linked issue

Manual Tests

  • Confirmed the primary path: curl -sSf https://app-updates.agilebits.com/latest | jq -r '.CLI2.release.version' returns the current version when the endpoint is healthy.
  • Confirmed the fallback against the live changelog page returns 2.35.0 (the actual latest release):
    curl -sSf https://releases.1password.com/developers/cli/ \
      | grep -oE '1password-cli-[0-9]+\.[0-9]+\.[0-9]+' \
      | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' \
      | sort -u -t. -k1,1n -k2,2n -k3,3n | tail -1
    
    Anchoring on the per-release id="1password-cli-X.Y.Z" headings avoids false matches on SVG path coordinates elsewhere on the page (a loose \b2\.[0-9]+\.[0-9]+\b regex picks up 2.85714286.0 from SVG data). Sort uses POSIX numeric key sort across the three dotted fields so it works on macOS BSD sort (no -V).
  • Confirmed via the install-cli-action source that passing a concrete version: skips the flaky endpoint and downloads straight from cache.agilebits.com.

Once merged, the next run of any caller workflow will exercise the primary path end-to-end.

Linked PRs

  • #84 — same fix applied to setupGitForOSBotify/action.yml

…ate-1p

Mirror the resolve-version-then-install pattern from setupGitForOSBotify.
1password/install-cli-action hits app-updates.agilebits.com/latest to
resolve "latest" to a concrete version. When that endpoint degrades,
every workflow that calls setup-certificate-1p (App/buildIOS,
buildAndroid, androidBump, Web-Expensify tests, Web-Secure, Auth,
FuzzyBot) fails at the install step with an opaque JSON parse or
ConnectTimeout error.

Resolve the version ourselves in a pre-flight step and fall back to
scraping the S3-backed changelog at releases.1password.com when the
primary resolver is down. Pass the concrete version to install-cli-action
so it skips the flaky endpoint and downloads straight from
cache.agilebits.com.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 19e3e6d22a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread setup-certificate-1p/action.yml Outdated
sort -V is GNU-only; macOS BSD sort does not support it. This composite
action runs on macOS runners (e.g. App iOS deploys on
blacksmith-12vcpu-macos-latest), so the changelog-scrape fallback would
silently produce an empty version there. Switch to a POSIX numeric sort
across the three dotted fields.
@Beamanator

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 705ad57864

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@Beamanator
Beamanator requested a review from grgia July 22, 2026 15:52
@grgia
grgia merged commit b69b454 into main Jul 23, 2026
6 checks passed
@grgia
grgia deleted the beaman-op-cli-fallback-cert-action branch July 23, 2026 16:21
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.

2 participants