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

Detect when pinned inputs have changed and stop the build #509

Merged
merged 3 commits into from
Feb 10, 2021

Conversation

shs96c
Copy link
Collaborator

@shs96c shs96c commented Jan 8, 2021

Optionally force people to repin if the inputs to maven_install have
changed. This is done by adding a new fail_if_repin_required
attribute to maven_install. In order to preserve existing behaviour,
this is currently set to False, but users can update to True if
required.

If a repin is not required, a warning is printed to the console and
the build continues as expected. If a repin is required, the build is
failed and steps to rectify the situation are printed.

In addition to the maven_install attribute the REPIN
environment variable is checked. This allows one to update the inputs
without needing to modify the WORKSPACE file.

README.md Show resolved Hide resolved
coursier.bzl Outdated Show resolved Hide resolved
coursier.bzl Outdated Show resolved Hide resolved
coursier.bzl Show resolved Hide resolved
Copy link
Collaborator

@jin jin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The approach with the env vars and per-repo attribute is reasonable.

README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
Optionally force people to repin if the inputs to maven_install have
changed. This is done by adding a new `fail_if_repin_required`
attribute to `maven_install`. In order to preserve existing behaviour,
this is currently set to `False`, but users can update to `True` if
required.

If a repin is not required, a warning is printed to the console and
the build continues as expected. If a repin is required, the build is
failed and steps to rectify the situation are printed.

In addition to the `maven_install` attribute the `REPIN` environment
variable is checked. This allows one to update the inputs without
needing to modify the `WORKSPACE` file.
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.

4 participants