Fix(cicd_bot): Actually inherit project level auto categorization config as per docs#4799
Fix(cicd_bot): Actually inherit project level auto categorization config as per docs#4799
Conversation
8854288 to
fce51e8
Compare
| if self.physical_schema_mapping: | ||
| _normalize_identifiers("physical_schema_mapping") | ||
|
|
||
| if self.cicd_bot and not self.cicd_bot.auto_categorize_changes_: |
There was a problem hiding this comment.
I believe the name of the root validator no longer reflects its contents
|
I believe this was an intentional choice. @eakmanrq do you happen to have additional context? |
|
Yes I believe we got feedback from users saying they wanted the CI/CD to, by default, not make any changes on the behalf of the user and have them explicitly opt into that behavior if they want. Likely the documentation wasn't updated when this change was made. |
Interesting, doesn't that make the bot essentially fail by default? Or was the expectation that the user had already made the changes in their own virtual environment prior to raising the PR, so theoretically the snapshots in their virtual environment should be re-used in the PR environment without needing to be re-categorized? The surprising thing about this behaviour, at least for me, was trying to understand why running |
|
Based on internal conversation, i'll raise a new PR that adjusts the CI/CD bot defaults to align with the CLI |
|
New PR: #4900 |
The docs for the CICD bot say:
However, this is currently not true. The CICD bot sets
CategorizerConfig.all_off()if it's not explicitly defined which disables auto change categorization entirely by default.This is a high friction default because it means that a
sqlmesh planthat works fine locally throws an error about uncategorized changes when run on the CICD bot.This PR updates the bot config to actually inherit the project-level auto categorization settings if no specific settings are provided, ensuring consistency by default between a local
sqlmesh planand a plan run by the bot.