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

Handle NULL values in UniqueIdentifier.Scan() #163

Merged
merged 11 commits into from
Feb 21, 2024

Conversation

ngehrsitz
Copy link

As mentioned in denisenkom#56 (comment) the current implementation does not handle NULL values gracefully when scanning UUIDs.
In this PR I propose the simple solution to treat such values like an all zeros UUID.

uniqueidentifier.go Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Oct 26, 2023

Codecov Report

Merging #163 (34e68bc) into main (c902b67) will increase coverage by 0.26%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #163      +/-   ##
==========================================
+ Coverage   74.33%   74.59%   +0.26%     
==========================================
  Files          31       32       +1     
  Lines        6253     6298      +45     
==========================================
+ Hits         4648     4698      +50     
+ Misses       1326     1322       -4     
+ Partials      279      278       -1     
Files Coverage Δ
uniqueidentifier_null.go 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

@shueybubbles
Copy link
Collaborator

shueybubbles commented Oct 27, 2023

Isn't there some concern that a behavior change like this should be a breaking change instead of a silent change? If some apps start thinking they are now getting valid guids when they are not, it could cause issues.
Maybe this mode should be configurable in the connection string or by some global flag and be off by default. #Closed

@shueybubbles
Copy link
Collaborator

shueybubbles commented Oct 27, 2023

Here's an idea - maybe the driver should allow apps to provide their own data type/scanner implementation for some types. The lack of interoperability between mssql types and other Go packages, and the lack of type definitions provided by the core sql/driver package, are hard problems for a driver to solve in isolation. If an app wants to use google/uuid which has a nullable format, why not allow the app to replacemssql.UniqueIdentifier with that type as the registered encoder/decoder for mssql.typeGuid? #Closed

@ngehrsitz
Copy link
Author

@microsoft-github-policy-service agree

@ngehrsitz
Copy link
Author

Isn't there some concern that a behavior change like this should be a breaking change instead of a silent change? If some apps start thinking they are now getting valid guids when they are not, it could cause issues. Maybe this mode should be configurable in the connection string or by some global flag and be off by default.

I do agree that a breaking change poses the risk of breaking implementations that rely on erroring out on NULL uuids. But instead of coming up with some complicated configuration mechanism I would just define a different type like NullableUniqueIdentifier.

@ngehrsitz
Copy link
Author

Here's an idea - maybe the driver should allow apps to provide their own data type/scanner implementation for some types. The lack of interoperability between mssql types and other Go packages, and the lack of type definitions provided by the core sql/driver package, are hard problems for a driver to solve in isolation. If an app wants to use google/uuid which has a nullable format, why not allow the app to replacemssql.UniqueIdentifier with that type as the registered encoder/decoder for mssql.typeGuid?

I am actually converting in my code to a google/uuid afterward so you do a have a point there. The main reason why you can´t just use any sql.Scanner implementation is that the byte order when reading from the DB is different:

var raw UniqueIdentifier
copy(raw[:], vt)
reverse(raw[0:4])
reverse(raw[4:6])
reverse(raw[6:8])
*u = raw

So we would have to reverse that before handing the data to the Scan() method. Where would you do that then?
From my limited understanding you would have to add that reversing logic somewhere to
func convertAssign(dest, src interface{}) error {

when you invoke

go-mssqldb/convert.go

Lines 162 to 164 in c902b67

if scanner, ok := dest.(sql.Scanner); ok {
return scanner.Scan(src)
}

But then how do you differentiate between Scanners that handle UUIDs which need to have their input reordered and everything else?
The only solution to the byte reordering challenge I can think of is creating a wrapper like this:

type UUIDWrapper[X sql.Scanner] struct {
	uuid X
}

func (u UUIDWrapper[X]) Scan(v interface{}) error {
	reverse := func(b []byte) {
		for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
			b[i], b[j] = b[j], b[i]
		}
	}

	switch vt := v.(type) {
	case [16]byte:
		var raw [16]byte

		copy(raw[:], vt[:])

		reverse(raw[0:4])
		reverse(raw[4:6])
		reverse(raw[6:8])

		return u.uuid.Scan(v)
	default:
		return u.uuid.Scan(v)
	}
}

But that requires upgrading the package to 1.18 to get generics support...

@shueybubbles
Copy link
Collaborator

shueybubbles commented Oct 30, 2023

a NullableUniqueIdentifier type sounds fine to me. Any app that wants to work correctly with the driver version having this fix is going to need to change its code anyway.

