Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgraded Go version to 1.21 #664

Merged
merged 3 commits into from
Aug 15, 2023
Merged

Upgraded Go version to 1.21 #664

merged 3 commits into from
Aug 15, 2023

Conversation

andrewnester
Copy link
Contributor

@andrewnester andrewnester commented Aug 15, 2023

Changes

Upgraded Go version to 1.21

Upgraded to use slices and slog from core instead of experimental.

Still use exp/maps as our code relies on maps.Keys which is not part of core package and therefore refactoring required.

Tests

Integration tests passed

[DEBUG] Test execution command:  /opt/homebrew/opt/go@1.21/bin/go test ./... -json -timeout 1h -run ^TestAcc
[DEBUG] Test execution directory:  /Users/andrew.nester/cli
2023/08/15 13:20:51 [INFO] ✅ TestAccAlertsCreateErrWhenNoArguments (2.150s)
2023/08/15 13:20:52 [INFO] ✅ TestAccApiGet (0.580s)
2023/08/15 13:20:53 [INFO] ✅ TestAccClustersList (0.900s)
2023/08/15 13:20:54 [INFO] ✅ TestAccClustersGet (0.870s)
2023/08/15 13:21:06 [INFO] ✅ TestAccFilerWorkspaceFilesReadWrite (11.980s)
2023/08/15 13:21:13 [INFO] ✅ TestAccFilerWorkspaceFilesReadDir (7.060s)
2023/08/15 13:21:25 [INFO] ✅ TestAccFilerDbfsReadWrite (12.810s)
2023/08/15 13:21:33 [INFO] ✅ TestAccFilerDbfsReadDir (7.380s)
2023/08/15 13:21:41 [INFO] ✅ TestAccFilerWorkspaceNotebookConflict (7.760s)
2023/08/15 13:21:49 [INFO] ✅ TestAccFilerWorkspaceNotebookWithOverwriteFlag (8.660s)
2023/08/15 13:21:49 [INFO] ✅ TestAccFilerLocalReadWrite (0.020s)
2023/08/15 13:21:49 [INFO] ✅ TestAccFilerLocalReadDir (0.010s)
2023/08/15 13:21:52 [INFO] ✅ TestAccFsCatForDbfs (3.190s)
2023/08/15 13:21:53 [INFO] ✅ TestAccFsCatForDbfsOnNonExistentFile (0.890s)
2023/08/15 13:21:54 [INFO] ✅ TestAccFsCatForDbfsInvalidScheme (0.600s)
2023/08/15 13:21:57 [INFO] ✅ TestAccFsCatDoesNotSupportOutputModeJson (2.960s)
2023/08/15 13:22:28 [INFO] ✅ TestAccFsCpDir (31.480s)
2023/08/15 13:22:43 [INFO] ✅ TestAccFsCpFileToFile (14.530s)
2023/08/15 13:22:58 [INFO] ✅ TestAccFsCpFileToDir (14.610s)
2023/08/15 13:23:29 [INFO] ✅ TestAccFsCpDirToDirFileNotOverwritten (31.810s)
2023/08/15 13:23:47 [INFO] ✅ TestAccFsCpFileToDirFileNotOverwritten (17.500s)
2023/08/15 13:24:04 [INFO] ✅ TestAccFsCpFileToFileFileNotOverwritten (17.260s)
2023/08/15 13:24:37 [INFO] ✅ TestAccFsCpDirToDirWithOverwriteFlag (32.690s)
2023/08/15 13:24:56 [INFO] ✅ TestAccFsCpFileToFileWithOverwriteFlag (19.290s)
2023/08/15 13:25:15 [INFO] ✅ TestAccFsCpFileToDirWithOverwriteFlag (19.230s)
2023/08/15 13:25:17 [INFO] ✅ TestAccFsCpErrorsWhenSourceIsDirWithoutRecursiveFlag (2.010s)
2023/08/15 13:25:18 [INFO] ✅ TestAccFsCpErrorsOnInvalidScheme (0.610s)
2023/08/15 13:25:33 [INFO] ✅ TestAccFsCpSourceIsDirectoryButTargetIsFile (14.900s)
2023/08/15 13:25:37 [INFO] ✅ TestAccFsLsForDbfs (3.770s)
2023/08/15 13:25:41 [INFO] ✅ TestAccFsLsForDbfsWithAbsolutePaths (4.160s)
2023/08/15 13:25:44 [INFO] ✅ TestAccFsLsForDbfsOnFile (2.990s)
2023/08/15 13:25:46 [INFO] ✅ TestAccFsLsForDbfsOnEmptyDir (1.870s)
2023/08/15 13:25:46 [INFO] ✅ TestAccFsLsForDbfsForNonexistingDir (0.850s)
2023/08/15 13:25:47 [INFO] ✅ TestAccFsLsWithoutScheme (0.560s)
2023/08/15 13:25:49 [INFO] ✅ TestAccFsMkdirCreatesDirectory (2.310s)
2023/08/15 13:25:52 [INFO] ✅ TestAccFsMkdirCreatesMultipleDirectories (2.920s)
2023/08/15 13:25:55 [INFO] ✅ TestAccFsMkdirWhenDirectoryAlreadyExists (2.320s)
2023/08/15 13:25:57 [INFO] ✅ TestAccFsMkdirWhenFileExistsAtPath (2.820s)
2023/08/15 13:26:01 [INFO] ✅ TestAccFsRmForFile (4.030s)
2023/08/15 13:26:05 [INFO] ✅ TestAccFsRmForEmptyDirectory (3.530s)
2023/08/15 13:26:08 [INFO] ✅ TestAccFsRmForNonEmptyDirectory (3.190s)
2023/08/15 13:26:09 [INFO] ✅ TestAccFsRmForNonExistentFile (0.830s)
2023/08/15 13:26:13 [INFO] ✅ TestAccFsRmForNonEmptyDirectoryWithRecursiveFlag (3.580s)
2023/08/15 13:26:13 [INFO] ✅ TestAccGitClone (0.800s)
2023/08/15 13:26:14 [INFO] ✅ TestAccGitCloneWithOnlyRepoNameOnAlternateBranch (0.790s)
2023/08/15 13:26:15 [INFO] ✅ TestAccGitCloneErrorsWhenRepositoryDoesNotExist (0.540s)
2023/08/15 13:26:23 [INFO] ✅ TestAccLock (8.630s)
2023/08/15 13:26:27 [INFO] ✅ TestAccLockUnlockWithoutAllowsLockFileNotExist (3.490s)
2023/08/15 13:26:30 [INFO] ✅ TestAccLockUnlockWithAllowsLockFileNotExist (3.130s)
2023/08/15 13:26:39 [INFO] ✅ TestAccSyncFullFileSync (9.370s)
2023/08/15 13:26:50 [INFO] ✅ TestAccSyncIncrementalFileSync (10.390s)
2023/08/15 13:27:00 [INFO] ✅ TestAccSyncNestedFolderSync (10.680s)
2023/08/15 13:27:11 [INFO] ✅ TestAccSyncNestedFolderDoesntFailOnNonEmptyDirectory (10.970s)
2023/08/15 13:27:22 [INFO] ✅ TestAccSyncNestedSpacePlusAndHashAreEscapedSync (10.930s)
2023/08/15 13:27:29 [INFO] ✅ TestAccSyncIncrementalFileOverwritesFolder (7.020s)
2023/08/15 13:27:37 [INFO] ✅ TestAccSyncIncrementalSyncPythonNotebookToFile (7.380s)
2023/08/15 13:27:43 [INFO] ✅ TestAccSyncIncrementalSyncFileToPythonNotebook (6.050s)
2023/08/15 13:27:48 [INFO] ✅ TestAccSyncIncrementalSyncPythonNotebookDelete (5.390s)
2023/08/15 13:27:51 [INFO] ✅ TestAccSyncEnsureRemotePathIsUsableIfRepoDoesntExist (2.570s)
2023/08/15 13:27:56 [INFO] ✅ TestAccSyncEnsureRemotePathIsUsableIfRepoExists (5.540s)
2023/08/15 13:27:58 [INFO] ✅ TestAccSyncEnsureRemotePathIsUsableInWorkspace (1.840s)
2023/08/15 13:27:59 [INFO] ✅ TestAccWorkspaceList (0.790s)
2023/08/15 13:28:08 [INFO] ✅ TestAccExportDir (8.860s)
2023/08/15 13:28:11 [INFO] ✅ TestAccExportDirDoesNotOverwrite (3.090s)
2023/08/15 13:28:14 [INFO] ✅ TestAccExportDirWithOverwriteFlag (3.500s)
2023/08/15 13:28:23 [INFO] ✅ TestAccImportDir (8.330s)
2023/08/15 13:28:34 [INFO] ✅ TestAccImportDirDoesNotOverwrite (10.970s)
2023/08/15 13:28:44 [INFO] ✅ TestAccImportDirWithOverwriteFlag (10.130s)
2023/08/15 13:28:44 [INFO] ✅ 68/68 passed, 0 failed, 3 skipped

