Conversation
AddProfile unconditionally removed and re-added a profile with the same id on every recipe cycle. Use SemanticallyEqual to compare the existing profile to the desired one and return early when they already match.
3 tasks
timtebeek
added a commit
to openrewrite/rewrite-spring-to-quarkus
that referenced
this pull request
Apr 12, 2026
AddProfile is now idempotent (openrewrite/rewrite#7356), so tests can use the default single cycle. Also restore the idempotency test to verify no changes when profiles already exist.
timtebeek
added a commit
to openrewrite/rewrite-spring-to-quarkus
that referenced
this pull request
Apr 12, 2026
* Fix AddProfile generating malformed XML structure (Issue #68) The AddProfile recipe expects wrapping elements (<activation>, <properties>) in its parameters, but the YAML was passing only inner content. Added the wrapping elements so the generated profile XML is valid. Also enabled the previously @disabled test and added a test for ConfigureNativeBuild. * Remove expectedCyclesThatMakeChanges workaround AddProfile is now idempotent (openrewrite/rewrite#7356), so tests can use the default single cycle. Also restore the idempotency test to verify no changes when profiles already exist.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AddProfileunconditionally removed and re-added a profile with the sameidon every recipe cycle, even when the existing profile already matched. This usesSemanticallyEqualto compare the existing profile to the desired one and returns early when they already match, making the recipe idempotent.Changes
SemanticallyEqual.areEqual()and skip modification when content matchesexpectedCyclesThatMakeChanges(2)workaround from all testspreExistingIdenticalProfiletest verifying no changes when profile already matches