awslabs / app-development-for-backstage-io-on-aws

A developer portal to meet your Enterprise needs. Fast, secure, and at-scale.
https://opaonaws.io/
Apache License 2.0
158 stars 28 forks source link

Deploy a Serverless Application to Multi-Provider environment fails due to Git rejection #76

Open arditti opened 4 months ago

arditti commented 4 months ago

Description

Deploy a Serverless Application to Multi-Provider environment fails due to Git rejection:

$ git status
HEAD detached at 996d389
Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
    modified:   catalog-info.yaml
Untracked files:
  (use "git add <file>..." to include in what will be committed)
    ../.iac/cdk-output.json
    ../.iac/cdk-output.properties
    ../.iac/cdk.out/
    ../.iac/yarn.lock
    ../aws/
    ../cicd/
$ if [[ "$UPDATE_COUNT" -gt "0" ]]; then git commit -m "updating entity details" --quiet; fi
$ if [[ "$UPDATE_COUNT" -gt "0" ]]; then git push -o ci.skip https://oauth2:$ACCESS_TOKEN@$ci_server_host/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME HEAD:main; fi
warning: redirecting to https://<MY_DOMAIN>/aws-app/service-sls-rest-api-4.git/
To https://<MY_DOMAIN>/aws-app/service-sls-rest-api-4
 ! [rejected]        HEAD -> main (non-fast-forward)
error: failed to push some refs to 'https://<MY_DOMAIN>/aws-app/service-sls-rest-api-4'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and integrate the remote changes
hint: (e.g. 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

Versions

OPA 0.31

Reproduction Code [Required]

Steps to reproduce the behavior:

  1. create Serverless provider in region us-east-1
  2. create Serverless provider in region us-east-2
  3. create Serverless environment attached to single provider
  4. update the environment, and attach the second provider (total of 2 providers)
  5. Create a Serverless Application, tested Serverless REST API (TypeScript)

Expected behavior

Application been deployed on both Providers

image