-
Notifications
You must be signed in to change notification settings - Fork 85
Fixes #27428: Missing migration for existing directives with the bad select input identifier #6576
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
Conversation
|
Commit modified |
917c813 to
cca4f32
Compare
|
Commit modified |
cca4f32 to
91f384d
Compare
|
Commit modified |
91f384d to
f7beeb3
Compare
|
Commit modified |
f7beeb3 to
388a9c4
Compare
|
Commit modified |
07d5b23 to
aa7df7f
Compare
|
Commit modified |
aa7df7f to
57c2f09
Compare
|
Commit modified |
57c2f09 to
2954c8a
Compare
|
Commit modified |
1 similar comment
|
Commit modified |
2954c8a to
3d38398
Compare
clarktsiory
left a comment
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.
LGTM, the migration is really clear and the test also helps for that
Maybe a look from @fanf ?
fanf
left a comment
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.
Good ! Works as expected, but I would still like a better log bootstrap log to help pinpoint what directives were impacted if something goes wrong.
...ala/bootstrap/liftweb/checks/endconfig/migration/MigrateDirectiveWithSelectInputBroken.scala
Show resolved
Hide resolved
| Some(s"Updating invalid parameters in directive ${d.id.serialize}") | ||
| ) | ||
| }) | ||
|
|
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.
I would like to have a log that looks like a check (ie, don't tell user it migrates if there is nothing to migrate), and if migration did happen, then list UUIDs of impacted directive.
Something lile:
.... Checking if some directive have a select paramenter needing migration
... Migrated N directives: UUID1, UUID2, etc
Without that, it is quite difficult to know is any directives were migrated, so it can lead to harder than needed debug session.
We can't rely on event log: I thought I could find them back by searching on the save message, but it does not work (which is a pitty).
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.
I hope this log line will be helpful to someone, I'm not sure a Logger for a migration for a case that may not really exists needed this much !! but it is done
|
Commit modified |
3d38398 to
370403e
Compare
…select input identifier
|
PR rebased |
370403e to
762fa29
Compare
|
OK, merging this PR |
0e7a210
into
Normation:branches/rudder/8.3
https://issues.rudder.io/issues/27428
The migration check technique with a select parameter, then get all technique based on this directive, then check if the directives has a parameter using the name of a technique parameter (instead of an id) and if the name is used, remove it and add a parameter with the id of the technique parameter with previous value