question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deployment failed due to invalid state

See original GitHub issue

I am getting the following error in case I push 2 commits in a very small duration. The first commit gets deployed successfully, however, the second commit fails because the EBS state from the first commit is still not in the ready state.

Is there any potential solution to this problem?

[error]Deployment failed: Error: Status: 400. Code: InvalidParameterValue, Message: Environment named bis-prod is in an invalid state for this operation. Must be Ready.

Here is the script I am using

 - name: Beanstalk Deploy
      uses: einaregilsson/beanstalk-deploy@v9
      with:
        # AWS Access Key
        aws_access_key: {{my-key}}
        # AWS Secret Key
        aws_secret_key: {{my-secret}}
        # AWS Region
        region: us-west-1
        # Beanstalk application name
        application_name: {{app-name}}
        # Beanstalk environment name
        environment_name: {{my-env}}
        # Version label for new Beanstalk version
        version_label: "${{ steps.timestamp.outputs.date }}"
        # Zip file with the version to deploy. If skipped the action will deploy existing version.
        deployment_package: {{package-name}}
        # If set to "true" then the action will deploy an existing version with the given version_label if it already exists, but otherwise create the version and deploy it.
        use_existing_version_if_available: false
        # Whether the action should wait for the deployment to finish and log status messages during the wait. Default is "true". If set to "false" the action will start the deployment on Beanstalk and then exit.
#         wait_for_deployment: # optional
        # How many seconds to wait for the environment to return to Green state after deployment is finished. Default is 30 seconds.
        wait_for_environment_recovery: 600

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
einaregilssoncommented, Sep 24, 2020

Closing this issue, don’t think it’s a fix that should be made in an individual action, rather it’s a change that GitHub would have to do in how their actions are scheduled.

1reaction
dnorth98commented, Aug 19, 2020

This is an underlying issue with GitHub actions rather than this specific action (and it’s the only thing keeping me moving all our deployments to GH actions). Almost all CI/CD systems will queue executions from the same branch…alas, GH actions doesn’t. And as noted, any solution which “busy-waits” is just burning minutes.

It’s too bad, this action is brilliant but can’t work in a fast paced environment with many commits being merged to a mainline within a short duration of each other

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cartridge Deployment Fails with Error "Unable to deploy ...
Cartridge Deployment Fails with Error "Unable to deploy PersistenceUnit [default] in invalid state" (Doc ID 2645135.1).
Read more >
Troubleshoot Firepower Threat Defense Policy Deployments
Due to its Vague nature, it is written as the fallback to state that an unknown connectivity error has occurred.
Read more >
Failed to deploy VM: vim.fault.InvalidState
Hi, I've recently installed VMWare ESxi 6.7 and am trying to import an OVA file. However, I keep getting the error, " Failed...
Read more >
AWS: Environment named *** is in an invalid state for this ...
I am unable to deploy. The server status is running, no warnings. My experience is very limited at this point. How can I...
Read more >
Troubleshoot common Azure deployment errors
Error code Mitigation More inform... AccountNameInvalid Follow naming guidelines for storage accounts. Resolve erro... AccountPropertyCannotBeSet Check available storage account properties. storageAcco... AnotherOperationInProgress Wait for concurrent operation...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found