Skip to content

Conversation

@VinceMacBuche
Copy link
Member

@VinceMacBuche VinceMacBuche commented Aug 28, 2025

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

@VinceMacBuche
Copy link
Member Author

Commit modified

@VinceMacBuche VinceMacBuche force-pushed the bug_27428/missing_migration_for_existing_directives_with_the_bad_select_input_identifier branch from 917c813 to cca4f32 Compare August 28, 2025 12:26
@VinceMacBuche
Copy link
Member Author

Commit modified

@VinceMacBuche VinceMacBuche force-pushed the bug_27428/missing_migration_for_existing_directives_with_the_bad_select_input_identifier branch from cca4f32 to 91f384d Compare August 28, 2025 15:03
@VinceMacBuche
Copy link
Member Author

Commit modified

@VinceMacBuche VinceMacBuche force-pushed the bug_27428/missing_migration_for_existing_directives_with_the_bad_select_input_identifier branch from 91f384d to f7beeb3 Compare August 28, 2025 16:33
@VinceMacBuche
Copy link
Member Author

Commit modified

@VinceMacBuche VinceMacBuche force-pushed the bug_27428/missing_migration_for_existing_directives_with_the_bad_select_input_identifier branch from f7beeb3 to 388a9c4 Compare August 28, 2025 16:33
@VinceMacBuche
Copy link
Member Author

Commit modified

@VinceMacBuche VinceMacBuche force-pushed the bug_27428/missing_migration_for_existing_directives_with_the_bad_select_input_identifier branch 2 times, most recently from 07d5b23 to aa7df7f Compare August 28, 2025 17:02
@VinceMacBuche
Copy link
Member Author

Commit modified

@VinceMacBuche VinceMacBuche force-pushed the bug_27428/missing_migration_for_existing_directives_with_the_bad_select_input_identifier branch from aa7df7f to 57c2f09 Compare August 28, 2025 17:04
@VinceMacBuche
Copy link
Member Author

Commit modified

@VinceMacBuche VinceMacBuche force-pushed the bug_27428/missing_migration_for_existing_directives_with_the_bad_select_input_identifier branch from 57c2f09 to 2954c8a Compare August 28, 2025 18:42
@VinceMacBuche
Copy link
Member Author

Commit modified

1 similar comment
@VinceMacBuche
Copy link
Member Author

Commit modified

@VinceMacBuche VinceMacBuche force-pushed the bug_27428/missing_migration_for_existing_directives_with_the_bad_select_input_identifier branch from 2954c8a to 3d38398 Compare August 28, 2025 18:45
Copy link
Contributor

@clarktsiory clarktsiory left a 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 ?

Copy link
Member

@fanf fanf left a 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.

Some(s"Updating invalid parameters in directive ${d.id.serialize}")
)
})

Copy link
Member

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).

Copy link
Member Author

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

@VinceMacBuche
Copy link
Member Author

Commit modified

@VinceMacBuche VinceMacBuche force-pushed the bug_27428/missing_migration_for_existing_directives_with_the_bad_select_input_identifier branch from 3d38398 to 370403e Compare September 4, 2025 08:52
@VinceMacBuche
Copy link
Member Author

PR rebased

@VinceMacBuche VinceMacBuche force-pushed the bug_27428/missing_migration_for_existing_directives_with_the_bad_select_input_identifier branch from 370403e to 762fa29 Compare September 4, 2025 12:14
@VinceMacBuche
Copy link
Member Author

OK, merging this PR

@VinceMacBuche VinceMacBuche merged commit 0e7a210 into Normation:branches/rudder/8.3 Sep 10, 2025
13 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants