-
Notifications
You must be signed in to change notification settings - Fork 124
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
Add pulp plugin template check script and make target #1148
Conversation
No-Issue Signed-off-by: James Tanner <tanner.jc@gmail.com>
ed960f6
to
b320fac
Compare
No-Issue Signed-off-by: James Tanner <tanner.jc@gmail.com>
No-Issue Signed-off-by: James Tanner <tanner.jc@gmail.com>
|
||
echo "Results ..." | ||
cd $BASEDIR/galaxy_ng | ||
MODIFIED_FILES=$(git status 2>/dev/null | grep 'modified:' | awk '{print $2}') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which does this check for?
- PR edits file X, and
plugin-template
edits same file X - PR edits code unrelated to CI, and
plugin-template
edits any file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh nvm i see, this checks out the current $PLUGIN_GIT_REF
MODIFIED_FILES=$(git status 2>/dev/null | grep 'modified:' | awk '{print $2}') | ||
EXIT_CODE=0 | ||
for MF in $MODIFIED_FILES; do | ||
echo "FAILURE template-plugin would modifiy $BASEDIR/galaxy_ng/$MF" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this will also fail when we run plugin_template to explicitly modify the files? how is this script differentiating when we really want to have the files edited by the template engine from when we do that by mistake?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks like this passes in that case, since it checks out the current $PLUGIN_GIT_REF listed in our repo. it validates the plugin_template ref matches all the files in our repo (they are un-edited)
Description 🛠
Sending a PR, getting all the tests to pass, waiting for reviews, and then being told you might have edited a file that some third party repo script is going to overwrite when the dependencies for this repo are updated ... is highly annoying.
Reviewer Checklists 👀
Developer reviewer:
galaxy_ng/tests/integration
orgalaxy_ng/tests/functional
, and they fully cover necessary test scenarios… or tests not neededQE reviewer (exceptions):
galaxy_ng/tests/integration
orgalaxy_ng/tests/functional
, and they fully cover necessary test scenarios… or tests not neededNote: when merging, include the Jira issue link in the squashed commit