Skip to content

chore(pubsub): improve monorepo migration tooling#12962

Draft
meltsufin wants to merge 5 commits intomainfrom
chore/pubsub-migration-tooling
Draft

chore(pubsub): improve monorepo migration tooling#12962
meltsufin wants to merge 5 commits intomainfrom
chore/pubsub-migration-tooling

Conversation

@meltsufin
Copy link
Copy Markdown
Member

Updates migration automation scripts as part of the effort to migrate java-pubsub into the monorepo. Refines generation_config.yaml updating logic to prevent data loss, patches root POM sorting to preserve original formatting, and adapts CI transformers to maintain standard Clirr execution steps.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a migration script for java-pubsub and updates several utility scripts for workflow transformation, generation configuration, and root POM management. The feedback highlights a critical issue where appending YAML directly to the generation config results in an invalid structure and loses deduplication logic. Additionally, there are recommendations to move imports to the top of the file for PEP 8 compliance and to harden the regex-based sorting logic in the POM update script to prevent potential runtime errors.

Comment thread monorepo-migration/update_generation_config.py Outdated
Comment thread monorepo-migration/update_root_pom.py Outdated
if not any(f'<module>{module_name}</module>' in l for l in java_lines):
java_lines.append(new_module)
java_lines.sort()
import re
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The import re statement should be moved to the top of the file to adhere to PEP 8 standards. Importing inside a function is generally discouraged unless there is a specific reason for lazy loading.

Comment thread monorepo-migration/update_root_pom.py Outdated
Updates migration automation scripts as part of the effort to
migrate java-pubsub into the monorepo. Refines generation_config.yaml
updating logic to prevent data loss, patches root POM sorting to
preserve original formatting, and adapts CI transformers to maintain
standard Clirr execution steps.
@meltsufin meltsufin force-pushed the chore/pubsub-migration-tooling branch from 4b4bc1e to edff92a Compare April 29, 2026 21:22
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.

1 participant