-
Notifications
You must be signed in to change notification settings - Fork 825
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
Updates to Fargate/Container-Based API Services Not Reflected After Purported Successful Redeployment #6684
Comments
+1 for this. Really annoying. Downloading the zip from S3 makes it pass the error but doesn't update anyways. |
+1 for being a annoying bug Here is a workaround I found.
|
This commit adds logic to rebuild container based APIs during push if necessary. Refs: #6684 Co-authored-by: Colin Ihrig <colihrig@amazon.com>
amplify-cli/packages/amplify-nodejs-function-runtime-provider/src/utils/legacyPackage.ts Line 7 in eb9257e
I believe this is the bug. This if condition should evaluate to
So the if evaluates to |
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs. Looking for a help forum? We recommend joining the Amplify Community Discord server |
Describe the bug
When I update the source for a given Fargate/Container-based API service, the CLI fails to repackage the distribution asset. Instead, the CLI appears to upload the existing
latest-build.zip
asset that was generated upon initial deployment. As a result, none of the changes made to the service are thereafter present in production.Building and pushing the image to ECR locally solves the issue. See also additional context below.
Amplify CLI Version
4.44.0
To Reproduce
Expected behavior
Once the CLI determines that an update is needed, the CLI repackages the distribution asset, and, thereafter, uploads the newly repackaged asset to S3.
Desktop (please complete the following information):
Additional context
Notably, all signifiers point to a successful redeployment—with the notable exception described above—making the issue quite insidious and likely to frustrate users. Indeed, the asset object on S3 shows that it has been recently modified, reflecting that the CLI successfully uploaded something. CodePipeline is successfully triggered; a build is executed and a new version of the image is pushed to ECR. Thereafter, Fargate successfully swaps out the existing container for one based on the newly generated image. The CLI finishes and everything looks copacetic.
@manueliglesias and I confirmed that the source stored on S3 does not reflect the anticipated changes. Further, the modified date for the
latest-build.zip
in the service directory locally appears to reflect the time that the service was initially deployed.Potentially related to #6359, although, in this case, the CLI appropriately recognizes that an update is needed and purports to move forward as expected.
The text was updated successfully, but these errors were encountered: