Skip to content

test(e2e): trigger e2e on feature branch#14801

Draft
osama-rizk wants to merge 12 commits intomainfrom
e2e/storage-getUrl-put-and-server-uploadData
Draft

test(e2e): trigger e2e on feature branch#14801
osama-rizk wants to merge 12 commits intomainfrom
e2e/storage-getUrl-put-and-server-uploadData

Conversation

@osama-rizk
Copy link
Copy Markdown
Contributor

@osama-rizk osama-rizk commented May 5, 2026

The getUrl PUT API surface and the server-side uploadData API are already on main; this PR adds a changeset so those API additions are properly recorded, and it gives the e2e branch a clean, meaningful diff so a PR can be opened. The matching samples-staging branch (e2e/storage-getUrl-put-and-server-uploadData) is picked up by .github/actions/setup-samples-staging to run the new Cypress tests.

Companion PR (samples-staging): https://github.com/aws-amplify/amplify-js-samples-staging/pull/1116

Description of changes

  • .changeset/storage-get-url-put.md — changeset entry for the getUrl method: 'PUT' option.
  • .github/actions/setup-samples-staging/action.yml — fix: use github.head_ref || github.ref_name so samples-staging branch matching works on pull_request events (previously fell back to main because github.ref_name is <PR>/merge on pull_request).

Issue #, if available

N/A

Description of how you validated changes

The 30 new Cypress tests on the companion samples PR cover:

  • Client getUrl (PUT): 5 tests × 2 (auth / unauth) = 10
  • Server uploadData: 6 tests × 2 = 12
  • Server get-url-put: 4 tests × 2 = 8

✅ E2E verification:

  • run 25446494300 — storage-only e2e run. All 190 tests passed in integ_next_storage (0 failing, 0 pending). Inspected logs confirm each new describe (UnAuth/Auth - getUrl (PUT) client, server uploadData, server get-url-put) executed and passed.
  • run 25485721826 — full e2e matrix (all categories, including storage).

Note on integ_react_storage_internal timeouts in run 25485721826: This job was cancelled at the 35-min budget because 6 pre-existing flaky tests in storage-gen2-internal.spec.js (image-rendering assertions against the seeded amplify.png fixture) fail under the 60s Cypress retry, multiplied by retry_count: 10. The failures are unrelated to this PR:

  • This PR does not modify storage-gen2-internal sample, storage-gen2-internal.spec.js, or the amplify.png fixture.
  • The same job has flaked on main in recent Release Latest runs with no code from this PR involved (e.g. runs 25388038581, 25165889557).
  • The storage-gen2 and storage-gen2-internal samples share the storagecypress sandbox identifier, which creates a race condition on amplify.png when the two jobs run in parallel — a pre-existing infrastructure issue.

Checklist

  • PR description included
  • yarn test passes
  • Unit Tests are changed or added (e2e coverage via companion PR)
  • Relevant documentation is changed or added (N/A — API surface already present)

Checklist for repo maintainers

  • Verify E2E tests for existing workflows are working as expected or add E2E tests for newly added workflows
  • New source file paths included in this PR have been added to CODEOWNERS, if appropriate

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

The getUrl PUT API surface is already on main but lacked a changeset.
Adding one here also gives the e2e branch a clean, meaningful diff so a
PR can be opened and the matching samples-staging branch
(e2e/storage-getUrl-put-and-server-uploadData) is picked up by
.github/actions/setup-samples-staging to run the new Cypress tests for
getUrl (PUT) and server-side uploadData.
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 5, 2026

🦋 Changeset detected

Latest commit: ef35011

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@aws-amplify/storage Minor
aws-amplify Minor
@aws-amplify/predictions Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@osama-rizk osama-rizk changed the title test(e2e): add changeset for getUrl PUT to trigger e2e on feature branch test(e2e): trigger e2e on feature branch May 5, 2026
@osama-rizk osama-rizk added the run-tests run the pr-label workflow label May 5, 2026
osama-rizk added 2 commits May 5, 2026 15:17
This branch only touches storage. Narrowing the e2e matrix from 126
tests to the 7 storage tests gives much faster feedback on the new
getUrl (PUT) and server-side uploadData e2e specs.

Two TEMPORARY changes — must be reverted before merging to main:
- INTEG_CONFIG is post-filtered with jq to category == "storage".
- DETOX_INTEG_CONFIG is forced to [] (native detox samples are
  unaffected by JS storage changes on this branch), and the
  detox-e2e-test-runner job is guarded with 'if: fromJSON(...)[0]
  != null' to avoid running with an empty matrix.

Both original lines are preserved in comments next to the changes.
Adds a branch-name bypass in pr-label.yml so every push to
e2e/storage-getUrl-put-and-server-uploadData retriggers e2e via the
pull_request 'synchronize' event, without needing to re-apply the
'run-tests' label each time. Every other PR continues to require the
label as before.

TEMPORARY — must be reverted before merging to main (the added OR
clause on the setup job's 'if:' condition is clearly commented inline).
@osama-rizk osama-rizk removed the run-tests run the pr-label workflow label May 5, 2026
osama-rizk and others added 5 commits May 5, 2026 15:51
github.ref_name evaluates to '<PR_number>/merge' for pull_request events
(e.g. '14801/merge'), so the ls-remote lookup for a same-named branch on
amplify-js-samples-staging never matches and the action silently falls
back to main. This means the branch-matching mechanism has been a no-op
for all PR-triggered e2e runs — tests always execute against
samples-staging main instead of the matching feature branch.

Fix: prefer github.head_ref (set to the PR head branch on pull_request
events) and fall back to github.ref_name for push events where head_ref
is unset.

Observed today on run 25378838096 (PR #14801): prebuild-samples-staging
log printed "Branch '14801/merge' does not exist" and the run went on
to execute only the tests that exist on samples-staging main.
Forces prebuild-samples-staging to re-checkout the feature branch with
the latest fixes (describe.only removal on storage-gen2 spec and
cy.intercept removal on server-side uploadData happy-path tests).
@osama-rizk osama-rizk added the run-tests run the pr-label workflow label May 6, 2026
osama-rizk added 3 commits May 7, 2026 10:47
Goal: isolate whether new tests in the companion samples-staging PR
cause integ_react_storage_internal timeouts. Storage-only filter keeps
feedback loop short while investigating.

Matches the .skip'd describes pushed on samples-staging
(a93624e5 on e2e/storage-getUrl-put-and-server-uploadData).

TEMPORARY: Revert before merging to main.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-tests run the pr-label workflow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant