Skip to content

Fix workflow compiler tests by ignoring .files#13455

Open
ntny wants to merge 1 commit into
kubeflow:masterfrom
ntny:fix(tests)-ignore-dotfiles-in-workflow-compiler-inputs
Open

Fix workflow compiler tests by ignoring .files#13455
ntny wants to merge 1 commit into
kubeflow:masterfrom
ntny:fix(tests)-ignore-dotfiles-in-workflow-compiler-inputs

Conversation

@ntny
Copy link
Copy Markdown
Contributor

@ntny ntny commented May 30, 2026

macOS can create .DS_Store files when a directory is opened in Finder (see https://en.wikipedia.org/wiki/.DS_Store). The workflow compiler test helper collected all files from test_data so these hidden files could be treated as pipeline specs and break the tests.

This change adds dotfiles to the existing file filter and extracts the filter into a shared helper to avoid duplicating.

Description of your changes:

Checklist:

… are present in test data directories.

macOS can create `.DS_Store` files when a directory is opened in Finder (see https://en.wikipedia.org/wiki/.DS_Store). The workflow compiler test helper collected all files from test_data so these hidden files could be treated as pipeline specs and break the tests.

 This change adds dotfiles to the existing file filter and extracts the filter into a shared helper to avoid duplicating.

Signed-off-by: arpechenin <arpechenin@avito.ru>
Copilot AI review requested due to automatic review settings May 30, 2026 17:27
@google-oss-prow google-oss-prow Bot requested a review from mprahl May 30, 2026 17:27
@google-oss-prow
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign nsingla for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow Bot requested a review from zazulam May 30, 2026 17:27
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Refactors file filtering logic in test utilities into a shared helper and switches a file open call to read-only.

Changes:

  • Extracted file-filter logic into isPipelineTestFile helper, also excluding dotfiles.
  • Replaced two inline filter conditions with calls to the new helper.
  • Changed os.OpenFile(..., O_RDWR, 0o644) to os.Open(...) since the file is only read.

Comment on lines +119 to +125
func isPipelineTestFile(fileName string) bool {
return !strings.HasPrefix(fileName, ".") &&
!strings.Contains(fileName, ".py") &&
fileName != "Dockerfile" &&
!strings.Contains(fileName, ".md") &&
!strings.Contains(fileName, ".ipynb")
}
@ntny ntny changed the title Fix compiler tests with macOS hidden files Fix workflow compiler tests by ignoring dotfiles May 30, 2026
@ntny ntny changed the title Fix workflow compiler tests by ignoring dotfiles Fix workflow compiler tests by ignoring .files May 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants