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

OPSEXP-700: Fix helm related pre-commit checks #5

Merged
merged 22 commits into from
Jan 19, 2021
Merged

Conversation

gavincornwell
Copy link
Contributor

@gavincornwell gavincornwell commented Jan 18, 2021

OPSEXP-700 Pre commit hooks are cached on install or first run which can cause undesirable results when trying to update the hooks themselves therefore removed caching from build and manually delete the folder before running checks.

Furthermore, the "entry" property in .pre-commit-hooks.yaml needs to be a single quoted string.

Finally, the kubebug checks were running against a cluster and not the provided input files.

@mteodori
Copy link
Member

@gavincornwell is it correct to remove the cache for pre-commit or maybe enough not to use the branch as ref in .pre-commit.config.yml but always the short sha as in git rev-parse --short HEAD?

@gavincornwell
Copy link
Contributor Author

@mteodori No, it's not enough, changing the ref to anything has no effect once the pre-commit hooks have been run once, this silent failure to fetch the latest code from the remote repo is what caused to me spend ages on this problem!

As this will only run once per build I'm not sure having it cached is that important to be honest.

@mteodori
Copy link
Member

@mteodori No, it's not enough, changing the ref to anything has no effect once the pre-commit hooks have been run once, this silent failure to fetch the latest code from the remote repo is what caused to me spend ages on this problem!

As this will only run once per build I'm not sure having it cached is that important to be honest.

maybe we have to measure, but on the same PR I would avoid to download the same hooks multiple times
I am a bit skeptic about the lack of effect of rev as I would see the same behaviour locally and also other Travis builds I have seen the changes applied

@gavincornwell
Copy link
Contributor Author

Ah, actually I see what you mean, if you changed the rev every time you made a change in the alfresco-build-tools I can see how that might work, I haven't tried that myself.

I will revert the cache changes.

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