-
Notifications
You must be signed in to change notification settings - Fork 3.4k
fix: always convert singular to plural
#15092
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
convert singular to plural
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.
Pull request overview
This PR fixes the conversion logic for migrating legacy singular fields (semaphore, mutex, schedule) to their plural equivalents (semaphores, mutexes, schedules) in workflow specifications. Previously, the singular fields were only migrated when the plural fields were empty; now they are always appended to ensure both values are preserved when present.
- Changed conversion strategy from conditional replacement to unconditional append
- Updated conversion logic for
LegacySynchronization.ToCurrent()to always append singularSemaphoreandMutexto their plural forms - Updated conversion logic for
LegacyCronWorkflowSpec.ToCurrent()to always append singularScheduleto pluralSchedules
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
6242443 to
da8005f
Compare
Signed-off-by: Alan Clucas <[email protected]>
Signed-off-by: Alan Clucas <[email protected]>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
Signed-off-by: Alan Clucas <[email protected]> (cherry picked from commit a5b57b1)
|
❌ Cherry-pick failed for 3.7. Please check the workflow logs for details. |
…for 3.7) (#15119) Signed-off-by: Alan Clucas <[email protected]> Signed-off-by: Mason Malone <[email protected]>
Signed-off-by: Alan Clucas <[email protected]>
In #14996 the singular version of each of
semaphore,mutexwould not get moved over to the plural in the presence of both fields.This is not really correct as if you have both sets in 3.7 you will get the behaviour of the appended list+singular. So this PR makes convert append instead of only replace.
For
schedule, if present it would maskschedules. I have kept this behaviour.Added tests for this.