This requires specifying `**` as the selector in the proto, which will
match any segments and simply requires that the verb is the last part of
the URL, which it already is.
This commit fixes the behaviour of scopes where whitespace was allowed
(and thus persisted) in the Name and Description fields.
It also adds some more tests for scope Create and Updateto cover more
error cases.
For scope update, `handlers.ValidateUpdateRequest` exists, however this
was not used as it does not work properly for requests where the
`global` scope is updated.
In `ValidateUpdateRequest`, an ID check is performed and it assumes
there's always a resource prefix (eg: "p", "o") and an identifier
(random numbers and letters) after the prefix. This fails for `global`.
See `handlers.ValidId`.
Most of the changes here are changes or enhancements that are useful for
tests. The crux of the issue was that I had pulled up one var to the
package level so it could be read from tests, but that var was not being
reset between tests. It's not even used in tests anymore, so I put it
back to function-local.
* feat: add a new daily billing view
* update views and table based on early feedback
* address review comments
* update CTE to be an accurate result of what we expect
* remove 'with time zone' from daily range
* remove timezone
* Update internal/db/schema/migrations/oss/postgres/70/01_hcp_billing_daily.up.sql
Co-authored-by: Michael Gaffney <mgaffney@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: Timothy Messier <tim.messier@gmail.com>
* go mod updates
* fix tests
---------
Co-authored-by: Michael Gaffney <mgaffney@users.noreply.github.com>
Co-authored-by: Timothy Messier <tim.messier@gmail.com>
These are deps either maintained by the Boundary team or approved by
members of the team. A few specific notes on some of the non-HC and
non-DB ones:
github.com/fatih/color: fixes some windows issues
github.com/zalando/go-keyring: fixes a windows crash
* Add more logging to worker auth rotation and test flags
This makes it much easier to figure out when and why rotation is
happening and control it for tests/debugging.
* Update auth rotation logic
Because we were looking at validity period of client certs, which may
not have matched the actual rotation interval, it was possible (mostly
in test scenarios) for the rotation to happen multiple times on the
roots before we actually hit the worker rotation interval.
This changes how the interval is calculated by looking at the difference
between not-after values on the certs to understand the rotation
interval being used by the controller. We then use that as the starting
point for calculating a next-rotation time.
This makes it much easier to figure out when and why rotation is
happening and control it for tests/debugging.
Remove cert skew
Cherry-picked from release/0.12.x
* test(e2e): Add test that checks that session ends after deleting project
* CR: Update to create target with address
* CR: Rename method for clarification
This allows for a greater delta between the period returned by vault and
they expected value to account for some delay due to load on the test
runners.
This option did not respect whether or not versioning was enabled when
writing it out during generation.
This does mean that there is a breaking change for auth tokens, but as
it was a no-op anyways it's easy to fix and not something I want to /v2
about.
The original motivation for the matrix was to mitigate an issue some
tests failing that used a vault docker container. When the tests ran in
a single step, these tests would almost always fail. By splitting the
tests per package, the failure rate of these tests was around 20%.
GitHub was able to identify the cause. There was an issue with localhost
resolution that causes requests to the vault containers to sometimes
fail, resulting in the kinds of failures that were seen. Note that the
same issue was not seen when accessing the test postgres database that
was running in a container, since the test code connects via 127.0.0.1,
while the vault container used localhost. This commit includes the
recommended fix so that localhost name resolution works as expected on
the GitHub hosted runners.
It also removes the test matrix since it is no longer needed as a work
around. In addition it seems advisable to remove the matrix given the
recent discovery that some tests were not running with the matrix. While
this was fixed, removing the matrix reduces the risk of any future
mistakes from the test splitting.
This also seems to result in a faster pipeline execution time. The
overhead to determine the matrix values, wait for a runner to be
available, and restore from the cache seems to add up to a longer
overall execution time.
Eliminating the matrix can also help with another type of failure seen.
Sometimes restoring from the cache fails. By eliminating the test
matrix, it will greatly reduce the number of cache restoring done by the
workflow, which will reduce the chances of an issue restoring from
cache.
The only remaining benefit from the matrix, was that if there was a
transient test failure, a re-run of only the failed jobs would be
relatively quick (depending on which package had the failure), while
without the matrix the entire test suite will need to be re-run.
See: https://github.com/hashicorp/boundary/pull/3199
Refs:
86214a85e1e04438b7f8
* Result of tsccr-helper -pin-all-workflows .
* chore: Disable cache from setup-go
---------
Co-authored-by: hashicorp-tsccr[bot] <hashicorp-tsccr[bot]@users.noreply.github.com>
Co-authored-by: Michael Li <michael.li@hashicorp.com>
* programatically rename unique and foreign key constraints to enforce 'tablename_uq' and 'reftable_fkey' patterns
* manually rename unique constraints for names over 63 characters
* update changed constraint names in db update testcases