Skip to content

Limit ci runtime / cancel redundant jobs#904

Closed
ischoegl wants to merge 1 commit into
Cantera:mainfrom
ischoegl:limit-ci-runtime
Closed

Limit ci runtime / cancel redundant jobs#904
ischoegl wants to merge 1 commit into
Cantera:mainfrom
ischoegl:limit-ci-runtime

Conversation

@ischoegl
Copy link
Copy Markdown
Member

@ischoegl ischoegl commented Jul 13, 2020

Changes proposed in this pull request

Same as #894 (after force-pushing while PR was closed I can no longer reopen)

  • reduce time-out limit
  • cancel redundant jobs

If applicable, fill in the issue number this pull request is fixing

Fixes #893

Checklist

  • There is a clear use-case for this code change
  • The commit message has a short title & references relevant issues
  • Build passes (scons build & scons test) and unit tests address code coverage
  • The pull request is ready for review

Thoughts

Per @bryanwweber's comment

One of the things I've seen in some of the Issues on these actions is is that the person doing the push has to have enough rights to cancel the workflow run in the GUI for them to work correctly. I saw a few comments recommending alternate actions that appeared to work better, but I can't recall where anymore

@ischoegl ischoegl force-pushed the limit-ci-runtime branch 3 times, most recently from f11825b to e7abd55 Compare July 13, 2020 17:01
@ischoegl ischoegl closed this Jul 13, 2020
@ischoegl ischoegl mentioned this pull request Jul 13, 2020
4 tasks
@ischoegl
Copy link
Copy Markdown
Member Author

ischoegl commented Jul 13, 2020

Based on comments by @bryanwweber in #894, it appears that there are some restrictions connected to user privileges that may prevent this PR from working as intended (it is pushed from a fork by a contributor without access privileges to the main repo). I.e. while there is no guarantee for this to work, further investigations may have to be run from a branch on the main repository.

I.e. I am reopening this PR for a developer/maintainer to follow up on.

- Coverage run limited to 360 minutes
- All other runs limited to 60 minutes
- Cancel redundant jobs
- Add `repository_dispatch` field
@ischoegl
Copy link
Copy Markdown
Member Author

ischoegl commented Sep 3, 2020

@bryanwweber ... I rebased and cleaned this up now that 2.5.0b1 is out: I also found a comment that this may only work on the default branch (see linked pages in PR description). I confirmed that this still doesn't work despite sticking to the example. Looking at the actions output, I get:

Run technote-space/auto-cancel-redundant-job@v1

==================================================
Version:  technote-space/auto-cancel-redundant-job@v1.4.4
          852c8bea53e4df5acd92f379bd956ec8d957cfb2
Event:    pull_request
Action:   synchronize
sha:      bd6d0cc1ff29cb68a02350003c99ca3ce740cc27
ref:      refs/pull/904/merge
Labels:
owner:    Cantera
repo:     cantera

Dump context
Dump Payload
==================================================

> run id: 237694615
> workflow id: 484
target event: pull_request
target branch: limit-ci-runtime

> current run not found

Edit: one job apparently tried to cancel, but errored ....

This may be linked to the following note on repository_dispatch here:

Note: This event will only trigger a workflow run if the workflow file is on the master or default branch.

Per previous discussion, I believe it may be good from a sustainability viewpoint to cancel redundant jobs - lots of CPU time wasted.

@ischoegl
Copy link
Copy Markdown
Member Author

ischoegl commented Dec 2, 2020

Could not get this to run on one of my own repos either. Closing

@ischoegl ischoegl closed this Dec 2, 2020
@ischoegl ischoegl deleted the limit-ci-runtime branch January 29, 2021 18:49
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

Successfully merging this pull request may close these issues.

CI has excessive timeout / does not cancel redundant jobs

2 participants