Skip to content

TST: Remaining GitHub Actions actions #11038

Closed

Description

@pllim

Description

Remaining things to port from .travis.yml:

From .circleci/config.yml:

Things already in Actions we need to fix:

Additional ideas:

Additional context

I milestoned this issue because ideally we should sort everything out by 4.3 release.

See #10388 for more info (e.g., pros, cons, related links).

Activity

  1. added this to the v4.3 milestone on Nov 13, 2020
  2. Cadair commented on Nov 13, 2020

    @Cadair
    Member

    I don't think the current implementation of artifacts on GH actions are up to replacing circle at this point.

  3. astrofrog commented on Nov 13, 2020

    @astrofrog
    Member

    We could probably move the 32-bit job over though?

  4. pllim commented on Nov 13, 2020

    @pllim
    MemberAuthor

    Just to clarify, not everything in CircleCI has to port over. I am just putting them up there for discussion. "Won't fix" is an acceptable answer if current solution is sustainable and is working.

  5. saimn commented on Nov 13, 2020

    @saimn
    Contributor
  6. pllim commented on Nov 14, 2020

    @pllim
    MemberAuthor

    Re: #11038 (comment)

    Thanks, @saimn ! Personally, I still find it ridiculous that Actions does not support that natively and we have to rely on third-party apps.

  7. pllim commented on Nov 14, 2020

    @pllim
    MemberAuthor

    @Zac-HD , any advise on how to cache .hypothesis properly on GitHub Actions? Thanks!

  8. astrofrog commented on Nov 14, 2020

    @astrofrog
    Member
  9. Zac-HD commented on Nov 14, 2020

    @Zac-HD
    Contributor

    Yep, that's how I'd do it!

    The simple option: just cache .hypothesis. That's it; it'll work just fine - in fact Hypothesis works fine without any cache at all.

    More complex: you could also use the restore-keys option to ensure that the cache was specific to the current branch and/or Python version and/or Hypothesis version. This could in principle help because it avoids Hypothesis evicting failing examples which are specific to a different job, but I'm not sure it's worth the extra complexity.

  10. embray commented on Nov 15, 2020

    @embray
    Member

    Something I discovered since the switchover which is frustrating (if I understand correctly) it seems that each "check" performed by tox is performed in a single job. So if one check fails (e.g. remote data) I can't re-run that one check since it's not a separate job.

    Update: @pllim I see you already addressed this by adding a separate allowed_fail job containing, for now, the remote data tests. That might be good enough for most cases.

    I wonder if GH Actions allows reuse though, as that would seem to make it easier to create separate jobs with less duplication. GitLab CI's file format is very nice in this regard; I have to study how reuse is enabled in GH Actions, if at all...

  11. embray commented on Nov 15, 2020

    @embray
    Member

    OK, apparently YAML anchors are explicitly not supported by Actions, and this is still a requested feature. I wonder why not. It's a basic feature of YAML that YAML parsers for all major languages support. What a let-down. Use of anchors can be really nice in GitLab CI configs.

  12. astrofrog commented on Nov 15, 2020

    @astrofrog
    Member

    One can create composite actions (basically a set of steps to re-use) but frustratingly for now composite actions can't use actions, they can only include run steps (so no e.g. set up Python). Once that is fixed, we could use composite actions to reduce duplication.

  13. embray commented on Nov 15, 2020

    @embray
    Member

    All the more reason it would be nice to have a simple feature of YAML that would solve the problem without any convolutions like "composite actions" 😅

  14. mhvk commented on Nov 16, 2020

    @mhvk
    Contributor

    Thanks all for the amazing work! My really wished for missing feature is [skip ci]...

  15. pllim commented on Nov 19, 2020

    @pllim
    Author
  16. pllim commented on Dec 3, 2020

    @pllim
    MemberAuthor

    Back to #11038 (comment) on using third-party apps to auto-cancel duplicate jobs (and in general), I am still hesitant because there is no way to vet the quality of the Actions code or whether it is malicious or not. Does benefit outweigh the risk? Still not supported natively... https://github.community/t/github-actions-cancel-redundant-builds-not-solved/16025/34

    Also if we are open to third-party actions, for the [ci skip] feature, maybe can try https://github.com/marketplace/actions/ci-skip-action if we get desperate enough. I haven't tested it out yet.

  17. pllim commented on Dec 4, 2020

    @pllim
    MemberAuthor

    Re: skipping CI (not to be confused with cancelling duplicate runs) -- I implemented action-skip-ci with proof-of-concept at kali-maa#41 . Not pretty but it works. Maybe easier to customize than some third-party app written in JS?

  18. saimn commented on Dec 11, 2020

    @saimn
    Contributor

    I think it's fine to use a third-party app for a feature like skip-ci. For example https://github.com/styfle/cancel-workflow-action seems widely used and has ~80 lines of code, I don't think there is a huge risk.

  19. pllim commented on Dec 11, 2020

    @pllim
    MemberAuthor

    On the topic of Slack notification, GitHub says they don't have plan to add official support in the near future (see integrations/slack#940). @Cadair suggested pushing to Matrix and have the bridge push to Slack. He has the Matrix portion working already for Sunpy, as follows, and willing to help us set up a bot account for this purpose:

    https://github.com/sunpy/sunpy/blob/master/tools/send_matrix_message.xsh

    https://github.com/sunpy/sunpy/blob/94b31a412fe9486db1a448e4e2e99a77d57ec2ae/azure-pipelines.yml#L162

  20. pllim commented on Jan 19, 2021

    @pllim
    MemberAuthor

    Update: Just caching and Slack notifications left.

  21. jdavies-st commented on Feb 26, 2021

    @jdavies-st
    Contributor

    I will comment here that caching pip dependencies can mask things like build issues caused by newly-released build dependencies. We saw this over at jwst where we were caching the pip cache in our Github action workflow, and it caused us to not catch when Numpy released 1.20, and caused users of 1.19x to have errors about API incompatibility between the built and runtime versions of Numpy. Pip just uses the latest version of a PEP518 dependency like numpy or the latest cached version if it is not specifically limited in pyproject.toml. See discussion here

    spacetelescope/jwst#5744 (comment)

    We did not catch this in our CI because we were caching wheels in the pip cache. It showed up when run with pip install --no-cache-dir and also would have if we had turned off pip caching in our actions.

  22. saimn commented on Feb 26, 2021

    @saimn
    Contributor

    I don't understand how it is a cache issue. Reading the issue you linked, it seems you were building wheels with the latest numpy (using numpy without pinning in pyproject.toml) which then indeed leads to wheels that are not compatible with older numpy. oldest-supported-numpy is the solution to this, or you could pin manually the numpy version used to build the wheels in pyproject.toml. Typically you want to build wheels with the oldest numpy supported for each Python version, which oldest-supported-numpy does.

  23. jdavies-st commented on Feb 26, 2021

    @jdavies-st
    Contributor

    With the cache, for some reason, pip builds the drizzle wheels with an older, cached version of numpy. I'm not sure why.

    Agree that oldest-supported-numpy is the current solution given the lack of tooling to deal with this in pip.

  24. embray commented on Mar 3, 2021

    @embray
    Member

    For numpy in particular shouldn't there be a test job for testing against "latest numpy". I agree with @saimn though that this is not an issue with caching.

  25. pllim commented on Mar 8, 2021

    @pllim
    MemberAuthor

    Re: jwst -- Out of topic now, but testing a pipeline against latest numpy is a little excessive, no?

  26. pllim commented on Apr 19, 2021

    @pllim
    MemberAuthor

    We have decided not to do caching, as we haven't found a real need for it and it introduces extra complexity.

    As for Slack notification, still haven't seen a reliable solution that works. If we really want that, please open a new issue.

    I think as it is, Actions works pretty well and satisfied our current CI needs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions