Commit Graph
1661 Commits
Author SHA1 Message Date
Timothy Messier c9b99306e1 refact(target): Add NewFunc to registry
This adds a new requirement onto subtypes to register a NewFunc.
Previously the subtypes where implementing this function anyway, but the
target package was not including them in the registry. This resulted in
packages that use the target package needing to import the subtypes
directly, which we want to avoid.

This refactor will require the subtypes to register their NewFunc which
can then be used by `target.New` so packages that need to create targets
can do so by only using the target package.

This also updates the tcp subpackage to register a NewFunc.
2021-12-03 10:19:29 -05:00
Timothy Messier 1ae388438f feat(subtypes): Add function to provide all known prefixes 2021-12-03 10:19:29 -05:00
Zachary Shilton c43fa3f214 website: bump deps to fix print styles (#1628)
* website: bump deps to fix print styles

* website: fix up print styles

* fix: hashi-stack-menu print selector
2021-12-03 10:12:32 -05:00
Timothy Messier 34d9842f85 fix(testing/docker): Correctly reset IFS (#1754) 2021-12-02 12:13:07 -05:00
Timothy Messier a404b5e365 Merge pull request #1753 from hashicorp/tmessi-sdk-api-test-ci
ci: Run sdk and api tests in ci
2021-12-02 07:52:37 -05:00
Timothy Messier 0a4df95fdd ci: Run sdk and api tests in ci
This adds new makefile targets and configuration to run the tests in the
api and sdk modules. These do not run by default since `go test ./...`
does not cross module boundaries.
2021-12-02 07:27:54 -05:00
Timothy Messier 0bc9e30aa6 chore(makefile): Mark all phony targets as PHONY
Some phony targets where not included in the single .PHONY line, this
switches to marking targets as PHONY just before the target is defined,
which makes it easier to ensure the targets are correctly marked as
phony.
2021-12-01 16:49:42 -05:00
Thor 9f7c650101 api: Returns connections as part of sessions (#1714)
* session.proto: added connections to Session message

* make proto

* handler: convert connections on toProto

* updated unit test to check connections
2021-12-01 14:02:04 -06:00
Michael Gaffney 72d4d6d205 fix(sql): Remove warning from create_time trigger (#1751)
Raising a warning in the default trigger used for setting the value in
create_time columns creates unnecessary noise in the PostgreSQL log
files.

Closes #1744
2021-12-01 11:05:19 -05:00
Chris MarchesiandTodd 1c3d7a7faa Update CHANGELOG.md for #1736 (#1750)
* Update CHANGELOG.md for #1736

For #1736.

* Update CHANGELOG.md

Co-authored-by: Todd <T.Alan.Knight@gmail.com>

Co-authored-by: Todd <T.Alan.Knight@gmail.com>
2021-11-30 15:45:42 -08:00
Jim 983f7b019c refactor (db): Remove unused gorm formatter (#1738) 2021-11-30 18:20:44 -05:00
Chris MarchesiandTodd 84febd9983 internal/host/plugin: ensure UpdateCatalog triggers updates for sets (#1736)
* internal/host/plugin: ensure UpdateCatalog triggers updates for sets

This ensures that attribute updates to a host catalog triggers an update
to any of its downstream host sets. This ensures that updates to
elements that affect a host set, such as the region a host catalog is
configured for, take effect immediately instead of requiring a wait of
long as 10m after an update.

* Add WithNextRunIn to test sync job

This is to ensure it doesn't run right away when added. This ensures
that we can accurately test *when* the job is set to run immediately.

* Update internal/host/plugin/repository_host_catalog.go

Co-authored-by: Todd <T.Alan.Knight@gmail.com>

* Change TestRepository_UpdateCatalog_SyncSets to check next run time, not wait for run

* Remove explicit version increment and instead rely on implicit increment

* Fix lanuage for rows updated check when flagging host sets for sync

* remove errant non-zero check when looping over the thing we're checking

* remove scheduler start line from TestRepository_UpdateCatalog_SyncSets

Co-authored-by: Todd <T.Alan.Knight@gmail.com>
2021-11-30 14:37:06 -08:00
Louis Ruch 9b6d7d8105 chore: fmt changelog entry 2021-11-30 11:20:11 -08:00
Hugo 29bdc22b41 Merge pull request #1731 from hashicorp/hugoamvieira-gosockaddr-template-support
feature(config): Add go-sockaddr templating support to Controller and Worker Addresses
2021-11-30 17:57:55 +00:00
Hugo Vieira f1063a62a0 feature(config): add sockaddr template support 2021-11-30 14:07:12 +00:00
Hugo Vieira 21a771b581 test(servers base): add tests ahead of functionality change
Adds tests to `SetupControllerPublicClusterAddress` and
`SetupWorkerPublicAddress` ahead of changes in these functions to
ensure functionality is preserved.
2021-11-29 18:19:10 +00:00
Jeff Mitchell 5417cc5cb0 Fix setting nil attributes on host sets (#1746)
This is the analogue of #1743 but for host sets
2021-11-28 15:20:46 -05:00
Jim dba5bc88a0 chore: Upgrade gorm deps (#1747) 2021-11-27 18:38:46 -05:00
Jeff Mitchell 269fb94885 Add test controller option to not use a templated database 2021-11-26 20:22:50 -08:00
Jeff Mitchell 1c39691023 Fix setting host catalog attributes to nil (#1743)
Internally attributes are not allowed to be the null value. However, as
currently implemented, this then breaks our normal model of sending an
explicit `null` in the JSON to reset/clear a field. This is a problem
because the CLI doesn't have a way to say "set this but to empty"
without a lot of hoops, and causes some issues for API users and TF as
well.

This changes PatchBytes and PatchStruct to return an empty value (or
marshaled empty value in the case of PatchBytes) if the source is null
or empty. In the host catalog update function we then always set this
value if it's in the db mask (removing the nil check). Together this
means a null value ends up coming out as an empty value (and thus valid
for the DB) from PatchStruct/PatchBytes, and our API translation
function already returns nothing for attributes if the length of the
fields are zero.
2021-11-26 16:58:19 -05:00
Jeff Mitchell b2efce961d Fix comment on sync_interval_seconds being invalid (#1745) 2021-11-26 16:56:34 -05:00
Jeff Mitchell dc2148496b Actually enable loopback plugin in dev (#1742) 2021-11-24 20:58:41 -05:00
Louis Ruch 9bec68f32c refact(servers): Cleanup redundant if else (#1741) 2021-11-24 11:56:04 -08:00
Pete Pacent e360e162b9 Adding release notes for 0.7 (#1739) 2021-11-23 10:59:52 -08:00
Chris Marchesi 9e976cb4ae internal/host/plugin: Fix TestUpdateSet (#1735)
Now asserts on error on the last lookup check and removes the plugin
lookup since we're not asserting on that.
2021-11-22 13:42:19 -08:00
Carlos Alcaide Corvo 16b00c8254 Bump desktop client version on Boundary website (#1737) 2021-11-18 19:59:02 -08:00
Jeff Mitchell 75bbab130f Update website version 2021-11-18 22:13:55 -05:00
Jeff Mitchell abd695e5bc Fix packagespec variable setting 2021-11-18 21:11:27 -05:00
Jeff Mitchell bc27190474 Prep for 0.7.1 2021-11-18 20:22:01 -05:00
Jeff Mitchell d01e1aca3e Fix plugin extension on Windows 2021-11-18 20:09:27 -05:00
Jeff Mitchell d2dd9b205b Update packagespec 2021-11-18 16:27:36 -05:00
Jeff Mitchell 95568ef07f Fix tests using multiple controllers (#1734)
The previous PR only initialized plugins if they were required, which
meant that there may not actually be a plugin manager running because a
second node would not actually create the dev database, which is where
the plugin was being added. The assumption that a plugin manager is
running is still a fine one at the moment, but we just need to make sure
it's running in _all_ cases.
2021-11-18 16:01:15 -05:00
Jeff Mitchell ad8ce50f69 Fix Windows (#1733)
The embed package always uses Unix-style forward slashes. filepath.Join
utilization looking for files would cause the slashes to be the wrong
direction on Windows and result in the files not being found.
2021-11-18 15:01:01 -05:00
Jeff Mitchell 5559cf54d3 Don't always assume plugins should be activated (#1732) 2021-11-18 11:53:45 -05:00
Jeff Mitchell 3b83184700 Add missing read only check on secrets hmac field in handler (#1729) 2021-11-18 09:32:32 -05:00
Jeff Mitchell 208895e38b Add a static README file to the host assets dir (#1730) 2021-11-17 22:30:22 -05:00
Jeff Mitchell 9213e4b821 Handle same-named options across subtypes (#1728)
This updates the API generation code to allow the same option names to
be used in subtype-scoped options. This means if we have attribute
structs with the same fields, they won't overwrite each other, but will
instead create attribute-specific options.
2021-11-17 20:08:18 -05:00
Louis Ruch e0587afb5f chore: bump website verison 2021-11-17 14:47:53 -08:00
Jeff MitchellandMichael Gaffney 04a52a5864 Add plugins configuration section to docs (#1727)
Co-authored-by: Michael Gaffney <mgaffney@users.noreply.github.com>
2021-11-17 17:21:20 -05:00
Todd 1c36b1e4d7 Add plugin details to host catalog, host set, and host domain model pages (#1715)
* Add plugin information to host catalogs, host sets, and hosts.
2021-11-17 14:11:06 -07:00
Todd 18de3653f5 Set sync job still syncs when plugin reports no hosts in sets (#1726)
* Allow the set sync job to sync when no hosts are returned by the sync job.
2021-11-17 13:32:23 -07:00
Jeff Mitchell 7174a91f32 Update data-encryption documentation to clarify what is encrypted (#1722) 2021-11-17 14:42:59 -05:00
Todd 63bf60654e Add plugin info on the CLI when reading a host. (#1725) 2021-11-17 10:16:12 -07:00
Michael Gaffney 54a508ef7f Merge branch 'mgaffney-sqltest-port' 2021-11-17 08:50:57 -05:00
Michael Gaffney 55c6c5872f feat(sqltest): Make container port configurable 2021-11-17 08:04:56 -05:00
Todd 056e72491d Attempt to fix the ci error. (#1723) 2021-11-17 08:03:42 -05:00
Timothy Messier e6a8704a60 fix(docker): Add missing packages to dev docker image (#1713)
Trying to run the docker image built with `make docker-build-dev` would
result in an error at startup:

    standard_init_linux.go:228: exec user process caused: no such file or directory

This was due to the dev docker image lacking `dumb-init` which is used
by `docker-entrypoint.sh`.

This commit updates the dev dockerfile to add dumb-init. It also adds
additional packages so that the dev image aligns with the release image.
2021-11-17 07:28:58 -05:00
Louis Ruch 384120fd7d chore: bump to version 0.7.0 2021-11-16 17:29:39 -08:00
Louis Ruch bc0e23bdf1 chore: bump api/sdk versions 2021-11-16 17:28:10 -08:00
Louis Ruch 0cf9573f24 chore: make fmt 2021-11-16 17:27:16 -08:00