* Run go mod tidy
* Fix Github linting action
Changes:
* checkout before setting up go
* pin golangci-lint version
* Update supported db versions
* Use start-single-node instead of start for cockroachdb
As of Go 1.16, the same functionality is now provided by package io or
package os, and those implementations should be preferred in new code.
So replacing all usage of ioutil pkg with io & os.
* MSI Auth for SQL Server
Add MSI Auth option to SQL Server connection. Default if no password is provided in connection string.
* Parse resource endpoint from server for msi
update host name parsing to get just the resource endpoint for msi
* Update go-mssqldb
update go-mssqldb to resolve panic issue referenced here: https://github.com/denisenkom/go-mssqldb/pull/642
* Update sqlserver.go
switch from deprecated methods. NewServicePrincipalTokenFromManagedIdentity calls the two methods that are deprecated for us
* Update sqlserver.go
add useMsi param instead of looking for nil password
* Update sqlserver readme
Update sqlserver readme for msi auth. make useMsi a bit safer
* Update sqlserver.go
remove comment
* Update database/sqlserver/README.md
Co-authored-by: Keegan Campbell <[email protected]>
* Update sqlserver.go
refactor resource uri logic into its own method
* Update sqlserver_test.go
add tests for msi connection. can only test whether it fails with useMsi= true, or succeeds with useMsi=false
* Update sqlserver.go
check msi.EnsureFresh return value
* Return error for multiple auth and move query filter
move migrate.FilterCustomQuery(purl).String() into one line out of if/else. return error if both useMsi=true and password are passed
* Update README.md
update readme with warning for useMsi
* Update sqlserver_test.go
Update TestMsiFalse test case as now it should fail when useMsi=false and no password is provided
Co-authored-by: Keegan Campbell <[email protected]>
* used uber atomic bool instead standard in lock/unlock db
* fixing local lock optimization implementation
* fixing mysql local lock optimization implementation
* fixing cockroachdb local lock optimization implementation
* CAS wrapper to automatically restore
* added test for cas with restore
* added atomic lock to sqlite & mongo
* added atomic lock to sqlite & mongo
* fix/refactor test cas restore function
* disable lock for mongo
* mongo local lock before acquiring the db lock
Co-authored-by: a.prinkov <[email protected]>