-
Notifications
You must be signed in to change notification settings - Fork 102
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
ENT-10657: Separated default self upgrade binary version from policy version #2733
Conversation
Yeah, I think we need to adjust configure.ac or autogen.sh to use prepare.sh instead of transforming the https://github.com/cfengine/masterfiles/blob/master/configure.ac#L241-L248
So we could remove the three .cf files from AC_CONFIG_FILES and integrate prepare.sh into the build instead of using autotools so that we keep things DRY. |
trying to cfbs add from my latest commit on your branch:
out/masterfiles/controls/update_def.cf has
out/masterfiles/standalone self upgrade has
So I think this works. Let's test it together a bit though. |
I initialized a new project and added the repo at the same commit.
I built it.
Then I looked for
Similarly I looked for " version =>".
I found that the Other than that, this seems to do what I expect. |
37260a5
to
7c9eb26
Compare
With the last commit, I have fixed this with just a "touch" of anti-DRY (find the .in templates in both prepare.sh and render-templates.sh) Result is good I think with built policy via cfbs
no |
Yeah, that's what I see.
|
This improves the behavior for adding masterfiles as a module via repository URL. Prior to this change the policy version and default binary version to target for self upgrade were the same. To align them you either had to explicitly set the version which becomes a lie about the actual policy version or you would end up targeting upgrades to a version of binaries that did not exist including the commit sha of the masterfiles version built from. With this change, if you simply cfbs add https://github.com/cfengine/masterfiles or cfbs add https://github.com/cfengine/masterfiles@COMMIT at a commit that was not a release the policy version attribute in body common control will get a version with the commit sha and the default binary versions will come from .CFVERION which should be the current or next release which is the intention of the default. Ticket: ENT-10657 Changelog: Title
2ae8b6b
to
27564df
Compare
@cf-bottom jenkins, please! |
Alright, I triggered a build: Jenkins: https://ci.cfengine.com/job/pr-pipeline/9868/ Packages: http://buildcache.cfengine.com/packages/testing-pr/jenkins-pr-pipeline-9868/ |
@cf-bottom jenkins, please! |
Sure, I triggered a build: Jenkins: https://ci.cfengine.com/job/pr-pipeline/9869/ Packages: http://buildcache.cfengine.com/packages/testing-pr/jenkins-pr-pipeline-9869/ |
After some discussion, we decided to drop this and instead consider how to set the default binary version based on the hubs binary version, as that is really the more ideal default state. So, hub can render a file that contains it's binary version, clients can download that as part of policy update and the content of that file can be used to set the default target binary version. |
This improves the behavior for adding masterfiles as a module via repository
URL.
Prior to this change the policy version and default binary version to target for
self upgrade were the same. To align them you either had to explicitly set the
version which becomes a lie about the actual policy version or you would end up
targeting upgrades to a version of binaries that did not exist including the
commit sha of the masterfiles version built from.
With this change, if you simply cfbs add https://github.com/cfengine/masterfiles
or cfbs add https://github.com/cfengine/masterfiles@COMMIT at a commit that was
not a release the policy version attribute in body common control will get a
version with the commit sha and the default binary versions will come from
.CFVERION which should be the current or next release which is the intention of
the default.
TODOs:
Ticket: ENT-10657
Changelog: Title