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

GitHub Actions #952

Closed
umarcor opened this issue Sep 8, 2019 · 17 comments · Fixed by #1044
Closed

GitHub Actions #952

umarcor opened this issue Sep 8, 2019 · 17 comments · Fixed by #1044
Assignees
Labels
kind/feature A feature request for cobra; new or enhanced behavior

Comments

@umarcor
Copy link
Contributor

umarcor commented Sep 8, 2019

It seems that GitHub Actions (beta) is enabled for @spf13's repos, so it works here: https://github.com/spf13/cobra/actions

I think we should migrate from Travis CI (and maybe circleci) to GitHub Actions, and add macOS and Windows jobs too.

Ref #907

@jharshman
Copy link
Collaborator

I have no problem piloting Github Actions. But I would like to know what it get's us over what we already are using.

@jharshman jharshman self-assigned this Sep 17, 2019
@umarcor
Copy link
Contributor Author

umarcor commented Sep 17, 2019

But I would like to know what it get's us over what we already are using.

  • Better integration of permissions. Since Actions is built in GitHub, it is possible to use secret tokens without explicitly managing/setting them. Moreover, API calls are internal between GitHub services, so there is a smaller surface for potential attacks/leaks/issues.
    • This is not used ATM. However, in the future I would suggest to deploy binaries of an example/demo project. This would allow to:
      • Have an example for users that want to have a feel of how a cobra CLI looks like.
      • Show developers an example of how to build, test and deploy an application based on cobra.
  • GNU/Linux, macOs and Windows platforms in the same service. Currently, GNU/Linux platforms are tested only.
    • Moreover, Travis and CircleCI seem to be duplicated. I don't know what is the motivation for this. My porposal would be to deprecate both of them in favour of Actions.
    • Startup time is much faster that Travis, and I'd say that much faster than CircleCI too.
  • Actions allow to have up to 20 workflows, where each workflow is a YAML file. Hence, having a single Action account is equivalent to having 20 Travis CI or CircleCI projects. This allows to have a set of tasks to be executed daily, others weekly, etc.
    • Workflows can be filtered depending on which source files were modified. This allows for fine granularity.
  • Actions are not about bash/python/golang CI/CD only. There is a toolkit that allows complex custom tasks that interact with GitHub.
    • For example, it is possible to have a task to automatically reply with a greeting comment to each issue opened by a new user. That's just a toy example.
    • This example, extracts the code blocks in the first comment of an issue and executes them in a job.
      • The results can be uploaded as artifacts of the job/test, the log or some summary can be added to the issue (as a comment), etc.
      • I think this is especially useful for users to provide reproducible MWE that are automatically tested with latest master. At the same time, it allows maintainers to request issues to contain reproducible MWE, so it is possible to understand the context exactly.
    • By the same token, as suggested in #959, it should be possible to parse the body of PRs to have them self-labelled by contributors. I.e., breaking changes could be explicitly marked without maintainers being required to manually add the label.

@github-actions
Copy link

github-actions bot commented Apr 4, 2020

This issue is being marked as stale due to a long period of inactivity

@umarcor
Copy link
Contributor Author

umarcor commented Apr 4, 2020

Not stale.

@umarcor
Copy link
Contributor Author

umarcor commented Apr 13, 2020

Ref #968 #1074 #1075

@xchapter7x
Copy link
Contributor

it seems like from a visibility and ease of maintenance perspective, keeping everything under github would allow for cleaner & more clearly defined user access.

Echoing a point from above, the integrations all being here might make it easier for contributors (maintainers and non-maintainers alike) to more easily help on tech-debt/workflow type chores as well as new feature development.

My only question is one of this internal workflow enhancements WRT overall project priority. Thats more a @jharshman call.

@jharshman
Copy link
Collaborator

Our current experimentation with Github Actions haven't actually worked so far. So you see where I am reluctant to adopt this further.

@umarcor
Copy link
Contributor Author

umarcor commented Apr 13, 2020

I do understand that. However, unlike the actions that you already merged, #968 is absolutely harmless. This is because #968 is directly equivalent (just a translation) of the current Travis workflow. Conversely, the actions contributed in #1074 and #1075 do make permanent modifications in the repo, and are based on not-yet-well-developed resources. I'm sure that using GHA for the known workflows will allow you to get a better feel.

@jharshman
Copy link
Collaborator

#1074 and #1075 do make permanent modifications in the repo
No these were less than low impact and do not make any permanent modifications or changes.

@umarcor I am all for using GH actions, but as of right now - I am not sold on the direction or utility. However, the other maintainers and myself will discuss it in planning.

@jharshman jharshman added kind/feature A feature request for cobra; new or enhanced behavior needs investigation and removed kind/stale labels Apr 13, 2020
@umarcor
Copy link
Contributor Author

umarcor commented May 11, 2020

Ref #1097 #1112

@umarcor
Copy link
Contributor Author

umarcor commented May 11, 2020

From #968 (comment):

(...) workflows contributed by PRs are now executed and shown both here and in https://github.com/spf13/cobra/actions.

Hence, users willing to use GHA can cherry-pick the commit in this PR #968, regardless of the maintainers picking it.

@github-actions
Copy link

This issue is being marked as stale due to a long period of inactivity

@umarcor
Copy link
Contributor Author

umarcor commented Jul 11, 2020

However, the other maintainers and myself will discuss it in planning

@jharshman, any update?

@umarcor
Copy link
Contributor Author

umarcor commented Nov 14, 2020

Ref: #1044

@umarcor
Copy link
Contributor Author

umarcor commented Feb 8, 2021

This issue was closed by mistake, since the content was moved from #1044 to #1339, upon @jharshman's request. Can we please have this issue reopened?

@jpmcb
Copy link
Collaborator

jpmcb commented Feb 8, 2021

Reopening - we are definitely still looking at doing this

@jpmcb jpmcb reopened this Feb 8, 2021
@johnSchnake
Copy link
Collaborator

Seems that everything is in GitHub Actions now; closing since it doesn't seem there is anything remaining for this issue. Reopen if I am mistaken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature A feature request for cobra; new or enhanced behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants