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

Fixes #11059: Create a rudder server upgrade-techniques commands #125

Conversation

peckpeck
Copy link
Member

@peckpeck peckpeck commented Jul 6, 2017

while getopts "otc:" opt; do
case $opt in
o)
OVERRIDE=true
Copy link
Member

Choose a reason for hiding this comment

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

Don't you want to set OVERRIDE and TAG to false as default ? (would put them few lines above above with DISPLAY_COMMAND)

Copy link
Member Author

Choose a reason for hiding this comment

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

It is not necessary since they are compared to true, but it would make this more readable

commit=$(git log --oneline | grep "^[0-9a-f]* ${TAG_MESSAGE}" | head -n1)
if [ "${commit}" = "" ]
then
echo "Upgrade without override not supported without tag message!"
Copy link
Member

Choose a reason for hiding this comment

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

WHy is that impossible ?

Copy link
Member

Choose a reason for hiding this comment

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

WHy not starting from HEAD ?

Why not creating the branch from the commit and not HEAD ?

Copy link
Member

Choose a reason for hiding this comment

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

ping @peckpeck ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Without a tag message we don't know where to start from. There is not commit id to start from.
If someone has touched the techniques the content will be overridden, that's why the user must be aware of this and use the override option.

@VinceMacBuche
Copy link
Member

@peckpeck ?

@VinceMacBuche
Copy link
Member

@peckpeck ??

@peckpeck
Copy link
Member Author

Commit modified

@peckpeck peckpeck force-pushed the ust_11059/create_a_rudder_server_upgrade_techniques_commands branch from 487b71c to 6bd6e31 Compare November 15, 2017 10:11
git commit -q -m "New technique version from package"
# merge the branch into master
git checkout master
git merge --commit -m "${TAG_MESSAGE} Technique upgrade via merge on $(date)" "upgrade/${COMMIT_ID}"
Copy link
Member Author

Choose a reason for hiding this comment

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

There should probably an explicit strategy here, -s theirs or something like that

@peckpeck peckpeck force-pushed the ust_11059/create_a_rudder_server_upgrade_techniques_commands branch from 6bd6e31 to 2766e4c Compare November 29, 2017 16:59
@peckpeck
Copy link
Member Author

Commit modified

@Normation-Quality-Assistant

This PR is not mergeable to upper versions.
Since it is "Ready for merge" you must merge it by yourself using the following command:
rudder-dev merge https://github.com/Normation/rudder-agent/pull/125
-- Your faithful QA

@peckpeck
Copy link
Member Author

peckpeck commented Feb 1, 2018

OK, merging this PR

@peckpeck peckpeck merged commit 2766e4c into Normation:branches/rudder/4.1 Feb 1, 2018
@peckpeck peckpeck deleted the ust_11059/create_a_rudder_server_upgrade_techniques_commands branch July 13, 2020 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants