test(e2e): trigger e2e on feature branch#14801
Draft
osama-rizk wants to merge 12 commits intomainfrom
Draft
Conversation
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 detectedLatest commit: ef35011 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
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).
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).
This reverts commit 5ab389a.
…branch" This reverts commit 10ea8ae.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
getUrlPUT API surface and the server-sideuploadDataAPI are already onmain; 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-stagingto 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 thegetUrlmethod: 'PUT'option..github/actions/setup-samples-staging/action.yml— fix: usegithub.head_ref || github.ref_nameso samples-staging branch matching works onpull_requestevents (previously fell back tomainbecausegithub.ref_nameis<PR>/mergeonpull_request).Issue #, if available
N/A
Description of how you validated changes
The 30 new Cypress tests on the companion samples PR cover:
getUrl (PUT): 5 tests × 2 (auth / unauth) = 10uploadData: 6 tests × 2 = 12get-url-put: 4 tests × 2 = 8✅ E2E verification:
integ_next_storage(0 failing, 0 pending). Inspected logs confirm each new describe (UnAuth/Auth - getUrl (PUT)client, serveruploadData, serverget-url-put) executed and passed.Note on
integ_react_storage_internaltimeouts in run 25485721826: This job was cancelled at the 35-min budget because 6 pre-existing flaky tests instorage-gen2-internal.spec.js(image-rendering assertions against the seededamplify.pngfixture) fail under the 60s Cypress retry, multiplied byretry_count: 10. The failures are unrelated to this PR:storage-gen2-internalsample,storage-gen2-internal.spec.js, or theamplify.pngfixture.mainin recent Release Latest runs with no code from this PR involved (e.g. runs25388038581,25165889557).storage-gen2andstorage-gen2-internalsamples share thestoragecypresssandbox identifier, which creates a race condition onamplify.pngwhen the two jobs run in parallel — a pre-existing infrastructure issue.Checklist
yarn testpassesChecklist for repo maintainers
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.