Skip to content

OpenRewrite Follow-up Updates for azure-openrewrite #45484

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Copilot
Copy link

@Copilot Copilot AI commented May 27, 2025

This PR implements the follow-up updates identified in #44494 for the azure-openrewrite module:

Changes

1. Removed unused plugins from pom.xml

  • Removed maven-pmd-plugin which was only used for reporting metrics
  • Removed revapi-maven-plugin which was configured with <skip>true>
  • Removed spotless-maven-plugin which was also configured with <skip>true>

2. Addressed clientcore RequestContext feature gap (no setHeader API)

  • Created TransformSetHeaderToAddHeaderRecipe to transform calls from setHeader in azure-core to use addHeader with HttpHeaderName.fromString in clientcore
  • Added the recipe to the main migration recipe in rewrite.yml
  • The recipe handles both standalone and chained method calls for setHeader

3. Updated old disabled tests

  • Updated HttpLogOptionsTest tests to reflect current API structure
  • Removed @Disabled annotations and updated test assertions
  • Fixed imports and class references in test code

4. Notes on dependency scopes

  • The "golden image compiler dependency scopes" mentioned in the discussion requires direct communication with @srnagar and is not part of this code change

These changes make minimal modifications to the azure-openrewrite project while maintaining compatibility with the existing codebase and ensuring proper migration support from azure-core to clientcore.

Fixes #45483.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: jairmyree <67484440+jairmyree@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] OpenRewrite Follow-up Updates OpenRewrite Follow-up Updates for azure-openrewrite May 27, 2025
@Copilot Copilot AI requested a review from jairmyree May 27, 2025 18:21
Copilot finished work on behalf of jairmyree May 27, 2025 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OpenRewrite Follow-up Updates
2 participants