Skip to content
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

New deployment isn't connected to a backend on the console by default. #13686

Closed
2 tasks done
duckbytes opened this issue Mar 31, 2024 · 3 comments
Closed
2 tasks done
Assignees
Labels
hosting Issues tied to hosting category pending-response Issue is pending response from the issue author pending-triage Issue is pending triage

Comments

@duckbytes
Copy link

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

image

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 return branch.backendEnvironmentArn straight away without any manual intervention.

Reproduction steps

  • Connect to a GitHub repository on the Amplify console.
  • Set up branch pattern matching to production/**
  • Deploy a new branch by checking it out and pushing it up.
  • Observe on the amplify console the new deployment.

Project Identifier

2b5bca2df2d2fa50161f43dec1f15951

Log output

# Put your logs below this line


Additional information

No response

Before submitting, please confirm:

  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • I have removed any sensitive information from my code snippets and submission.
@duckbytes duckbytes added the pending-triage Issue is pending triage label Mar 31, 2024
@ykethan
Copy link
Member

ykethan commented Apr 15, 2024

Hey @duckbytes, apologies on the delay in a response. Did a quick test did not observe this behavior. For technical support and deeper dive into the project on Amplify hosting, we encourage you to open a case with AWS technical support if you have AWS support plan. If you do not have an active AWS support plan, we encourage you to leverage our Amplify community Discord server where community members and staff try to help each other with Amplify.

@ykethan ykethan added hosting Issues tied to hosting category pending-response Issue is pending response from the issue author labels Apr 15, 2024
@ykethan
Copy link
Member

ykethan commented May 7, 2024

Closing the issue due to inactivity. Do reach out if you require any assistance with Amplify CLI.

@ykethan ykethan closed this as not planned Won't fix, can't repro, duplicate, stale May 7, 2024
Copy link

github-actions bot commented May 7, 2024

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hosting Issues tied to hosting category pending-response Issue is pending response from the issue author pending-triage Issue is pending triage
Projects
None yet
Development

No branches or pull requests

3 participants