-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Amplify CI/CD Builds are Broken and Unreliable #2957
Comments
UpdateSo, I did some reverse-engineering. I found something weird - don't know how important or helpful it is...but worth reporting. Step 1Added
Step 2Inspected the script - as extracted directly from the environment Noticed that it executes some command called So...same thing: added
Step 3Inspected the envCache script - as extracted directly from the environment Who can tell me what's wrong with this script? (I formatted it a bit for readability/cleanliness)
It looks to me like this line is wrong: I'm guessing this is the code that should be there instead:
Would appreciate any feedback or input. Thank you! |
Update Number 2I added a line to echo timestamps out from my This helps me to confirm that we're definitely seeing two separate instances of the post-push hooks running...see below for (a truncated set of) logs from my last CI/CD run. I also figured out that this is the exact command that's invoked when all of this starts:
See below for the duplicate post-push hook invocations...
|
Hi @armenr thanks for raising this issue and for providing details of your findings. We are looking into this and will update you shortly. |
Before opening, please confirm:
App Id
d3rtqmm3xlsvys
Region
us-west-2
Amplify Hosting feature
Backend builds, Build settings, Custom builds
Describe the bug
Builds are completely erratic and unpredictable when you have prior broken builds.
The same
amplifyPush
command (and its hooks) run multiple times in the CI/CD pipeline, totally inexplicably.I am attaching a github repo with its commit history + each of the CI/CD build logs that go with the commits.
You will see as the CI/CD pipeline grows increasingly erratic/broken.
This is a critical, serious bug. I've now reproduced it on 3 different Amplify applications - and frankly, I worry about doing ANYTHING that's mission-critical or customer-facing with this kind of instability in the build pipeline.
Please see the "Reproduction steps" below for a full history of the code, the commits, and the build logs for each commit.
Expected behavior
As a customer, I expect that:
amplify.yml
)amplify.yml
without any unexpected or duplicate command/step executionsReproduction steps
My reproduction repo: https://github.com/armenr/amplify-bug-repro-2
Full reproduction steps
cd vitesse bug-repro-amplify && npx taze major && pnpm i
amplify.yml
scripts/*
(everything in the scripts folder)./scripts/init-headless.sh <YOUR_NAMED_AWS_PROFILE> <YOUR_DESIRED_AMPLIFY_APP_NAME
pre-
/post-
amplify hook scripts toamplify/hooks
after initializing the Amplify appamplify push
-es the hooks and everything in theamplify/
folder up to the Amplify backendgit commit -am "initial commit" && git push
"lint:fix": "eslint . --fix",
--> add topackage.json
.eslintignore
"build:ssg": "vite-ssg build",
--> add topackage.json
"build:std": "vite build",
--> add topackage.json
BUILD LOGS
Really concerning things:
Build Settings
The text was updated successfully, but these errors were encountered: