-
Notifications
You must be signed in to change notification settings - Fork 14
refactor(pakcages): update sync_diff_inspector package source to tiflow #863
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
base: main
Are you sure you want to change the base?
Conversation
for release version <=9.0.0 in offline-packages
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.
I have already done a preliminary review for you, and I hope to help you do a better job.
Summary:
This PR updates the sync_diff_inspector package source in the offline-packages.yaml.tmpl file to point from the pingcap/tidb-tools image to the pingcap/tiflow image, along with adjusting the path from tidb-tools-*.tar.gz to sync-diff-inspector-*.tar.gz. This is done consistently across multiple package definitions presumably for versions <= 9.0.0 as per the description. The changes appear mechanical, consistent, and focused solely on source references without altering logic or structure, indicating a low risk of functional regressions.
Code Improvements
-
Lack of Version Pinning or Tagging:
- File:
packages/offline-packages.yaml.tmpl(all changes) - Issue: The OCI image URLs use the
master_{{.Release.os}}_{{.Release.arch}}tag, which can be unstable or change over time. - Suggestion: Consider using explicit version tags or digests to ensure reproducible builds/releases. For example:
url: "{{ .Release.registry }}/pingcap/tiflow/package:v9.0.0_{{.Release.os}}_{{ .Release.arch}}"
- This avoids potential issues with the "master" tag moving unexpectedly and causing inconsistent package sources.
- File:
-
No Validation or Fallback for Package Path Changes:
- The path pattern changes from
tidb-tools-*.tar.gztosync-diff-inspector-*.tar.gz. - Ensure that the new tarball names and internal structure (
extract_inner_path: sync_diff_inspector) are correct and tested. - If the package structure differs, missing files or extraction errors could occur.
- Suggestion: Add validation steps or update related tooling/tests that rely on these paths.
- The path pattern changes from
Best Practices
-
PR Description Clarity:
- The description
"for release version <=9.0.0 in offline-packages"is vague. - Suggest expanding the description to clarify:
- Why the source is updated (e.g., repo restructuring, new package location).
- Impact on downstream consumers.
- Any required follow-up actions or testing.
- Example:
"Update sync_diff_inspector package source from pingcap/tidb-tools to pingcap/tiflow OCI images for releases <= 9.0.0 in offline packages to align with upstream source migration."
- The description
-
Documentation / Comment Update:
- Since this is a mass refactor of package sources, consider adding a comment block near the changed lines describing the rationale for future maintainers.
- This helps avoid confusion since the same package name now pulls from a different image.
-
Testing Coverage:
- No evidence of tests or validation steps updated in this PR.
- Suggest verifying offline package builds and deployments using the updated source.
- If not already automated, add integration tests to confirm package extraction and functionality work with the new source.
Summary of Recommendations
- Pin OCI image tags to explicit versions instead of using `master` to ensure reproducibility.
- Verify that the new tarball path and extraction paths are correct and consistent with the new tiflow package.
- Improve PR description to clearly state the reason and impact of the change.
- Add comments in the YAML file explaining the migration for maintainability.
- Add or update tests to validate offline package builds with the new package source.Addressing these points will reduce risk, improve maintainability, and ensure the correctness of this refactor.
Summary of ChangesHello @wuhuizuo, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refactors the configuration for the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request refactors the source for the sync_diff_inspector package in offline package definitions, updating it from pingcap/tidb-tools to pingcap/tiflow. This change is applied across various TiDB release versions older than v9.0.0. While the repository update is correct, the implementation introduces a significant risk by fetching the package using the master tag. This means older, stable TiDB releases would be packaged with a potentially unstable, development version of sync_diff_inspector, which could lead to compatibility problems. My review comments consistently recommend replacing the master tag with the specific {{ .Release.version }} tag to ensure that a compatible version of the tool is used, aligning with the practice for other components in the file. This is a crucial change for the stability and correctness of the offline packages. Also, there is a small typo in the pull request title ('pakcages' should be 'packages').
joechenrh
left a comment
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.
LGTM, but maybe it should be merged after I sync tiflow repo with tidb-tools.
|
@joechenrh: adding LGTM is restricted to approvers and reviewers in OWNERS files. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: joechenrh The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
/hold when the code migration is done, we need to update the route for v8.5.x like |
As the v8.5.x version will live for long times, I suggest to update the fetching source of LTS versions to artifacts of
tiflowforsync_diff_inspectorbinary for release version <=9.0.0 in offline-packages.