Skip to content

fix: prevent Not Found error caused by unreachable or stale base SHA#37

Open
melissag-ensemble wants to merge 3 commits into
mainfrom
ref-not-found-push-deploy
Open

fix: prevent Not Found error caused by unreachable or stale base SHA#37
melissag-ensemble wants to merge 3 commits into
mainfrom
ref-not-found-push-deploy

Conversation

@melissag-ensemble
Copy link
Copy Markdown
Contributor

@melissag-ensemble melissag-ensemble commented May 19, 2026

Description

Fixes two issues with tj-actions/changed-files:

  1. Unreachable SHA — the shallow clone (fetch-depth: 1) couldn't reach the base SHA, causing changed-files to fail with "Not Found". Fixed by unshallowing only when a base SHA needs to be reached.
  2. Stale base SHA — the lookup filtered to workflow_dispatch runs only, so on a push event it used a stale base, diffing a much larger range than necessary and re-deploying unchanged files. Fixed by looking up the latest successful deploy of any trigger.

Reverts #36, which masked the crash with fetch-depth: 0 but broke incremental deploys.

Ticket

https://jira.corp.adobe.com/browse/DEVSITE-2380

Test

Version Before After
v1 run v1 before run v1 after
v2 run v2 before run Screenshot 2026-05-19 at 6 56 25 PM Screenshot 2026-05-19 at 6 56 16 PM

@melissag-ensemble melissag-ensemble force-pushed the ref-not-found-push-deploy branch 3 times, most recently from a87c4d1 to 1b8e0fd Compare May 19, 2026 23:31
@melissag-ensemble melissag-ensemble changed the title fix: skip stale base SHA on push events to prevent Not Found error fix: prevent Not Found error caused by stale or unreachable base SHA May 20, 2026
@melissag-ensemble melissag-ensemble force-pushed the ref-not-found-push-deploy branch from 1b8e0fd to 977f048 Compare May 20, 2026 00:57
@melissag-ensemble melissag-ensemble force-pushed the ref-not-found-push-deploy branch from 977f048 to c819f0a Compare May 20, 2026 01:04
@melissag-ensemble melissag-ensemble marked this pull request as ready for review May 20, 2026 02:14
@melissag-ensemble melissag-ensemble requested a review from timkim May 20, 2026 02:14
@melissag-ensemble melissag-ensemble changed the title fix: prevent Not Found error caused by stale or unreachable base SHA fix: prevent Not Found error caused by unreachable or stale base SHA May 20, 2026
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