Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Fail PR if it has a structural schema change in a released version #2864
The most important part of #2775.
I broke it up to 2 PRs - this one is going to be the second one, should be rebased and merged AFTER the refactoring one: #2867
It checks whether the PR compared to master contains any changes in the
I decided to compare against master. This enables to override this check in case it gets in the way (some kind of historical refactoring that this check recognizes as a structural change incorrectly, or in case we do want to introduce a structural change historically) - if a maintainer has Admin rights they can merge it still.
detected structural change in released version:
Example Travis Build on this PR: https://travis-ci.com/GoogleContainerTools/skaffold/jobs/234305164
detected structural changes in unreleased
hack/check-schema-changes.sh checks whether the PR compared to master contains any changes in the config.go files under pkg/skaffold/schema. If yes, it checks if those changes are structural changes or not. If they are and the package is not "latest", then we'll fail the PR as we assume anything else than latest is already released and shouldn't be changed. If the change is latest and it is released, we fail the PR for the same reason. If the change is in latest and it is not released yet, it is fine to make changes.