Skip to content

fix: ensure start if using end#2347

Merged
eakmanrq merged 1 commit intomainfrom
eakmanrq/validate_start_if_end_defined
Mar 26, 2024
Merged

fix: ensure start if using end#2347
eakmanrq merged 1 commit intomainfrom
eakmanrq/validate_start_if_end_defined

Conversation

@eakmanrq
Copy link
Collaborator

Prior to this PR a user would get validation error if defining an end without start that wasn't clear on the issue. This validates prior to the actual value validation if an end is defined without a start and gives a more clear error.

I think requiring start with end seems reasonable. Open to other thoughts though.

@tobymao
Copy link
Contributor

tobymao commented Mar 26, 2024

would there be an issue if the project had a start?

@eakmanrq
Copy link
Collaborator Author

would there be an issue if the project had a start?

If you are talking about a model default start, then that is covered with this test: https://github.com/TobikoData/sqlmesh/blob/e42201548d30f092455ce6eac68e9b1b1cdb2282/tests/core/test_model.py#L3328-L3344

Copy link
Contributor

@tobymao tobymao left a comment

Choose a reason for hiding this comment

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

nice

@eakmanrq eakmanrq merged commit de6bfc4 into main Mar 26, 2024
@eakmanrq eakmanrq deleted the eakmanrq/validate_start_if_end_defined branch March 26, 2024 23:17
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.

2 participants