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

FIX: If #32

Merged
merged 14 commits into from
Sep 29, 2022
Merged

FIX: If #32

merged 14 commits into from
Sep 29, 2022

Conversation

larsoner
Copy link
Collaborator

@asmeurer can you try this? It might work. The job title is in the context, so if I got the conditional right I think it should only run for the correct status(es).

@asmeurer
Copy link
Contributor

This seems similar to what I tried at sympy/sympy#23732 and sympy/sympy#23801, but maybe I misunderstood the YAML syntax (I used "Build Docs Preview" instead of "build_docs" because that is what I named the job in my circle CI config).

@larsoner
Copy link
Collaborator Author

I would recommend you dump the event like we do here to see what it's actually called:

https://github.com/larsoner/circleci-artifacts-redirector-action/blob/ecc5ada864e38a28a3a1a28588d39459793bccfa/.github/workflows/status.yml#L14-L17

I don't see why it wouldn't work if you have the variable names correct. for 9eceb30 there is more than just the CircleCI job, but our actions list only shows 3 jobs (circle waiting, then running/pending, then success I think):

https://github.com/larsoner/circleci-artifacts-redirector-action/actions

This is (I think) because of the line in master:

https://github.com/larsoner/circleci-artifacts-redirector-action/blob/master/.github/workflows/status.yml#L5

@larsoner
Copy link
Collaborator Author

Well not 100% success on MNE-Python, but at least now they show as skipped:

Screen Shot 2022-09-12 at 6 16 15 PM

@larsoner
Copy link
Collaborator Author

@asmeurer you'll also want to add the conditional about the "check URL" step as it's not valid until the job completes. So if you try to check it while the job is in the "pending" state, it will fail

Comment on lines +47 to +50
- The action has an outtput ``url`` that you can use in downstream steps, but
this URL will only point to a valid artifact once the job is complete, i.e.,
`github.event.status` is either `'success'`, `'fail'`, or (maybe) `'error'`,
not `'pending'`.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

asmeurer added a commit to asmeurer/sympy that referenced this pull request Sep 13, 2022
This is a continuation of sympy#23732 and
sympy#23801 based on the instructions at
scientific-python/circleci-artifacts-redirector-action#32.

Assuming it works this time, it will fix
sympy#23784 (but there's no way to know if it
works until merging it).
@asmeurer
Copy link
Contributor

OK, well if you got it working, that's a little more promising. I'm trying it at SymPy here, but there's no way to know if it will work until that is merged and a few other CI builds on other PRs happen.

@asmeurer
Copy link
Contributor

It didn't seem to work.

@larsoner
Copy link
Collaborator Author

To be clear, this is what I consider "working":

https://github.com/mne-tools/mne-python/actions

Screenshot from 2022-09-28 17-34-28

So some are at least skipped. Do you not get this using a similar output when doing something like:

https://github.com/mne-tools/mne-python/blob/b486ef18f74d22b7bdcd0cf6f0e1a8fb988d5e35/.github/workflows/circle_artifacts.yml#L4

@asmeurer
Copy link
Contributor

This is what our actions log looks like https://github.com/sympy/sympy/actions

Screen Shot 2022-09-28 at 4 23 22 PM

(the skipped "report CI results to PR" run in that log is a different build). And this is our build file https://github.com/sympy/sympy/blob/master/.github/workflows/docs-preview.yml. The only difference I see is I renamed the build to "Build Docs Preview", so maybe I somehow messed up the reference there?

Of course, showing as skipped is better than failed, but the ideal solution would be if it didn't show up at all. I don't know if that's possible. Otherwise, the "actions" tab becomes completely useless, because the "real" builds are buried under hundreds of skipped Circle CI redirector builds.

@larsoner
Copy link
Collaborator Author

The only difference I see is I renamed the build to "Build Docs Preview", so maybe I somehow messed up the reference there?

I wonder if the spaces are problematic or something 😞

Of course, showing as skipped is better than failed, but the ideal solution would be if it didn't show up at all. I don't know if that's possible.

It does not seem possible currently, see #27 (comment)

I'll merge this since it seems to work in a few places at least, as the SciPy variant implemented in scipy/scipy#17018 seems to be working as well:

Screenshot from 2022-09-29 10-59-07

@larsoner larsoner merged commit 6f28cca into master Sep 29, 2022
@larsoner larsoner deleted the readme branch September 29, 2022 15:00
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.

2 participants