re: my suggestion about letting the app replace the typeGuid reader, I meant perhaps allowing decodeGuid to be replaced by an app-provided function. It would know it needs to reverse the bytes for consumption by the scanner. Or provide some boolean flag the app could set so the driver reverses the bytes. I guess there'd be corresponding changes needed for inserts/writes which could be harder to do because the driver doesn't know the input is meant to be a guid.

Without something defined for guids in sql package this problem is going to linger. Also, for new features like Always Encrypted to work, an app can't rely on the driver to guess which type to use for inserts based on the Go type. We need a way for the app to specify the SQL Server type explicitly for encrypted columns.
#Closed

Copy link
Author

@ngehrsitz ngehrsitz left a comment

Choose a reason for hiding this comment

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

I think the whole deserialization logic needs a bigger overhaul than what´s possible as part of this PR. The way in which it could work is that you pass down the declared data type from the database table into the deserialization logic. Then the logic has all the information and can apply needed data transformations like byte reordering for the uuid type, before handing control to external deserialization functions.
To address this issue for now I force-pushed the new NullableUniqueIdentifier type here, which borrows everything from UniqueIdentifier, but can also handle the nil case.

uniqueidentifier_nullable.go Outdated Show resolved Hide resolved
var sut UniqueIdentifier
scanErr := sut.Scan(int(1))
if scanErr == nil {
t.Fatal(scanErr)
Copy link
Collaborator

Choose a reason for hiding this comment

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

(scanErr)

an error message would be more helpful than nil

Copy link
Author

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

?

"database/sql/driver"
)

type NullableUniqueIdentifier UniqueIdentifier
Copy link
Collaborator

@shueybubbles shueybubbles Nov 2, 2023

Choose a reason for hiding this comment

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

ullableUniqueIdentifie

It might be more idiomatic with the nullable types from the sql package (NullInt64, NullString, etc) to use the same pattern.

type NullUniqueIdentifier struct
{
    UniqueIdentifier UniqueIdentifier
    Valid bool
}

Copy link
Author

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

what about a Valid bool instead of relying on an array of zeroes? The empty guid might be a valid non-null value for some applications.

Copy link
Author

Choose a reason for hiding this comment

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

@shueybubbles
Copy link
Collaborator

update the README to show an example usage. Also , add usage of this type to some of the cross-cutting tests like bulk copy.

@ngehrsitz
Copy link
Author

update the README to show an example usage. Also , add usage of this type to some of the cross-cutting tests like bulk copy.

I added it to 667bccf. Any other tests you had in mind?
Where in the READMEshould this go? There is currently no mention of UniqueIdentifier and it doesn´t really fit in Parameter Types...

@shueybubbles
Copy link
Collaborator

update the README to show an example usage. Also , add usage of this type to some of the cross-cutting tests like bulk copy.

I added it to 667bccf. Any other tests you had in mind? Where in the READMEshould this go? There is currently no mention of UniqueIdentifier and it doesn´t really fit in Parameter Types...

I'd list it in Features

@ngehrsitz
Copy link
Author

update the README to show an example usage. Also , add usage of this type to some of the cross-cutting tests like bulk copy.

I added it to 667bccf. Any other tests you had in mind? Where in the READMEshould this go? There is currently no mention of UniqueIdentifier and it doesn´t really fit in Parameter Types...

I'd list it in Features

85f7832 Any remaining blockers to get this merged?

}

func (n NullUniqueIdentifier) Value() (driver.Value, error) {
return n.UUID.Value()
Copy link
Collaborator

Choose a reason for hiding this comment

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

turn n.UUID.Value()

Won't Value/String/Marshal etc need to handle !Valid?
Pls add tests for these. If there are existing functional tests that cover String() and Value() implementations of other types let's add a case to those too.

Copy link
Author

Choose a reason for hiding this comment

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

I wasn´t entirely sure what !Valid for String should be 34e68bc

Copy link
Collaborator

Choose a reason for hiding this comment

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

does this type need to implement String() ?
I don't see the core nullable types implementing it
https://cs.opensource.google/go/go/+/master:src/database/sql/sql.go?q=nullint64&ss=go%2Fgo

return n.UUID.MarshalText()
}

