Skip to content

Return better error messages for invalid JSON schema types in templates - #661

Merged
shreyas-goenka merged 4 commits into
mainfrom
better-template-type-errors
Aug 15, 2023
Merged

Return better error messages for invalid JSON schema types in templates#661
shreyas-goenka merged 4 commits into
mainfrom
better-template-type-errors

Conversation

@shreyas-goenka

@shreyas-goenkashreyas-goenka commented Aug 14, 2023

Copy link
Copy Markdown
Contributor

Changes

Adds a function to validate json schema types added by the author. The default json unmarshaller does not validate that the parsed type matches the enum defined in jsonschema.Type

Includes some other improvements to provide better error messages.

This PR was prompted by usability difficulties reported by @mingyu89 during mlops stack migration.

Tests

Unit tests

@shreyas-goenkashreyas-goenka changed the title Add better error messages for invalid JSON schema typesReturn better error messages for invalid JSON schema typesAug 14, 2023
@shreyas-goenkashreyas-goenka changed the title Return better error messages for invalid JSON schema typesReturn better error messages for invalid JSON schema types in templatesAug 14, 2023
Comment threadlibs/template/config.go Outdated
Comment threadlibs/template/config.go Outdated
Comment threadlibs/template/config.go
@shreyas-goenka
shreyas-goenka added this pull request to the merge queueAug 15, 2023
Merged via the queue into main with commit 878bb6dAug 15, 2023
@shreyas-goenka
shreyas-goenka deleted the better-template-type-errors branch August 15, 2023 14:34
pietern added a commit that referenced this pull request Aug 16, 2023
CLI:
* Always resolve .databrickscfg file ([#659](#659)).
Bundles:
* Add internal tag for bundle fields to be skipped from schema ([#636](#636)).
* Log the bundle root configuration file if applicable ([#657](#657)).
* Execute paths without the .tmpl extension as templates ([#654](#654)).
* Enable environment overrides for job clusters ([#658](#658)).
* Merge artifacts and resources block with overrides enabled ([#660](#660)).
* Locked terraform binary version to <= 1.5.5 ([#666](#666)).
* Return better error messages for invalid JSON schema types in templates ([#661](#661)).
* Use custom prompter for bundle template inputs ([#663](#663)).
* Add map and pair helper functions for bundle templates ([#665](#665)).
* Correct name for force acquire deploy flag ([#656](#656)).
* Confirm that override with a zero value doesn't work ([#669](#669)).
Internal:
* Consolidate functions in libs/git ([#652](#652)).
* Upgraded Go version to 1.21 ([#664](#664)).
@pieternpietern mentioned this pull request Aug 16, 2023
github-merge-queueBot pushed a commit that referenced this pull request Aug 16, 2023
CLI:
* Always resolve .databrickscfg file
([#659](#659)).
Bundles:
* Add internal tag for bundle fields to be skipped from schema
([#636](#636)).
* Log the bundle root configuration file if applicable
([#657](#657)).
* Execute paths without the .tmpl extension as templates
([#654](#654)).
* Enable environment overrides for job clusters
([#658](#658)).
* Merge artifacts and resources block with overrides enabled
([#660](#660)).
* Locked terraform binary version to <= 1.5.5
([#666](#666)).
* Return better error messages for invalid JSON schema types in
templates ([#661](#661)).
* Use custom prompter for bundle template inputs
([#663](#663)).
* Add map and pair helper functions for bundle templates
([#665](#665)).
* Correct name for force acquire deploy flag
([#656](#656)).
* Confirm that override with a zero value doesn't work
([#669](#669)).
Internal:
* Consolidate functions in libs/git
([#652](#652)).
* Upgraded Go version to 1.21
([#664](#664)).
denik pushed a commit that referenced this pull request May 20, 2026
…es (#661)
## Changes
Adds a function to validate json schema types added by the author. The
default json unmarshaller does not validate that the parsed type matches
the enum defined in `jsonschema.Type`
Includes some other improvements to provide better error messages.
This PR was prompted by usability difficulties reported by @mingyu89
during mlops stack migration.
## Tests
Unit tests
denik pushed a commit that referenced this pull request May 20, 2026
CLI:
* Always resolve .databrickscfg file
([#659](#659)).
Bundles:
* Add internal tag for bundle fields to be skipped from schema
([#636](#636)).
* Log the bundle root configuration file if applicable
([#657](#657)).
* Execute paths without the .tmpl extension as templates
([#654](#654)).
* Enable environment overrides for job clusters
([#658](#658)).
* Merge artifacts and resources block with overrides enabled
([#660](#660)).
* Locked terraform binary version to <= 1.5.5
([#666](#666)).
* Return better error messages for invalid JSON schema types in
templates ([#661](#661)).
* Use custom prompter for bundle template inputs
([#663](#663)).
* Add map and pair helper functions for bundle templates
([#665](#665)).
* Correct name for force acquire deploy flag
([#656](#656)).
* Confirm that override with a zero value doesn't work
([#669](#669)).
Internal:
* Consolidate functions in libs/git
([#652](#652)).
* Upgraded Go version to 1.21
([#664](#664)).
Sign up for freeto 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.

3 participants

@shreyas-goenka@pietern@andrewnester