-
Notifications
You must be signed in to change notification settings - Fork 35
dbconn: take RDS TLS from the driver, and drop rejectReadOnly #1221
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
f224250
dbconn: take RDS TLS from the driver, and drop rejectReadOnly
morgo 08f49b8
Review: fix the second DSN producer, reject empty CA files, assert TL…
morgo ff47088
ci: disable the module cache in the TLS/DSN job
morgo c2a73fa
Fix the last DSN-spelling assertion, in pkg/migration this time
morgo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| name: TLS/DSN unit tests (no database) | ||
| on: | ||
| push: | ||
| tags: | ||
| - v* | ||
| branches: | ||
| - master | ||
| - main | ||
| pull_request: | ||
| permissions: | ||
| contents: read | ||
|
|
||
| # Spirit's TLS and DSN construction decides whether a connection is encrypted | ||
| # and whether its server certificate is verified. Every one of those tests runs | ||
| # against pure functions and needs no database — but until this workflow, the | ||
| # only jobs that ran `go test` at all were the mysql*-docker matrices, so the | ||
| # assertions were gated behind Docker, a MySQL boot, and each of those | ||
| # workflows' documentation-only short-circuit. | ||
| # | ||
| # This job runs them on their own, on every pull request, with nothing to | ||
| # provision. Keep it that way: a test matched by the filter below must not | ||
| # require a server, or this workflow starts failing for reasons that have | ||
| # nothing to do with TLS. | ||
| jobs: | ||
| tls-dsn: | ||
| name: tls/dsn | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v7 | ||
|
|
||
| - uses: actions/setup-go@v7.0.0 | ||
| with: | ||
| go-version: "1.26.6" | ||
| # No module cache. This workflow also runs on release tags, and a | ||
| # cache restored there could have been written from a lower-trust | ||
| # context — the cache-poisoning class zizmor flags. linter.yml | ||
| # disables it for the same reason. The job compiles one package, so | ||
| # the cache buys almost nothing. | ||
| cache: false | ||
|
|
||
| # The filter is deliberately broad. It over-matches into neighbouring | ||
| # DSN-handling tests, which is the safe direction: a new TLS test whose | ||
| # name this misses is silently unprotected, whereas an extra pure test | ||
| # costs a second. | ||
| # | ||
| # This is pkg/dbconn only, and that is not the whole TLS surface: | ||
| # pkg/migration asserts these properties too (TestReplicaTLSEnhancement), | ||
| # but its TestMain provisions a server, so those stay in the mysql*-docker | ||
| # matrices. Do not read a green tick here as "the TLS assertions passed" — | ||
| # it means the ones that need no database did. | ||
| - name: TLS and DSN tests | ||
| run: go test -race -count=1 -run 'TLS|DSN|Certificate|RDS|Verify|Strict|Disabled|Registered' ./pkg/dbconn/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.