Skip to content

feat: make schedule optional for ci and merge jobs#192

Merged
b-per merged 2 commits into
mainfrom
fix/optional-schedule-for-merge-ci
Feb 20, 2026
Merged

feat: make schedule optional for ci and merge jobs#192
b-per merged 2 commits into
mainfrom
fix/optional-schedule-for-merge-ci

Conversation

@b-per
Copy link
Copy Markdown
Collaborator

@b-per b-per commented Feb 20, 2026

Summary

  • Makes the schedule block optional for ci and merge job types, since a cron schedule is not functionally relevant for those jobs
  • Adds if/then/else conditional to the JSON schema so editor validation (yaml-language-server) also enforces the conditional requirement
  • Adds a CI test to catch stale JSON schemas when models change

Closes #190

Test plan

  • Pydantic validation: ci/merge jobs work without schedule, scheduled/other jobs still require it
  • JSON schema validation: mirrors the same conditional logic
  • All 138 tests pass
  • Existing configs with schedule provided continue to work for all job types

Closes #190. For ci and merge jobs, the schedule block is not
functionally relevant. This makes it optional in both the Pydantic
model (with a validator that defaults it) and the JSON schema
(using if/then/else conditional).
@github-actions
Copy link
Copy Markdown
Contributor

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/dbt_jobs_as_code
   main.py31016048%120–123, 129, 168–169, 200–203, 209, 245–329, 400–405, 418–419, 437–438, 442–444, 461–510, 539–597, 628–673, 678–679, 683
src/dbt_jobs_as_code/client
   __init__.py1796066%16, 53–54, 62, 89–104, 119–120, 139–140, 147–157, 170–171, 187–188, 205, 215, 245–253, 295–310, 333, 349–350, 360–372, 375–386, 391–400
src/dbt_jobs_as_code/cloud_yaml_mapping
   change_set.py2353087%27–29, 59, 65–66, 155, 212, 224, 247, 251–252, 258–260, 275–278, 334–348, 401–423, 459–473
src/dbt_jobs_as_code/importer
   __init__.py27774%14–15, 22–27
src/dbt_jobs_as_code/schemas
   __init__.py23291%68, 78
   common_types.py60395%67–68, 91
   config.py14193%18
   job.py130695%227, 232, 248–257
TOTAL118026977% 

Tests Skipped Failures Errors Time
138 0 💤 0 ❌ 0 🔥 13.083s ⏱️

@b-per
Copy link
Copy Markdown
Collaborator Author

b-per commented Feb 20, 2026

CI passed 🚀

@b-per b-per merged commit d22abfd into main Feb 20, 2026
9 checks passed
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.

merge job requires schedule parameter, even when schedule trigger is disabled

1 participant