* use verify changes for docs to skip tests
* add verify-changes to the needed jobs
* skip go tests for doc/ui only changes
* fix a job ref
* change names, remove script
* remove ui conditions
* separate flags
* feedback
To allow us to support CIEPS backend state, allow the backend to
contain enterprise only state variables. Also allow us to implement
enterprise only hooks into the various backend functions to initialize,
periodicFunc, cleanup and invalidate.
* Ent only ADP Metrics
* Added change log
* Changed changelog name
* Restored previous impl
* Moved to mount_util
* Change impl
* Add same file
* Moved to registry_util
* Edited corehelpers mock registry
* Edited chagnelog
* Edited changelog
* Edited build tag
* Added back function
* Delete core.go.rej
* Edited mount
* Changed spacing
* Add backend format linting to pre-commit hook
By taking a slight penalty with each commit, we can ensure that
contributors follow the format behavior by default (if they run hooks),
making accidental PRs without proper formatting less likely.
Additionally, fix gofmtcheck to align with the Makefile, fixing the
corresponding fmtcheck target for use with the hook.
Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
* Fix formatting errors
Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
---------
Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
* Fix aspects of `auth/token/create` request parsing
Fixes#18550
Currently, the `auth/token/create` family of APIs (`create`,
`create-orphan`, `create/{role}`) does non-standard parsing of requests,
by directly using `mapstructure.WeakDecode(request.Data, ...)` instead
of using the standard `framework.FieldData` abstraction.
Furthermore, the fields declared for these APIs are incorrect, leading
to inappropriate OpenAPI generation, and inappropriate warnings about
ignored parameters.
Detailed changes:
* Factor out triplicated definitions of common fields across these three
APIs.
* Remove incorrect `role_name` field from `create-orphan`.
* Add missing `lease` deprecated field.
* Rename incorrectly named `metadata` field to `meta`, and change from
`TypeMap` to `TypeKVPairs` to reflect actual underlying Go type is
`map[string]string`.
* Remove entirely incorrect `format` field.
* Add declarative `Default: true` to `renewable` field, to match
behaviour currently implemented in code.
* Having fixed the field definitions to match current usage, remove the
secondary decoding of the request via `mapstructure` inside
`handleCreateCommon`, and migrate to using `FieldData` APIs like
a normal operation function.
* Add changelog
* Rephrase comment.
- There's a race within the Plugin reloading mechanism that isn't
trivial to address. To silence some of the failures, switch this
test to use sealing of the cores instead of the plugin reload
mechanism
- We've seen a few issues with bind's auto-loading of configuration
too quickly at bad times leading to it having partial configurations
or not all files/permissions being restored properly during it's read
attempt.
- See if the freeze/thaw rndc commands will help out with these timing
issues
* Fix data race within route entry tainting with requests - OSS
- There is a data race between a mount being mounted with incoming
requests and checking the mount's tainted status.
* Add cl
* VAULT-17736 Add HashiCorp contributed label to HC contributed PRs
* VAULT-17736 finish my thought
* VAULT-17736 gh pr edit
* VAULT-17736 update formatting
* VAULT-17736 quote for linting happiness
* VAULT-17736 try without apostrophes?
* VAULT-17736 try with quotes?
* VAULT-17736 try one line run
* VAULT-17736 Oh, that was it
* VAULT-17736 No more ready_for_review
Add a go:generate helper called stubmaker, which generates appropriate stubs on ent based on oss stubs, but only when needed (i.e. real ent funcs haven't been added yet.)
* combine into one checker
* combine and simplify ci checks
* add to test package list
* remove testing test
* only run deprecations check
* only run deprecations check
* remove unneeded repo check
* fix bash options
1) Reduce sleep time - in my experience, 1 second is plenty for a dev
Vault to start up its HTTP listener - having the user wait for
5 seconds seems excessive.
2) Comment reason for both sleeps.
3) Remove line of code that is obsolete, now the Enterprise transition
from stored to autoloaded licenses has completed.
Improve our build workflow execution time by using custom runners,
improved caching and conditional Web UI builds.
Runners
-------
We improve our build times[0] by using larger custom runners[1] when
building the UI and Vault.
Caching
-------
We improve Vault caching by keeping a cache for each build job. This
strategy has the following properties which should result in faster
build times when `go.sum` hasn't been changed from prior builds, or
when a pull request is retried or updated after a prior successful
build:
* Builds will restore cached Go modules and Go build cache according to
the Go version, platform, architecture, go tags, and hash of `go.sum`
that relates to each individual build workflow. This reduces the
amount of time it will take to download the cache on hits and upload
the cache on misses.
* Parallel build workflows won't clobber each others build cache. This
results in much faster compile times after cache hits because the Go
compiler can reuse the platform, architecture, and tag specific build
cache that it created on prior runs.
* Older modules and build cache will not be uploaded when creating a new
cache. This should result in lean cache sizes on an ongoing basis.
* On cache misses we will have to upload our compressed module and build
cache. This will slightly extend the build time for pull requests that
modify `go.sum`.
Web UI
------
We no longer build the web UI in every build workflow. Instead we separate
the UI building into its own workflow and cache the resulting assets.
The same UI assets are restored from cache during build worklows. This
strategy has the following properties:
* If the `ui` directory has not changed from prior builds we'll restore
`http/web_ui` from cache and skip building the UI for no reason.
* We continue to use the built-in `yarn` caching functionality in
`action/setup-node`. The default mode saves the `yarn` global cache.
to improve UI build times if the cache has not been modified.
Changes
-------
* Add per platform/archicture Go module and build caching
* Move UI building into a separate job and cache the result
* Restore UI cache during build
* Pin workflows
Notes
-----
[0] https://hashicorp.atlassian.net/browse/QT-578
[1] https://github.com/hashicorp/vault/actions/runs/5415830307/jobs/9844829929
Signed-off-by: Ryan Cragun <me@ryan.ec>