Skip to content
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

Switch to folders.FindDirWithLeaf #1963

Merged
merged 7 commits into from
Dec 11, 2024
Merged

Switch to folders.FindDirWithLeaf #1963

merged 7 commits into from
Dec 11, 2024

Conversation

denik
Copy link
Contributor

@denik denik commented Dec 5, 2024

Changes

Remove two duplicate implementations of the same logic, switch everywhere to folders.FindDirWithLeaf.

Add Abs() call to FindDirWithLeaf, it cannot really work on relative paths.

Tests

Existing tests.

@denik denik temporarily deployed to test-trigger-is December 5, 2024 10:43 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is December 5, 2024 10:44 — with GitHub Actions Inactive
@denik denik enabled auto-merge December 5, 2024 10:44
@denik denik temporarily deployed to test-trigger-is December 6, 2024 11:27 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is December 6, 2024 11:28 — with GitHub Actions Inactive
@denik denik disabled auto-merge December 6, 2024 11:28
denik added 2 commits December 9, 2024 17:02
The git module now uses alternative implementation that uses os module + strings as path directly (#1945).

The remaining use case is also updated to use git.FindLeafInTree, as it's a better fit.
@denik denik force-pushed the DECO-24125--cleanup-vfs-leaf branch from c197c74 to 2e102b7 Compare December 9, 2024 16:02
@denik denik temporarily deployed to test-trigger-is December 9, 2024 16:03 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is December 9, 2024 16:03 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is December 9, 2024 16:44 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is December 9, 2024 16:44 — with GitHub Actions Inactive
Copy link
Contributor

@pietern pietern left a comment

Choose a reason for hiding this comment

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

@denik I forgot: we have this function implemented exactly under libs/folders. You could use that instead of a separate copy. We use this as well to find the bundle root (looking for a databricks.yml file).

@denik denik temporarily deployed to test-trigger-is December 10, 2024 13:24 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is December 10, 2024 13:24 — with GitHub Actions Inactive
@denik denik changed the title Clean up vfs/leaf.go Switch to folders.FindDirWithLeaf Dec 10, 2024
@denik denik temporarily deployed to test-trigger-is December 10, 2024 13:26 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is December 10, 2024 13:26 — with GitHub Actions Inactive
@denik
Copy link
Contributor Author

denik commented Dec 10, 2024

@denik I forgot: we have this function implemented exactly under libs/folders. You could use that instead of a separate copy. We use this as well to find the bundle root (looking for a databricks.yml file).

Good catch! Switched everything to use that.

@denik denik temporarily deployed to test-trigger-is December 10, 2024 13:30 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is December 10, 2024 13:30 — with GitHub Actions Inactive
@pietern pietern changed the title Switch to folders.FindDirWithLeaf Switch to folders.FindDirWithLeaf Dec 10, 2024
Copy link
Contributor

@pietern pietern left a comment

Choose a reason for hiding this comment

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

Thank you!

@pietern
Copy link
Contributor

pietern commented Dec 10, 2024

(I Markdown-ified the title to show up nicely in the GitHub release notes)

@denik denik temporarily deployed to test-trigger-is December 10, 2024 15:21 — with GitHub Actions Inactive
Copy link

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/cli

Inputs:

  • PR number: 1963
  • Commit SHA: 1e7d06cc3e1cd0c28b1d0e83cc7f0a52f18f4311

Checks will be approved automatically on success.

@denik denik temporarily deployed to test-trigger-is December 10, 2024 15:21 — with GitHub Actions Inactive
@eng-dev-ecosystem-bot
Copy link
Collaborator

Test Details: go/deco-tests/12259236623

@denik
Copy link
Contributor Author

denik commented Dec 11, 2024

Integration test failure is unrelated (TestAccBundleDeployUcSchema)

@denik denik merged commit 4236e71 into main Dec 11, 2024
10 of 11 checks passed
@denik denik deleted the DECO-24125--cleanup-vfs-leaf branch December 11, 2024 08:44
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.

5 participants