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

Should the Docker workflow run only when the CI tests are successful #3198

Closed
allgandalf opened this issue Jul 20, 2023 · 3 comments
Closed

Comments

@allgandalf
Copy link
Collaborator

Description

From what I have observed in GitHub Actions of Pecan repository, the Docker workflow takes the most amount of resources in terms of API usage and run time.

Proposed Solution

I'm not 100% sure but i think that we should run the docker workflow only if the CI workflow is completed and successful

This can save us the github action resources and there by reducing the API limit error to a great extent.

Documentation of this featrure can be found here

The basic changes in the docker workflow file would be somewhat like the example below:

on:
  workflow_run:
    workflows: [CI]
    types: [completed]

jobs:
  on-success:
    runs-on: ubuntu-latest
    if: ${{ github.event.workflow_run.conclusion == 'success' }}
    steps:
      - run: echo 'The triggering workflow passed'
  on-failure:
    runs-on: ubuntu-latest
    if: ${{ github.event.workflow_run.conclusion == 'failure' }}
    steps:
      - run: echo 'The triggering workflow failed'

I am not sure if there is any downside to this feature or how much negative impact this can have on our current system, so want some suggestions from the community on this proposal.

@robkooper @infotroph @mdietze

@allgandalf allgandalf changed the title Should the Docker workflow run after the CI tests are successful Should the Docker workflow run only when the CI tests are successful Jul 20, 2023
@mdietze
Copy link
Member

mdietze commented Jul 20, 2023

Just to throw out the pros/cons, the obvious disadvantage of this approach is that it is going to roughly double the clock time on all tests.

@allgandalf
Copy link
Collaborator Author

There is a trade-off between time and optimization, I am still insisting to go with optimization as the tests are failing more frequently due to the API rate limit, but again one of the biggest concern is the additional time required :)

@allgandalf
Copy link
Collaborator Author

This issue is been further discussed in #3210, so closing this one to keep a single medium and source of communication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants