When building the set of migrations to run as part of executing the
`database migrate` or `database init`, the migrations are collected and
combined to run within a database transaction. As such the `begin` and
`commit` statements in the migration files should get removed from the
final set of statements that get executed. However, when the migrations
files were updated to include copyright and license headers, this broke
the logic that would strip out the `begin` statement.
While this does not cause any issue with executing the statements in a
single transaction, it does result in noise in the database server's
logs, with log messages like:
BEGIN WARNING: 25001: there is already a transaction in progress
BEGIN LOCATION: BeginTransactionBlock, xact.c:3778
This commit fixes the logic to correctly strip the `begin` for files
that have the header lines.
* feat(server): Refactor LookupWorkerByName to be a test method
* feat(server): Split worker tags table
* refact(worker): Export api and config tags
* refact(server): Return worker id from UpsertWorkerStatus
* refact(server): Create ListWorkerStorageBucketUpdates domain function
* refact(server): Use dedicated HCPb-worker list func
* refact(server): Create ConnectionRoute domain function
* refact(handlers): Move worker selection logic to internal/server package
This commit moves all the logic to select a worker to handle a session
to the internal/server package. Most functions were moved to this
package with no changes, however, there are a couple of notable
exceptions:
- Given that we don't use GRPC errors in repos, all errors were adjusted
to use the internal/errors package instead.
- StorageBucketFilterCredIdFn is now used to prevent the internal/server
package from importing internal/storage/plugin, which would cause a
dep cycle. Callers of SelectSessionWorkers must implement this func
which is responsible for returning a storage bucket's worker filter as
well as its associated credential id.
- authorizeSessionWithWorkerFilter now receives an
internal/server.(*Repository) object when called. This is transparent
to SelectSessionWorkers callers as it is handled internally.
* feat(server): Add FilteredWithFeatures fn and new server options
* refact(server): create new list and lookup worker queries
* test(server): Add WorkerList unit tests
* feat(server): Implement WorkerList randomness using crypto/rand pkg
* chore(db): add index to server_worker table
* refact(server): prefix test method with Test
* refact(server): rename Downstreamers interface to Graph
* chore(server): unexport and rename method
* chore: add doc string to WorkerAddress (#5420)
---------
Co-authored-by: Irena Rindos <irenarindos@users.noreply.github.com>
Co-authored-by: irenarindos <irena.rindos@gmail.com>
The api.Client was first checking for the environment variable, and then
resetting the max retries to 2, thus overriding the environment variable
value. In addition, the cli would set max retries to zero if the
environment variable was not set. This would mean that by default the
max retries would be zero, and if the environment variable was set, the
max retries would be 2, regardless of the actual value for the
environment variable.
This fixes the order in which the environment variables are read, to
ensure they take precedence.
* refact(e2e): Rename file for consistency
* test(e2e): Extend test to authenticate using oidc auth method
* CR: Add checks for account attributes
* CR: Use any instead of interface
* CR: Use %q
GCP label constraints include the following:
The value can only contain lowercase letters, numeric characters, underscores and dashes. The value can be at most 63 characters long. International characters are allowed.
On occasion, the cache restore fails, causing the test pipeline to fail due to not having tparse. This adds a failsafe in the event that there's something wrong with the cache restore.
Reading a token from the keyring can sometimes fail for reasons
other than the token not being present in the keyring. This PR
introduces a new error used to indicate that the token requested
could not be found in the keyring and propagates errors from the
keyring up to the caller, so that the caller can act on them.
Additionally, this fixes a bug in the client cache where it would
incorrectly assume that a token had been removed from the
keyring, when in fact there was an error reading from the keyring.
TestRotationTicking would previously wait for 5 rotations, which is
pretty slow considering each rotation takes 20 seconds. Reduce
the number to 3, and use require instead of assert to remove
noise during flaky test runs.
This doesn't fix the flakiness of this test, but it should reduce the log spam.
* docs: Update 0.18.x release notes
* docs: Update version numbers
* Apply batch of suggestions from code review
Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
* docs: Add issue link and minor edits
---------
Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
* docs: Update meta content - CLI
* docs: Edits for consistency
* docs: More edits for consistency
* Apply batch of suggestions from code review
Co-authored-by: Robin Beck <stellarsquall@users.noreply.github.com>
* Apply batch suggestions from code review
Co-authored-by: Robin Beck <stellarsquall@users.noreply.github.com>
* docs: Remove given id references
* Update read.mdx
* Update read.mdx
---------
Co-authored-by: Robin Beck <stellarsquall@users.noreply.github.com>
* test(e2e): add GCP infra resources and tests for enos testing
- add 1 new `gcp_target` module that creates a GCP VM instance with labels for filtering
- add GCP dynamic host catalog e2e tests
* chore(docs): Remove community-only tag from kms keys
* docs: Clarify edition support
* docs: Minor edit, add `worker-auth` statement
---------
Co-authored-by: Dan Heath <76443935+Dan-Heath@users.noreply.github.com>
* allow education to merge image prs and web to control the website source
* keep boundary team permissions to approve any PR
* let education approve PRs to the website nav too
* make spacing more reasonable