Make file, artifact and state path optional (#204)

This PR makes bundle name required, and a few fields with defined
defaults optional, to generate a better json schema
This commit is contained in:
shreyas-goenka 2023-02-17 02:49:39 +01:00 committed by GitHub
parent 58950ce507
commit 0ab2aa1bfa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -5,7 +5,7 @@ type Terraform struct {
} }
type Bundle struct { type Bundle struct {
Name string `json:"name,omitempty"` Name string `json:"name"`
// TODO // TODO
// Default cluster to run commands on (Python, Scala). // Default cluster to run commands on (Python, Scala).

View File

@ -50,19 +50,19 @@ type Workspace struct {
// Remote base path for deployment state, for artifacts, as synchronization target. // Remote base path for deployment state, for artifacts, as synchronization target.
// This defaults to "~/.bundle/${bundle.name}/${bundle.environment}" where "~" expands to // This defaults to "~/.bundle/${bundle.name}/${bundle.environment}" where "~" expands to
// the current user's home directory in the workspace (e.g. `/Users/jane@doe.com`). // the current user's home directory in the workspace (e.g. `/Users/jane@doe.com`).
Root string `json:"root"` Root string `json:"root,omitempty"`
// Remote path to synchronize local files to. // Remote path to synchronize local files to.
// This defaults to "${workspace.root}/files". // This defaults to "${workspace.root}/files".
FilePath PathLike `json:"file_path"` FilePath PathLike `json:"file_path,omitempty"`
// Remote path for build artifacts. // Remote path for build artifacts.
// This defaults to "${workspace.root}/artifacts". // This defaults to "${workspace.root}/artifacts".
ArtifactPath PathLike `json:"artifact_path"` ArtifactPath PathLike `json:"artifact_path,omitempty"`
// Remote path for deployment state. // Remote path for deployment state.
// This defaults to "${workspace.root}/state". // This defaults to "${workspace.root}/state".
StatePath PathLike `json:"state_path"` StatePath PathLike `json:"state_path,omitempty"`
} }
func (w *Workspace) Client() (*databricks.WorkspaceClient, error) { func (w *Workspace) Client() (*databricks.WorkspaceClient, error) {