diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 2af40dd85..5ae2c11bb 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -54,7 +54,9 @@ jobs: - name: Setup Go uses: actions/setup-go@v3 with: - go-version: 1.18.8 + # Use 1.19 because of godoc formatting. + # See https://tip.golang.org/doc/go1.19#go-doc. + go-version: 1.19 # No need to download cached dependencies when running gofmt. cache: false diff --git a/bundle/deployer/deployer.go b/bundle/deployer/deployer.go index ae355c4ab..ef46f65c4 100644 --- a/bundle/deployer/deployer.go +++ b/bundle/deployer/deployer.go @@ -47,9 +47,9 @@ const ( // // 1. Client compiles the bundle configuration to a terraform HCL config file // -// 2. Client tries to acquire a lock on the remote root of the project. -// -- If FAIL: print details about current holder of the deployment lock on -// remote root and terminate deployment +// 2. Client tries to acquire a lock on the remote root of the project. +// -- If FAIL: print details about current holder of the deployment lock on +// remote root and terminate deployment // // 3. Client reads terraform state from remote root // diff --git a/bundle/deployer/locker.go b/bundle/deployer/locker.go index 5af976bb7..4a2498b93 100644 --- a/bundle/deployer/locker.go +++ b/bundle/deployer/locker.go @@ -23,23 +23,23 @@ import ( // // Here are some of the details of the locking protocol used here: // -// 1. Potentially multiple clients race to create a deploy.lock file in -// TargetDir/.bundle directory with unique ID. The deploy.lock file -// is a json file containing the State from the locker +// 1. Potentially multiple clients race to create a deploy.lock file in +// TargetDir/.bundle directory with unique ID. The deploy.lock file +// is a json file containing the State from the locker // -// 2. Clients read the remote deploy.lock file and if it's ID matches, the client -// assumes it has the lock on TargetDir. The client is now free to read/write code -// asserts and deploy databricks assets scoped under TargetDir +// 2. Clients read the remote deploy.lock file and if it's ID matches, the client +// assumes it has the lock on TargetDir. The client is now free to read/write code +// asserts and deploy databricks assets scoped under TargetDir // -// 3. To sidestep clients failing to relinquish a lock during a failed deploy attempt -// we allow clients to forcefully acquire a lock on TargetDir. However forcefully acquired -// locks come with the following caveats: +// 3. To sidestep clients failing to relinquish a lock during a failed deploy attempt +// we allow clients to forcefully acquire a lock on TargetDir. However forcefully acquired +// locks come with the following caveats: // -// a. a forcefully acquired lock does not guarentee exclusive access to -// TargetDir's scope -// b. forcefully acquiring a lock(s) on TargetDir can break the assumption -// of exclusive access that other clients with non forcefully acquired -// locks might have +// a. a forcefully acquired lock does not guarentee exclusive access to +// TargetDir's scope +// b. forcefully acquiring a lock(s) on TargetDir can break the assumption +// of exclusive access that other clients with non forcefully acquired +// locks might have type Locker struct { // scope of the locker TargetDir string diff --git a/git/fileset.go b/git/fileset.go index 04d1bea77..fa9d5dabd 100644 --- a/git/fileset.go +++ b/git/fileset.go @@ -31,7 +31,8 @@ func (f File) Modified() (ts time.Time) { // // root: Root of the git repository // ignore: List of patterns defined in `.gitignore`. -// We do not sync files that match this pattern +// +// We do not sync files that match this pattern type FileSet struct { root string ignore *ignore.GitIgnore diff --git a/utilities/workspace_files.go b/utilities/workspace_files.go index 73e96c7a1..d3428d83f 100644 --- a/utilities/workspace_files.go +++ b/utilities/workspace_files.go @@ -21,8 +21,9 @@ import ( // TODO(Nov 2022): add method in go sdk to get the raw bytes from response of an API // // TODO(Nov 2022): talk to eng-files team about what the response structure would look like. -// This function would have to be modfified probably in the future once this -// API goes to public preview +// +// This function would have to be modfified probably in the future once this +// API goes to public preview func GetRawJsonFileContent(ctx context.Context, wsc *databricks.WorkspaceClient, path string) ([]byte, error) { apiClient, err := client.New(wsc.Config) if err != nil {