func (n *NullUniqueIdentifier) UnmarshalJSON(b []byte) error {
Copy link
Collaborator

Choose a reason for hiding this comment

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

b []byte

i think json would use a literal "null" string

Copy link
Author

Choose a reason for hiding this comment

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

45eb78e should handle that case

@ngehrsitz
Copy link
Author

@shueybubbles Can you take another look?

Copy link
Collaborator

@shueybubbles shueybubbles left a comment

Choose a reason for hiding this comment

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

:shipit:

@shueybubbles shueybubbles merged commit fe7c3d4 into microsoft:main Feb 21, 2024
1 check passed
charithe referenced this pull request in cerbos/cerbos Apr 22, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence | Type |
Update |
|---|---|---|---|---|---|---|---|
| [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) |
`v1.51.21` -> `v1.51.25` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2faws%2faws-sdk-go/v1.51.25?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2faws%2faws-sdk-go/v1.51.25?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2faws%2faws-sdk-go/v1.51.21/v1.51.25?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2faws%2faws-sdk-go/v1.51.21/v1.51.25?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| require | patch |
|
[github.com/cerbos/cerbos-sdk-go](https://github.com/cerbos/cerbos-sdk-go)
| `be5e6dc` -> `dadcb00` | | | | | require | digest |
|
[github.com/golang-migrate/migrate/v4](https://github.com/golang-migrate/migrate)
| `v4.17.0` -> `v4.17.1` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fgolang-migrate%2fmigrate%2fv4/v4.17.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fgolang-migrate%2fmigrate%2fv4/v4.17.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fgolang-migrate%2fmigrate%2fv4/v4.17.0/v4.17.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fgolang-migrate%2fmigrate%2fv4/v4.17.0/v4.17.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| require | patch |
|
[github.com/microsoft/go-mssqldb](https://github.com/microsoft/go-mssqldb)
| `v1.7.0` -> `v1.7.1` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fmicrosoft%2fgo-mssqldb/v1.7.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fmicrosoft%2fgo-mssqldb/v1.7.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fmicrosoft%2fgo-mssqldb/v1.7.0/v1.7.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fmicrosoft%2fgo-mssqldb/v1.7.0/v1.7.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| require | patch |
| [github.com/rivo/tview](https://github.com/rivo/tview) | `b0d41c4`
-> `e119d15` | | | | | require | digest |
| [github.com/vektra/mockery/v2](https://github.com/vektra/mockery) |
`v2.42.2` -> `v2.42.3` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fvektra%2fmockery%2fv2/v2.42.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fvektra%2fmockery%2fv2/v2.42.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fvektra%2fmockery%2fv2/v2.42.2/v2.42.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fvektra%2fmockery%2fv2/v2.42.2/v2.42.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| require | patch |
| [go](https://go.dev/) ([source](https://github.com/golang/go)) |
`1.22.0` -> `1.22.2` |
[![age](https://developer.mend.io/api/mc/badges/age/golang-version/go/1.22.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/golang-version/go/1.22.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/golang-version/go/1.22.0/1.22.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/golang-version/go/1.22.0/1.22.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| toolchain | patch |
| [go](https://go.dev/) ([source](https://github.com/golang/go)) |
`1.21.1` -> `1.22.2` |
[![age](https://developer.mend.io/api/mc/badges/age/golang-version/go/1.22.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/golang-version/go/1.22.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/golang-version/go/1.21.1/1.22.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/golang-version/go/1.21.1/1.22.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| toolchain | minor |
| golang.org/x/exp | `93d18d7` -> `fe59bbe` | | | | | require | digest |
|
[google.golang.org/genproto/googleapis/api](https://github.com/googleapis/go-genproto)
| `26222e5` -> `8c6c420` | | | | | require | digest |
|
[google.golang.org/protobuf](https://github.com/protocolbuffers/protobuf-go)
| `98873a2` -> `c2a26e7` | | | | | require | digest |
| [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) | `v1.29.6` ->
`v1.29.8` |
[![age](https://developer.mend.io/api/mc/badges/age/go/modernc.org%2fsqlite/v1.29.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/modernc.org%2fsqlite/v1.29.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/modernc.org%2fsqlite/v1.29.6/v1.29.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/modernc.org%2fsqlite/v1.29.6/v1.29.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| require | patch |

---

### Release Notes

<details>
<summary>aws/aws-sdk-go (github.com/aws/aws-sdk-go)</summary>

###
[`v1.51.25`](https://github.com/aws/aws-sdk-go/blob/HEAD/CHANGELOG.md#Release-v15125-2024-04-19)

[Compare
Source](https://github.com/aws/aws-sdk-go/compare/v1.51.24...v1.51.25)

\===

##### Service Client Updates

-   `service/glue`: Updates service API and documentation
- Adding RowFilter in the response for GetUnfilteredTableMetadata API
- `service/internetmonitor`: Updates service API, documentation, and
paginators
-   `service/personalize`: Updates service API and documentation

###
[`v1.51.24`](https://github.com/aws/aws-sdk-go/blob/HEAD/CHANGELOG.md#Release-v15124-2024-04-18)

[Compare
Source](https://github.com/aws/aws-sdk-go/compare/v1.51.23...v1.51.24)

\===

##### Service Client Updates

-   `service/drs`: Updates service API and documentation
-   `service/emr-serverless`: Updates service API and documentation
-   `service/guardduty`: Updates service API and documentation
    -   Added IPv6Address fields for local and remote IP addresses
-   `service/quicksight`: Updates service API and documentation
- This release adds support for the Cross Sheet Filter and Control
features, and support for warnings in asset imports for any permitted
errors encountered during execution
-   `service/rolesanywhere`: Updates service API and documentation
-   `service/sagemaker`: Updates service API and documentation
    -   Removed deprecated enum values and updated API documentation.
- `service/workspaces`: Updates service API, documentation, and
paginators
- Adds new APIs for managing and sharing WorkSpaces BYOL configuration
across accounts.

###
[`v1.51.23`](https://github.com/aws/aws-sdk-go/blob/HEAD/CHANGELOG.md#Release-v15123-2024-04-17)

[Compare
Source](https://github.com/aws/aws-sdk-go/compare/v1.51.22...v1.51.23)

\===

##### Service Client Updates

-   `service/ec2`: Updates service documentation
    -   Documentation updates for Elastic Compute Cloud (EC2).
-   `service/qbusiness`: Updates service API and documentation

###
[`v1.51.22`](https://github.com/aws/aws-sdk-go/blob/HEAD/CHANGELOG.md#Release-v15122-2024-04-16)

[Compare
Source](https://github.com/aws/aws-sdk-go/compare/v1.51.21...v1.51.22)

\===

##### Service Client Updates

-   `service/bedrock-agent`: Updates service API and documentation
-   `service/emr-serverless`: Updates service API and documentation
- `service/entityresolution`: Updates service API, documentation, and
paginators
-   `service/iotwireless`: Updates service API and documentation
-   `service/lakeformation`: Updates service API and documentation
-   `service/m2`: Updates service API and documentation
-   `service/mediapackagev2`: Updates service API and documentation
- `service/outposts`: Updates service API, documentation, and paginators
-   `service/wellarchitected`: Updates service API and documentation

</details>

<details>
<summary>golang-migrate/migrate
(github.com/golang-migrate/migrate/v4)</summary>

###
[`v4.17.1`](https://github.com/golang-migrate/migrate/releases/tag/v4.17.1)

[Compare
Source](https://github.com/golang-migrate/migrate/compare/v4.17.0...v4.17.1)

#### Changelog

-
[`4bc6777`](https://github.com/golang-migrate/migrate/commit/4bc6777)
Add dktesting.Cleanup() method
-
[`bead4a9`](https://github.com/golang-migrate/migrate/commit/bead4a9)
Added documentation and test for lock strategy
-
[`129922a`](https://github.com/golang-migrate/migrate/commit/129922a)
Added support for pgx locking table
-
[`a860f0c`](https://github.com/golang-migrate/migrate/commit/a860f0c)
Bump github.com/dvsekhvalnov/jose2go from 1.5.0 to 1.6.0
-
[`d1df97b`](https://github.com/golang-migrate/migrate/commit/d1df97b)
Bump github.com/jackc/pgx/v4 from 4.18.1 to 4.18.2
-
[`a78d1ab`](https://github.com/golang-migrate/migrate/commit/a78d1ab)
Bump github.com/jackc/pgx/v5 from 5.3.1 to 5.5.4
-
[`2e0872f`](https://github.com/golang-migrate/migrate/commit/2e0872f)
Bump google.golang.org/protobuf from 1.31.0 to 1.33.0
-
[`1b707a7`](https://github.com/golang-migrate/migrate/commit/1b707a7)
Cleanup cassandra images after tests run
-
[`49cac86`](https://github.com/golang-migrate/migrate/commit/49cac86)
Cleanup mongodb images after tests run
-
[`2884a8e`](https://github.com/golang-migrate/migrate/commit/2884a8e)
Cleanup postgres images after tests run
-
[`b1d02e2`](https://github.com/golang-migrate/migrate/commit/b1d02e2)
Cleanup sqlserver images after tests run
-
[`06614d9`](https://github.com/golang-migrate/migrate/commit/06614d9)
Cleanup yugabytedb images after tests run
-
[`e913336`](https://github.com/golang-migrate/migrate/commit/e913336)
Drop support for Go 1.20 and add support for Go 1.22
-
[`f4950c1`](https://github.com/golang-migrate/migrate/commit/f4950c1)
Fallback to dktest.DefaultCleanupTimeout if the dktest.Options doesn't
have one specified
-
[`5aa4670`](https://github.com/golang-migrate/migrate/commit/5aa4670)
Fix GoReleaser deprecations
-
[`d63a5c2`](https://github.com/golang-migrate/migrate/commit/d63a5c2)
Only test against YugabyteDB LTS releases
-
[`091ad5d`](https://github.com/golang-migrate/migrate/commit/091ad5d)
Quote locktable from config in queries
-
[`1a002d0`](https://github.com/golang-migrate/migrate/commit/1a002d0)
Set golangci-lint to 1.54.2 (latest is broken)
([#&#8203;1046](https://github.com/golang-migrate/migrate/issues/1046))
-
[`f100226`](https://github.com/golang-migrate/migrate/commit/f100226)
Update dktest from v0.4.0 to v0.4.1 to fix docker vulnerability
-
[`ff8a961`](https://github.com/golang-migrate/migrate/commit/ff8a961)
Update yugabyte test images
-
[`0350a00`](https://github.com/golang-migrate/migrate/commit/0350a00)
\[sqlserver] Always access version table with explicit schema
-
[`8147693`](https://github.com/golang-migrate/migrate/commit/8147693)
\[sqlserver] Ensure version table in provided schema
-
[`7f85f9c`](https://github.com/golang-migrate/migrate/commit/7f85f9c)
chore: fix some typos
-
[`9d70a39`](https://github.com/golang-migrate/migrate/commit/9d70a39)
chore: fix some typos in comments
-
[`94b8fa5`](https://github.com/golang-migrate/migrate/commit/94b8fa5)
rqlite is spelled with all lowercase

</details>

<details>
<summary>microsoft/go-mssqldb
(github.com/microsoft/go-mssqldb)</summary>

###
[`v1.7.1`](https://github.com/microsoft/go-mssqldb/releases/tag/v1.7.1)

[Compare
Source](https://github.com/microsoft/go-mssqldb/compare/v1.7.0...v1.7.1)

#### What's Changed

- fix: protocol version by
[@&#8203;srdan-bozovic-msft](https://github.com/srdan-bozovic-msft) in
[https://github.com/microsoft/go-mssqldb/pull/131](https://github.com/microsoft/go-mssqldb/pull/131)
- Implement Always Encrypted by
[@&#8203;shueybubbles](https://github.com/shueybubbles) in
[https://github.com/microsoft/go-mssqldb/pull/116](https://github.com/microsoft/go-mssqldb/pull/116)
- Update README.md Title by
[@&#8203;dlevy-msft](https://github.com/dlevy-msft) in
[https://github.com/microsoft/go-mssqldb/pull/143](https://github.com/microsoft/go-mssqldb/pull/143)
- Feat: Implement change password during login by
[@&#8203;shueybubbles](https://github.com/shueybubbles) in
[https://github.com/microsoft/go-mssqldb/pull/141](https://github.com/microsoft/go-mssqldb/pull/141)
- Implement AKV key provider for always encrypted by
[@&#8203;shueybubbles](https://github.com/shueybubbles) in
[https://github.com/microsoft/go-mssqldb/pull/148](https://github.com/microsoft/go-mssqldb/pull/148)
- feat: Add device code and Az CLI auth types to azuread by
[@&#8203;shueybubbles](https://github.com/shueybubbles) in
[https://github.com/microsoft/go-mssqldb/pull/149](https://github.com/microsoft/go-mssqldb/pull/149)
- TDS8: Accept additional values for encrypt by
[@&#8203;apoorvdeshmukh](https://github.com/apoorvdeshmukh) in
[https://github.com/microsoft/go-mssqldb/pull/125](https://github.com/microsoft/go-mssqldb/pull/125)
- Add note on CLI authentication by
[@&#8203;dlevy-msft](https://github.com/dlevy-msft) in
[https://github.com/microsoft/go-mssqldb/pull/151](https://github.com/microsoft/go-mssqldb/pull/151)
- fix(CharsetToUTF8): use strings.Builder by
[@&#8203;konart](https://github.com/konart) in
[https://github.com/microsoft/go-mssqldb/pull/154](https://github.com/microsoft/go-mssqldb/pull/154)
- Add support for DER certificates by
[@&#8203;apoorvdeshmukh](https://github.com/apoorvdeshmukh) in
[https://github.com/microsoft/go-mssqldb/pull/152](https://github.com/microsoft/go-mssqldb/pull/152)
- Replace panic with returning errors from key decryption providers by
[@&#8203;shueybubbles](https://github.com/shueybubbles) in
[https://github.com/microsoft/go-mssqldb/pull/155](https://github.com/microsoft/go-mssqldb/pull/155)
- Feat: Allow krb5 config through environment variables by
[@&#8203;shueybubbles](https://github.com/shueybubbles) in
[https://github.com/microsoft/go-mssqldb/pull/157](https://github.com/microsoft/go-mssqldb/pull/157)
- fix: Added multisubnetfailover option, set to false to prevent issue
[#&#8203;158](https://github.com/microsoft/go-mssqldb/issues/158) by
[@&#8203;abairmj](https://github.com/abairmj) in
[https://github.com/microsoft/go-mssqldb/pull/159](https://github.com/microsoft/go-mssqldb/pull/159)
- Fix mappings between LCIDs and code pages. by
[@&#8203;shueybubbles](https://github.com/shueybubbles) in
[https://github.com/microsoft/go-mssqldb/pull/169](https://github.com/microsoft/go-mssqldb/pull/169)
- Cut string output parameter fix by
[@&#8203;El-76](https://github.com/El-76) in
[https://github.com/microsoft/go-mssqldb/pull/168](https://github.com/microsoft/go-mssqldb/pull/168)
- Lazy initialization of charset maps by
[@&#8203;toddtreece](https://github.com/toddtreece) in
[https://github.com/microsoft/go-mssqldb/pull/166](https://github.com/microsoft/go-mssqldb/pull/166)
- Handle alternate form of prelogin response by
[@&#8203;shueybubbles](https://github.com/shueybubbles) in
[https://github.com/microsoft/go-mssqldb/pull/175](https://github.com/microsoft/go-mssqldb/pull/175)
- Handle `NULL` values in `UniqueIdentifier.Scan()` by
[@&#8203;ngehrsitz](https://github.com/ngehrsitz) in
[https://github.com/microsoft/go-mssqldb/pull/163](https://github.com/microsoft/go-mssqldb/pull/163)
- Fix: Support nullable types in Always Encrypted by
[@&#8203;shueybubbles](https://github.com/shueybubbles) in
[https://github.com/microsoft/go-mssqldb/pull/179](https://github.com/microsoft/go-mssqldb/pull/179)
- Fix named pipe path handling to preserve "." by
[@&#8203;shueybubbles](https://github.com/shueybubbles) in
[https://github.com/microsoft/go-mssqldb/pull/178](https://github.com/microsoft/go-mssqldb/pull/178)

#### New Contributors

- [@&#8203;srdan-bozovic-msft](https://github.com/srdan-bozovic-msft)
made their first contribution in
[https://github.com/microsoft/go-mssqldb/pull/131](https://github.com/microsoft/go-mssqldb/pull/131)
- [@&#8203;konart](https://github.com/konart) made their first
contribution in
[https://github.com/microsoft/go-mssqldb/pull/154](https://github.com/microsoft/go-mssqldb/pull/154)
- [@&#8203;abairmj](https://github.com/abairmj) made their first
contribution in
[https://github.com/microsoft/go-mssqldb/pull/159](https://github.com/microsoft/go-mssqldb/pull/159)
- [@&#8203;El-76](https://github.com/El-76) made their first
contribution in
[https://github.com/microsoft/go-mssqldb/pull/168](https://github.com/microsoft/go-mssqldb/pull/168)
- [@&#8203;toddtreece](https://github.com/toddtreece) made their first
contribution in
[https://github.com/microsoft/go-mssqldb/pull/166](https://github.com/microsoft/go-mssqldb/pull/166)
- [@&#8203;ngehrsitz](https://github.com/ngehrsitz) made their first
contribution in
[https://github.com/microsoft/go-mssqldb/pull/163](https://github.com/microsoft/go-mssqldb/pull/163)

**Full Changelog**:
microsoft/go-mssqldb@v1.5.0...v1.7.1

</details>

<details>
<summary>vektra/mockery (github.com/vektra/mockery/v2)</summary>

###
[`v2.42.3`](https://github.com/vektra/mockery/releases/tag/v2.42.3)

[Compare
Source](https://github.com/vektra/mockery/compare/v2.42.2...v2.42.3)

#### Changelog

- [`9b4107f`](https://github.com/vektra/mockery/commit/9b4107f) Fix
bug when last argument is a function with multiple return values
- [`b1c5f6e`](https://github.com/vektra/mockery/commit/b1c5f6e) Merge
pull request
[#&#8203;774](https://github.com/vektra/mockery/issues/774) from
LandonTClipp/issue\_766
- [`adedaa2`](https://github.com/vektra/mockery/commit/adedaa2) Update
codecov.yml
- [`a382dd5`](https://github.com/vektra/mockery/commit/a382dd5) remove
unnecessary config

</details>

<details>
<summary>golang/go (go)</summary>

###
[`v1.22.2`](https://github.com/golang/go/compare/go1.22.1...go1.22.2)

###
[`v1.22.1`](https://github.com/golang/go/compare/go1.22.0...go1.22.1)

</details>

<details>
<summary>cznic/sqlite (modernc.org/sqlite)</summary>

###
[`v1.29.8`](https://gitlab.com/cznic/sqlite/compare/v1.29.7...v1.29.8)

[Compare
Source](https://gitlab.com/cznic/sqlite/compare/v1.29.7...v1.29.8)

###
[`v1.29.7`](https://gitlab.com/cznic/sqlite/compare/v1.29.6...v1.29.7)

[Compare
Source](https://gitlab.com/cznic/sqlite/compare/v1.29.6...v1.29.7)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on Monday" (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/cerbos/cerbos).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMTMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjMxMy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhcmVhL2RlcGVuZGVuY2llcyIsImJvdHMiLCJraW5kL2Nob3JlIl19-->

---------

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Charith Ellawala <charith@cerbos.dev>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Charith Ellawala <charith@cerbos.dev>
mx-psi referenced this pull request in open-telemetry/opentelemetry-collector-contrib Apr 23, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[github.com/microsoft/go-mssqldb](https://github.com/microsoft/go-mssqldb)
| `v1.7.0` -> `v1.7.1` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fmicrosoft%2fgo-mssqldb/v1.7.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fmicrosoft%2fgo-mssqldb/v1.7.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fmicrosoft%2fgo-mssqldb/v1.7.0/v1.7.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fmicrosoft%2fgo-mssqldb/v1.7.0/v1.7.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>microsoft/go-mssqldb
(github.com/microsoft/go-mssqldb)</summary>

###
[`v1.7.1`](https://github.com/microsoft/go-mssqldb/releases/tag/v1.7.1)

[Compare
Source](https://github.com/microsoft/go-mssqldb/compare/v1.7.0...v1.7.1)

#### What's Changed

- fix: protocol version by
[@&#8203;srdan-bozovic-msft](https://github.com/srdan-bozovic-msft) in
[https://github.com/microsoft/go-mssqldb/pull/131](https://github.com/microsoft/go-mssqldb/pull/131)
- Implement Always Encrypted by
[@&#8203;shueybubbles](https://github.com/shueybubbles) in
[https://github.com/microsoft/go-mssqldb/pull/116](https://github.com/microsoft/go-mssqldb/pull/116)
- Update README.md Title by
[@&#8203;dlevy-msft](https://github.com/dlevy-msft) in
[https://github.com/microsoft/go-mssqldb/pull/143](https://github.com/microsoft/go-mssqldb/pull/143)
- Feat: Implement change password during login by
[@&#8203;shueybubbles](https://github.com/shueybubbles) in
[https://github.com/microsoft/go-mssqldb/pull/141](https://github.com/microsoft/go-mssqldb/pull/141)
- Implement AKV key provider for always encrypted by
[@&#8203;shueybubbles](https://github.com/shueybubbles) in
[https://github.com/microsoft/go-mssqldb/pull/148](https://github.com/microsoft/go-mssqldb/pull/148)
- feat: Add device code and Az CLI auth types to azuread by
[@&#8203;shueybubbles](https://github.com/shueybubbles) in
[https://github.com/microsoft/go-mssqldb/pull/149](https://github.com/microsoft/go-mssqldb/pull/149)
- TDS8: Accept additional values for encrypt by
[@&#8203;apoorvdeshmukh](https://github.com/apoorvdeshmukh) in
[https://github.com/microsoft/go-mssqldb/pull/125](https://github.com/microsoft/go-mssqldb/pull/125)
- Add note on CLI authentication by
[@&#8203;dlevy-msft](https://github.com/dlevy-msft) in
[https://github.com/microsoft/go-mssqldb/pull/151](https://github.com/microsoft/go-mssqldb/pull/151)
- fix(CharsetToUTF8): use strings.Builder by
[@&#8203;konart](https://github.com/konart) in
[https://github.com/microsoft/go-mssqldb/pull/154](https://github.com/microsoft/go-mssqldb/pull/154)
- Add support for DER certificates by
[@&#8203;apoorvdeshmukh](https://github.com/apoorvdeshmukh) in
[https://github.com/microsoft/go-mssqldb/pull/152](https://github.com/microsoft/go-mssqldb/pull/152)
- Replace panic with returning errors from key decryption providers by
[@&#8203;shueybubbles](https://github.com/shueybubbles) in
[https://github.com/microsoft/go-mssqldb/pull/155](https://github.com/microsoft/go-mssqldb/pull/155)
- Feat: Allow krb5 config through environment variables by
[@&#8203;shueybubbles](https://github.com/shueybubbles) in
[https://github.com/microsoft/go-mssqldb/pull/157](https://github.com/microsoft/go-mssqldb/pull/157)
- fix: Added multisubnetfailover option, set to false to prevent issue
[#&#8203;158](https://github.com/microsoft/go-mssqldb/issues/158) by
[@&#8203;abairmj](https://github.com/abairmj) in
[https://github.com/microsoft/go-mssqldb/pull/159](https://github.com/microsoft/go-mssqldb/pull/159)
- Fix mappings between LCIDs and code pages. by
[@&#8203;shueybubbles](https://github.com/shueybubbles) in
[https://github.com/microsoft/go-mssqldb/pull/169](https://github.com/microsoft/go-mssqldb/pull/169)
- Cut string output parameter fix by
[@&#8203;El-76](https://github.com/El-76) in
[https://github.com/microsoft/go-mssqldb/pull/168](https://github.com/microsoft/go-mssqldb/pull/168)
- Lazy initialization of charset maps by
[@&#8203;toddtreece](https://github.com/toddtreece) in
[https://github.com/microsoft/go-mssqldb/pull/166](https://github.com/microsoft/go-mssqldb/pull/166)
- Handle alternate form of prelogin response by
[@&#8203;shueybubbles](https://github.com/shueybubbles) in
[https://github.com/microsoft/go-mssqldb/pull/175](https://github.com/microsoft/go-mssqldb/pull/175)
- Handle `NULL` values in `UniqueIdentifier.Scan()` by
[@&#8203;ngehrsitz](https://github.com/ngehrsitz) in
[https://github.com/microsoft/go-mssqldb/pull/163](https://github.com/microsoft/go-mssqldb/pull/163)
- Fix: Support nullable types in Always Encrypted by
[@&#8203;shueybubbles](https://github.com/shueybubbles) in
[https://github.com/microsoft/go-mssqldb/pull/179](https://github.com/microsoft/go-mssqldb/pull/179)
- Fix named pipe path handling to preserve "." by
[@&#8203;shueybubbles](https://github.com/shueybubbles) in
[https://github.com/microsoft/go-mssqldb/pull/178](https://github.com/microsoft/go-mssqldb/pull/178)

#### New Contributors

- [@&#8203;srdan-bozovic-msft](https://github.com/srdan-bozovic-msft)
made their first contribution in
[https://github.com/microsoft/go-mssqldb/pull/131](https://github.com/microsoft/go-mssqldb/pull/131)
- [@&#8203;konart](https://github.com/konart) made their first
contribution in
[https://github.com/microsoft/go-mssqldb/pull/154](https://github.com/microsoft/go-mssqldb/pull/154)
- [@&#8203;abairmj](https://github.com/abairmj) made their first
contribution in
[https://github.com/microsoft/go-mssqldb/pull/159](https://github.com/microsoft/go-mssqldb/pull/159)
- [@&#8203;El-76](https://github.com/El-76) made their first
contribution in
[https://github.com/microsoft/go-mssqldb/pull/168](https://github.com/microsoft/go-mssqldb/pull/168)
- [@&#8203;toddtreece](https://github.com/toddtreece) made their first
contribution in
[https://github.com/microsoft/go-mssqldb/pull/166](https://github.com/microsoft/go-mssqldb/pull/166)
- [@&#8203;ngehrsitz](https://github.com/ngehrsitz) made their first
contribution in
[https://github.com/microsoft/go-mssqldb/pull/163](https://github.com/microsoft/go-mssqldb/pull/163)

**Full Changelog**:
microsoft/go-mssqldb@v1.5.0...v1.7.1

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any
time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector-contrib).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMTMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjMxMy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZWJvdCJdfQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com>
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.

3 participants