@pietern
Copy link
Contributor

pietern commented Aug 15, 2023

Please also run integration tests to cover our bases.

Follow up to this PR should be to incorporate the new stdlib additions.

We use some of them from the exp package at the moment.

Standard library additions

  • New log/slog package for structured logging.
  • New slices package for common operations on slices of any element type. This includes sorting functions that are generally faster and more ergonomic than the sort package.
  • New maps package for common operations on maps of any key or element type.
  • New cmp package with new utilities for comparing ordered values.

@pietern
Copy link
Contributor

pietern commented Aug 15, 2023

Blog post: https://go.dev/blog/go1.21

Copy link
Contributor

@pietern pietern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you find a notable diff between the versions of the libraries we were using before?

@@ -9,10 +9,11 @@ import (
"sort"
"strings"

"slices"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formatting?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's not formatted correctly because there's a new line before but technically it's a correct formatting still

@andrewnester andrewnester added this pull request to the merge queue Aug 15, 2023
Merged via the queue into main with commit 6e708da Aug 15, 2023
4 checks passed
@andrewnester andrewnester deleted the go1.21 branch August 15, 2023 13:59
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)).
@pietern pietern mentioned this pull request Aug 16, 2023
github-merge-queue bot 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)).
Sign up for free to 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.

None yet

2 participants