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

Remove pre-commit from GHA #2273

Merged
merged 1 commit into from
Jun 23, 2021
Merged

Conversation

minrk
Copy link
Member

@minrk minrk commented Jun 22, 2021

runs on pre-commit.ci now

leaves shellcheck in there, which requires additional dependency and is run separately

It would be nice to bring shellcheck in so that it works like everything else. It can run in docker, but also needs the entrypoint wrapper in https://github.com/gruntwork-io/pre-commit/blob/HEAD/hooks/shellcheck.sh

runs on pre-commit.ci now

leaves shellcheck in there, which requires additional dependency
@consideRatio
Copy link
Member

consideRatio commented Jun 22, 2021

Why do you want it on pre-commit instead? Without a benefit, i figure it would just increase the complexity without benefit by becoming another way to inspect a failure and inspect the CI logic etc.

Okay found answer in team-compass issue! Automatically pushed commits. Deal

@consideRatio consideRatio merged commit 33766da into jupyterhub:main Jun 23, 2021
@minrk minrk deleted the pre-commit-ci branch June 25, 2021 09:13
@minrk
Copy link
Member Author

minrk commented Jun 25, 2021

Sorry, forgot to link jupyterhub/team-compass#379 . The pre-commit action is also officially deprecated in favor of using pre-commit.ci. I don't expect that to be an issue, as running pre-commit manually instead of via a custom action is not a problem.

@consideRatio
Copy link
Member

No worries @minrk! So far so good with using pre-commit.ci, I had to disable the helmlint pre-commit hook we used as that relies on helm being available in the system which pre-commit.ci wouldn't have. I also had to make use of the jupyterhub/chartpress defined pre-commit hook as that made sure chartpress was installed and wasn't assumed to be available in the system already.

@minrk
Copy link
Member Author

minrk commented Jun 25, 2021

I wonder if we should make our own pre-commit-hooks repo on this org so that we can have pre-commit hooks that ensure things like helmlint, etc. are installed. Then we'd have a place to make shellcheck run its auto-fixer as I did here

@consideRatio
Copy link
Member

The key thing to answer to accomplish that I think is: how can we make a pre-commit hook defined in some repo referenced from some pre-commit-config elsewhere make a binary like helm or shellcheck be installed - and not only a python or similar package.

Alternatively, if not any kind of binary can be installed, then perhaps we can find a way to install the specific binaries we want, like helm which is a GoLang binary at least.

@minrk
Copy link
Member Author

minrk commented Jun 25, 2021

Lots of pre-commit repos vendor files, as the simplest route. Works well for single binaries like most stuff in the go/kube/helm world. See, for example shellcheck-py a repo created by the pre-commit author specifically for the purpose of easy env installation of shellcheck.

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

Successfully merging this pull request may close these issues.

2 participants