diff --git a/acceptance/bundle/validate/strict/output.txt b/acceptance/bundle/validate/strict/output.txt index ca25c721f59..11f3f4944d8 100644 --- a/acceptance/bundle/validate/strict/output.txt +++ b/acceptance/bundle/validate/strict/output.txt @@ -33,7 +33,7 @@ Warning: invalid value "INVALID_TYPE" for enum field. Valid values are [complex] at variables.my_variable.type in databricks.yml:6:11 -Warning: invalid value "INVALID_TYPE" for enum field. Valid values are [whl jar] +Warning: invalid value "INVALID_TYPE" for enum field. Valid values are [whl jar tgz] at artifacts.my_artifact.type in databricks.yml:16:15 diff --git a/bundle/config/artifact.go b/bundle/config/artifact.go index cb029bcb4be..e24bc471899 100644 --- a/bundle/config/artifact.go +++ b/bundle/config/artifact.go @@ -12,11 +12,18 @@ const ArtifactPythonWheel ArtifactType = `whl` const ArtifactJar ArtifactType = `jar` +// ArtifactTarball is a gzipped tar of source files. Unlike `whl`/`jar` it carries +// no language-specific build defaults or wheel/jar semantics: the user's `build` +// command produces the tarball, which is then uploaded and referenced like any +// other artifact file (e.g. as an AI Runtime task's code_source_path). +const ArtifactTarball ArtifactType = `tgz` + // Values returns all valid ArtifactType values func (ArtifactType) Values() []ArtifactType { return []ArtifactType{ ArtifactPythonWheel, ArtifactJar, + ArtifactTarball, } } diff --git a/bundle/internal/schema/annotations.yml b/bundle/internal/schema/annotations.yml index e47f89c505a..951fab85422 100644 --- a/bundle/internal/schema/annotations.yml +++ b/bundle/internal/schema/annotations.yml @@ -58,9 +58,9 @@ artifacts: The local path of the directory for the artifact. "type": "description": |- - Required if the artifact is a Python wheel. The type of the artifact. Valid values are `whl` and `jar`. + Required if the artifact is a Python wheel. The type of the artifact. Valid values are `whl`, `jar`, and `tgz`. "markdown_description": |- - Required if the artifact is a Python wheel. The type of the artifact. Valid values are `whl` and `jar`. + Required if the artifact is a Python wheel. The type of the artifact. Valid values are `whl`, `jar`, and `tgz`. bundle: "description": |- The bundle attributes when deploying to this target. diff --git a/bundle/internal/validation/generated/enum_fields.go b/bundle/internal/validation/generated/enum_fields.go index 5e62e921687..25d181f9733 100644 --- a/bundle/internal/validation/generated/enum_fields.go +++ b/bundle/internal/validation/generated/enum_fields.go @@ -6,7 +6,7 @@ package generated // EnumFields maps [dyn.Pattern] to valid enum values they should have. var EnumFields = map[string][]string{ "artifacts.*.executable": {"bash", "sh", "cmd"}, - "artifacts.*.type": {"whl", "jar"}, + "artifacts.*.type": {"whl", "jar", "tgz"}, "permissions[*].level": {"CAN_ATTACH_TO", "CAN_BIND", "CAN_CREATE", "CAN_CREATE_APP", "CAN_EDIT", "CAN_EDIT_METADATA", "CAN_MANAGE", "CAN_MANAGE_PRODUCTION_VERSIONS", "CAN_MANAGE_RUN", "CAN_MANAGE_STAGING_VERSIONS", "CAN_MONITOR", "CAN_MONITOR_ONLY", "CAN_QUERY", "CAN_READ", "CAN_RESTART", "CAN_RUN", "CAN_USE", "CAN_VIEW", "CAN_VIEW_METADATA", "IS_OWNER"}, diff --git a/bundle/schema/jsonschema.json b/bundle/schema/jsonschema.json index 37246ebdff4..e0986597c9b 100644 --- a/bundle/schema/jsonschema.json +++ b/bundle/schema/jsonschema.json @@ -3172,9 +3172,9 @@ "$ref": "#/$defs/string" }, "type": { - "description": "Required if the artifact is a Python wheel. The type of the artifact. Valid values are `whl` and `jar`.", + "description": "Required if the artifact is a Python wheel. The type of the artifact. Valid values are `whl`, `jar`, and `tgz`.", "$ref": "#/$defs/github.com/databricks/cli/bundle/config.ArtifactType", - "markdownDescription": "Required if the artifact is a Python wheel. The type of the artifact. Valid values are `whl` and `jar`." + "markdownDescription": "Required if the artifact is a Python wheel. The type of the artifact. Valid values are `whl`, `jar`, and `tgz`." } }, "additionalProperties": false