New deployment isn't connected to a backend on the console by default. #13686
Labels
hosting
Issues tied to hosting category
pending-response
Issue is pending response from the issue author
pending-triage
Issue is pending triage
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
16
Amplify CLI Version
12.10.1, 12.8.2
What operating system are you using?
Linux
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No manual changes made
Describe the bug
I'm deploying new backends to a single app using pattern matched branch detection. On pushing a new branch, the resources are successfully deployed, however on the console there is no listed backend associated with the hosting environment. Looking in the logs I can see the name of the backend environment, and subsequent pushes still successfully trigger a build.
When running the command:
aws amplify get-branch --app-id "$APP_ID" --branch-name "$BRANCH_NAME" | jq -r ".branch.backendEnvironmentArn"
This returns no value because branchEnvironmentArn is not returned. However if I go to the console and click (Edit) on the new Hosting environment, I can manually set it to the new backend. Once that is done, the command successfully returns data.
The reason I need this data is because I'm making changes to my github action so that it returns data including the environment name and graphql endpoint. The action doesn't work until I make the manual change in the console and run the workflow again.
For reference this is the bash script that gets this data: https://github.com/duckbytes/amplify-build-status/blob/get_env_name/entrypoint.sh Function
get_backend_env_name
fails to get the env name.My amplify.yml file https://github.com/platelet-app/platelet/blob/production/another.platelet.app/amplify.yml
Here you can see the top environment has a backend, but the new branch below only says "deploys set up (Edit)".
I've tried with both the default amplify version (which seems to be at 12.8.2) and with an override to 12.10.1
Expected behavior
I expect the command
aws amplify get-branch --app-id "$APP_ID" --branch-name "$BRANCH_NAME"
to returnbranch.backendEnvironmentArn
straight away without any manual intervention.Reproduction steps
production/**
Project Identifier
2b5bca2df2d2fa50161f43dec1f15951
Log output
Additional information
No response
Before submitting, please confirm:
The text was updated successfully, but these errors were encountered: