-
Notifications
You must be signed in to change notification settings - Fork 349
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
ChangePropertyValue automatically coalesces properties #3426
Comments
The following simple failing test should demonstrate the issue: class ChangePropertyKeyTest implements RewriteTest {
@Test
void simpleTest() {
rewriteRun(
spec -> spec.recipe(
new ChangePropertyKey("quarkus.opentelemetry.enabled", "quarkus.otel.enabled",
null, "application.yml", null)
),
yaml(
"""
quarkus:
foo:
bar: 1
opentelemetry:
enabled: true
""",
"""
quarkus:
foo:
bar: 1
otel:
enabled: true
""",
spec -> spec.path("application.yml")
)
);
} |
Hmm; what version of OpenRewrite are you using? Since that |
Either way confirmed to be an issue also without that argument ; not clear yet what the fix should be unfortunately, so this goes onto the backlog. |
This is not latest major release; will check tomorrow when i have access to the code and record it here. |
Previously seen on #1841 |
Given a source YAML that looks like this:
and a recipe
ChangePropertyKey("quarkus.opentelemetry.enabled", "quarkus.otel.enabled", ..)
the result is
This automatic coalescing of property names confuses Quarkus, which treats the new property as
quarkus."otel.enabled"
and doesn't match it toquarkus.otel.enabled
.The correct output in this case would be:
The text was updated successfully, but these errors were encountered: