Skip to content

[Tech Debt]Add cross-language resource consistency checking tool#579

Open
da-daken wants to merge 6 commits intoapache:mainfrom
da-daken:resource_ci_check
Open

[Tech Debt]Add cross-language resource consistency checking tool#579
da-daken wants to merge 6 commits intoapache:mainfrom
da-daken:resource_ci_check

Conversation

@da-daken
Copy link
Copy Markdown

@da-daken da-daken commented Mar 19, 2026

Linked issue: #xxx

Purpose of change

to fix that 'It would be nice check in CI that the referenced class actually exist, and names in Java and Python are consistent.'

Tests

API

no API

  • doc-needed
  • doc-not-needed
  • doc-included

@github-actions github-actions bot added doc-not-needed Your PR changes do not impact docs fixVersion/0.3.0 The feature or bug should be implemented/fixed in the 0.3.0 version. priority/major Default priority of the PR or issue. and removed doc-not-needed Your PR changes do not impact docs labels Mar 19, 2026
@da-daken
Copy link
Copy Markdown
Author

da-daken commented Mar 22, 2026

hi @xintongsong , This push did not trigger CI. I noticed that the error message in CI indicates that astral-sh/setup-uv@v4 is not allowed, but I didn't add it. How should I resolve this issue? and hope you can review when you have time!

@xintongsong
Copy link
Copy Markdown
Contributor

@da-daken Sorry for the late response. It took us a bit time to fix the CI issue. Now the CI should be properly triggered.

@da-daken
Copy link
Copy Markdown
Author

@xintongsong Thank you for resolving the CI issue. Now the CI has all passed. You can review it when you have time. The plan is for both the Java side and the Python side to check whether their own classes exist, and then a consistency script will determine if both sides are consistent. This way, we can verify that the classes on both sides can be correctly loaded.

Copy link
Copy Markdown
Collaborator

@wenjin272 wenjin272 left a comment

Choose a reason for hiding this comment

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

Hi, @da-daken, thanks for your work. I think the three added tests—java ut, python ut, and java vs. python e2e—can ensure consistency in resource names. I left some minor comments.

echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Check code style
run: ./tools/lint.sh -c
- name: Check ResourceName consistency (Java vs Python)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think that placing consistency checks for resource names within code style checks is not entirely appropriate, because code style typically refers to the checking of coding conventions and rules within a single language. I think it is more appropriate to include it in the cross-language test.

test = [
"pytest==8.4.0",
"apache-flink>=1.20",
"cloudpickle",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If the consistency check for resource names is moved to the cross-language test, these additional dependencies are unnecessary because we manually install apache-flink in tools/e2e.sh.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

yes, you're right! thank you for your review! I will commit soon

tools/e2e.sh
- name: Check ResourceName consistency (Java vs Python)
working-directory: python
run: uv run --no-sync python ../tools/check_resource_consistency.py No newline at end of file
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think we can add this test to e2e.sh instead of creating a separate job stage.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yes, it looks cleaner this way, I will move it to e2e.sh

@wenjin272
Copy link
Copy Markdown
Collaborator

LGTM. Please take a look at your convenience @xintongsong .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-not-needed Your PR changes do not impact docs fixVersion/0.3.0 The feature or bug should be implemented/fixed in the 0.3.0 version. priority/major Default priority of the PR or issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants