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

Label messages of docs-only commits with SKIP_FULL_CI #7526

Merged
merged 4 commits into from Apr 11, 2019

Conversation

Projects
None yet
3 participants
@benjyw
Copy link
Contributor

commented Apr 10, 2019

A future change can use this label to actually skip CI in such cases.

This is implemented via the prepare-commit-message git hook.

To simplify installing this hook, this change overhauls our repo setup script.
Previously this script special-cased our single git hook. Now that we have two,
it made sense to install them generically. The setup script now does so by
symlinking anything found in build-support/githooks into .git/hooks.
This required moving the existing pre-commit.sh to build-support/githooks/pre-commit.

Label messages of docs-only commits with SKIP_FULL_CI.
A future change can use that label to actually skip CI in such cases.
else
echo "* Skipping import/lint checks in partial working copy."
fi
echo "Git hooks have moved to build-support/githooks. Run build-support/bin/setup.sh to fix."

This comment has been minimized.

Copy link
@illicitonion

illicitonion Apr 10, 2019

Contributor

May be worth throwing in an exit 1 at the end here, so people really notice

@stuhood

This comment has been minimized.

Copy link
Member

commented Apr 10, 2019

So (similar to "most" other changes), documentation changes that could possibly break docsite rendering should be detectable via ./pants --changed-parent=master list, because they will have associated page targets.

Could we begin dogfooding our detection of this kind of change by using ./pants --changed-parent=master list | wc -l (...and a blacklist of files/directories, probably) to detect changes that "have no effect on CI", and label them using this mechanism?

benjyw added some commits Apr 11, 2019

@benjyw benjyw merged commit 666be6a into pantsbuild:master Apr 11, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@benjyw benjyw deleted the benjyw:no_ci_for_doc_changes branch Apr 11, 2019

@benjyw

This comment has been minimized.

Copy link
Contributor Author

commented Apr 12, 2019

So (similar to "most" other changes), documentation changes that could possibly break docsite rendering should be detectable via ./pants --changed-parent=master list, because they will have associated page targets.

Could we begin dogfooding our detection of this kind of change by using ./pants --changed-parent=master list | wc -l (...and a blacklist of files/directories, probably) to detect changes that "have no effect on CI", and label them using this mechanism?

I suppose, but that seems like a fairly complex way to achieve this, no? And running pants inside a git hook seems heavyweight.

@stuhood

This comment has been minimized.

Copy link
Member

commented Apr 12, 2019

So (similar to "most" other changes), documentation changes that could possibly break docsite rendering should be detectable via ./pants --changed-parent=master list, because they will have associated page targets.
Could we begin dogfooding our detection of this kind of change by using ./pants --changed-parent=master list | wc -l (...and a blacklist of files/directories, probably) to detect changes that "have no effect on CI", and label them using this mechanism?

I suppose, but that seems like a fairly complex way to achieve this, no? And running pants inside a git hook seems heavyweight.

We already run pants with --changed at least two times, for isort and lint (...technically the same command).

@benjyw

This comment has been minimized.

Copy link
Contributor Author

commented Apr 13, 2019

Good point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.