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

Prevent concurrent main deployments #592

Merged
merged 1 commit into from
Jun 5, 2024

Conversation

geichelberger
Copy link
Contributor

Skip unnecessary deployments in progress to lower the CO2 footprint and avoid errors because of concurrency.

Based on example: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-only-cancel-in-progress-jobs-or-runs-for-the-current-workflow

Error: Creating Pages deployment failed
Error: HttpError: Deployment request failed for 98ee67b8c0d72b912a763192679bb61269c2c300 due to in progress deployment. Please cancel d01107971c7d484019a882c5db16e77a46ef05f1 first or wait for it to complete.
    at /home/runner/work/_actions/actions/deploy-pages/v4/node_modules/@octokit/request/dist-node/index.js:124:1
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at createPagesDeployment (/home/runner/work/_actions/actions/deploy-pages/v4/src/internal/api-client.js:125:1)
    at Deployment.create (/home/runner/work/_actions/actions/deploy-pages/v4/src/internal/deployment.js:74:1)
    at main (/home/runner/work/_actions/actions/deploy-pages/v4/src/index.js:30:1)
Error: Error: Failed to create deployment (status: 400) with build version 98ee67b8c0d72b912a763192679bb61269c2c300. Request ID E0C1:AFE82:572582F:998661F:665F7F96 Responded with: Deployment request failed for 98ee67b8c0d72b912a763192679bb61269c2c300 due to in progress deployment. Please cancel d01107971c7d484019a882c5db16e77a46ef05f1 first or wait for it to complete.

https://github.com/opencast/opencast-admin-interface/actions/runs/9374093827/job/25809387792

Skip unnecessary deployments in progress to lower the CO2 footprint and
avoid errors because of concurrency.
@geichelberger geichelberger added the type:github_actions Pull requests that update GitHub Actions code label Jun 5, 2024
Copy link
Contributor

github-actions bot commented Jun 5, 2024

This pull request is deployed at test.admin-interface.opencast.org/592/2024-06-05_07-26-28/ .
It might take a few minutes for it to become available.

Copy link
Contributor

github-actions bot commented Jun 5, 2024

Use docker or podman to test this pull request locally.

Run test server using develop.opencast.org as backend:

podman run --rm -it -p 127.0.0.1:3000:3000 ghcr.io/opencast/opencast-admin-interface:pr-592

Specify a different backend like stable.opencast.org:

podman run --rm -it -p 127.0.0.1:3000:3000 -e PROXY_TARGET=https://stable.opencast.org ghcr.io/opencast/opencast-admin-interface:pr-592

It may take a few seconds for the interface to spin up.
It will then be available at http://127.0.0.1:3000.
For more options you can pass on to the proxy, take a look at the README.md.

Copy link
Member

@ziegenberg ziegenberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks legit

@ziegenberg ziegenberg merged commit 07b75c5 into opencast:main Jun 5, 2024
7 checks passed
@ziegenberg ziegenberg self-assigned this Jun 5, 2024
@ziegenberg ziegenberg added type:infrastructure Build process, deployment, workflows and removed type:github_actions Pull requests that update GitHub Actions code labels Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:infrastructure Build process, deployment, workflows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants