Skip to content

feat: support config as dir path only#143

Merged
b-per merged 3 commits into
dbt-labs:mainfrom
il-dat:feat/support-folder-path-windows
Apr 10, 2025
Merged

feat: support config as dir path only#143
b-per merged 3 commits into
dbt-labs:mainfrom
il-dat:feat/support-folder-path-windows

Conversation

@il-dat
Copy link
Copy Markdown
Contributor

@il-dat il-dat commented Apr 10, 2025

This is to support to pass the CONFIG as a Directory Path instead of glob pattern, in particular to support Windows users who use CMD and to deal with the glob pattern with * character since CMD dislikes this character.

Sample command that failed with Error when trying to Plan/Sync 2+ yml files:

# Error: Got extra arguments (xxx/file2.yml)
dbt-jobs-as-code plan path/to/jobs/*.yml
dbt-jobs-as-code "plan path/to/jobs/*.yml"

# No error but no files detected in the path `path/to/jobs/^*.yml `
dbt-jobs-as-code plan path/to/jobs/^*.yml # ^ is to escape * in CMD

Expected result:

These commands are equivalent:

dbt-jobs-as-code plan path/to/jobs/*.yml
dbt-jobs-as-code plan path/to/jobs

@il-dat il-dat requested a review from a team as a code owner April 10, 2025 07:02
dbt-jobs-as-code plan path/to/jobs/*.yml
dbt-jobs-as-code plan path/to/jobs
@il-dat
Copy link
Copy Markdown
Contributor Author

il-dat commented Apr 10, 2025

@b-per Could you please help to review this? TY

@b-per b-per added the ci-ok Allow running CI from external contributors label Apr 10, 2025
@github-actions
Copy link
Copy Markdown
Contributor

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/dbt_jobs_as_code
   main.py29415049%106–109, 115, 142–143, 172–175, 181, 216–300, 371–376, 389–390, 408–409, 413–415, 432–481, 511–555, 586–631, 636–637, 641
src/dbt_jobs_as_code/client
   __init__.py1775867%16, 53–54, 62, 89–104, 119–120, 139–140, 147–157, 170–171, 187–188, 205, 215, 245–247, 289–304, 327, 343–344, 354–366, 369–380, 385–394
src/dbt_jobs_as_code/cloud_yaml_mapping
   change_set.py1813481%25–27, 43, 56, 62–63, 120–121, 159, 171, 193, 197–198, 204–206, 221–224, 256–270, 295–304, 323–345, 381–395
src/dbt_jobs_as_code/importer
   __init__.py27774%14–15, 22–27
src/dbt_jobs_as_code/loader
   load.py96199%142
src/dbt_jobs_as_code/schemas
   __init__.py23291%68, 78
   common_types.py621084%7–8, 12–13, 29–30, 67–68, 86, 92
   config.py14379%18, 24–25
   job.py107298%206, 211
TOTAL106926775% 

Tests Skipped Failures Errors Time
87 0 💤 0 ❌ 0 🔥 10.916s ⏱️

@b-per b-per merged commit 3924013 into dbt-labs:main Apr 10, 2025
5 checks passed
@il-dat il-dat deleted the feat/support-folder-path-windows branch April 10, 2025 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-ok Allow running CI from external contributors

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants