Skip to content

Conversation

@manuzhang
Copy link
Member

No description provided.

kevinjqliu
kevinjqliu previously approved these changes Sep 18, 2025
Copy link
Contributor

@kevinjqliu kevinjqliu left a comment

Choose a reason for hiding this comment

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

Thanks!

This is a follow up to #1686 (comment)

@kevinjqliu
Copy link
Contributor

kevinjqliu commented Sep 18, 2025

I think this fix the original issue. WDYT of using the catch-all with exception logic similar to

pull_request:
branches:
- '**' # Include all files and directories in the repository by default.
- '!.github/workflows/**' # Exclude all workflow files
- '.github/workflows/ci.yml' # except the current file.
- '!.github/actions/**' # Exclude custom actions
- '!.github/ISSUE_TEMPLATE/**' # Exclude files and directories that don't impact tests or code like templates, metadata, and documentation.
- '!scripts/**'
- '!website/**'
- '!.asf.yml'
- '!.gitattributes'
- '!.gitignore'
- '!CONTRIBUTING.md'
- '!CHANGELOG.md'
- '!LICENSE'
- '!NOTICE'
- '!README.md'

I see there are other files that might affect the python-ci, like the rust-toolchain.toml or rustfmt.toml

@manuzhang
Copy link
Member Author

@kevinjqliu Sure, but I don't know why CI is triggered here. Do you have an idea?

@kevinjqliu
Copy link
Contributor

kevinjqliu commented Sep 18, 2025

ah! we're missing path here

push:
branches:
- main
pull_request:
branches:
- '**' # Include all files and directories in the repository by default.

see this example from pyiceberg https://github.com/apache/iceberg-python/blob/83789f0f078005e347ac866bc8f9b9402eabd270/.github/workflows/python-ci.yml#L22-L29
and the docs here https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#onpushpull_requestpull_request_targetpathspaths-ignore

Thanks LLM for catching this.

@manuzhang
Copy link
Member Author

@kevinjqliu Thanks, silly mistake. On the other hand, I don't want to trigger Bindings Python CI on all source code changes. If we add other modules in the future, we might need to modify this again.

@kevinjqliu
Copy link
Contributor

kevinjqliu commented Sep 18, 2025

I like the include all and then exclude file approach. think we can change .github/workflows/bindings_python_ci.yml to use that?
I think its better to run the CI checks more often for correctness. And in some cases, we can optimize and exclude files

I think ppl also wont realize that this logic is here. so its better to "catch all". WDYT?

Xuanwo
Xuanwo previously approved these changes Sep 18, 2025
@manuzhang manuzhang changed the title ci: Trigger Bindings Python CI on root Cargo.toml change ci: Fix triggering CI Sep 19, 2025
@kevinjqliu kevinjqliu merged commit c5cb9d5 into apache:main Sep 19, 2025
16 checks passed
- "crates/iceberg/**"
- "crates/integrations/datafusion/**"
- '**' # Include all files and directories in the repository by default.
- '!.github/workflows/**' # Exclude all workflow files
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this safe? I don't think we should exclude workflow files.

Copy link
Member Author

Choose a reason for hiding this comment

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

This combined with the following line includes only binding_python_ci.yml to trigger this workflow, while changes to other workflow files will not. Make sense?

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think it makes sense to exclude workflow changes, which may cause confusions. We should be careful when excluding files.

- '**' # Include all files and directories in the repository by default.
- '!.github/workflows/**' # Exclude all workflow files
- '.github/workflows/bindings_python_ci.yml' # except the current file.
- '!.github/actions/**' # Exclude custom actions
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above.

Copy link
Member Author

Choose a reason for hiding this comment

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

Can you explain how these actions are related to the bindings/python module?

Copy link
Contributor

Choose a reason for hiding this comment

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

Also why we don't run ci when we changes actions?

- '.github/workflows/bindings_python_ci.yml' # except the current file.
- '!.github/actions/**' # Exclude custom actions
- 'bindings/python/**' # Include source codes and its dependencies
- '!crates/**'
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we should exclude this.

Copy link
Member Author

Choose a reason for hiding this comment

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

This combined with the following two lines include crates/iceberg/** and crates/integrations/datafusion/**, which are depended on by bindings/python, to trigger this workflow.

Copy link
Contributor

Choose a reason for hiding this comment

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

When we change codes in crates, it may also affect python binding, see bindings/python/Cargo.toml:35

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, crates/iceberg and crates/integrations/datafusion are included below.

Copy link
Contributor

Choose a reason for hiding this comment

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

What I want to say is that we should not only focus on current status. For example, what if we added another crate and python binding relies on it, and the ci may not be triggerred. Yes you could argue that this could be resolved eventually, but it would be confusing for new contributor to see that ci can't detect the changes.

branches:
paths:
- '**' # Include all files and directories in the repository by default.
- '!.github/workflows/**' # Exclude all workflow files
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as python ci, please restore workflows, actions.

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.

4 participants