Commit Graph

11862 Commits

Author SHA1 Message Date
John Cowen bb94b6a474
ui: Switch out WithResizingMixin for on-window helper (#8130)
* ui: Add ember-on-helper

* Switch out WithResizingMixin for {{on-window}} helper
2020-06-17 14:26:50 +01:00
John Cowen 52705125a1
ui: Remove WithEventSource mixin, use a component instead (#7953)
The WithEventSource mixin was responsible for catching EventSource
errors and cleaning up events sources then the user left a Controller.

As we are trying to avoid mixin usage, we moved this all to an
`EventSource` component, which can clean up when the component is
removed from the page, and also fires an onerror event.

Moving to a component firing an onerror event means we can also remove
all of our custom computed property work that we were using previously
to catch errors (thrown when a service etc. is removed)
2020-06-17 14:19:50 +01:00
John Cowen b5e08089ab
ui: Change code-editor tested to use querySelectorAll (#8087) (#8131) 2020-06-17 14:17:00 +01:00
John Cowen 84c977faf1
ui: Don't show duplicate services in the intentions form dropdown (#8133)
* Add uniq-by helper
* Pass unique services through to intentions form
* Add acceptance test
2020-06-17 14:11:40 +01:00
Pierre Souchay f7a1189dba
gossip: Ensure that metadata of Consul Service is updated (#7903)
While upgrading servers to a new version, I saw that metadata of
existing servers are not upgraded, so the version and raft meta
is not up to date in catalog.

The only way to do it was to:
 * update Consul server
 * make it leave the cluster, then metadata is accurate

That's because the optimization to avoid updating catalog does
not take into account metadata, so no update on catalog is performed.
2020-06-17 12:16:13 +02:00
John Cowen 9a539f0340
ui: Token listing redesign (#8117) 2020-06-17 10:25:54 +01:00
Daniel Nephin 97342de262
Merge pull request #8070 from hashicorp/dnephin/add-gofmt-simplify
ci: Enable gofmt simplify
2020-06-16 17:18:38 -04:00
Matt Keeler d994dc7b35
Agent Auto Configuration: Configuration Syntax Updates (#8003) 2020-06-16 15:03:22 -04:00
Daniel Nephin 98effaf69d
Merge pull request #8007 from hashicorp/streaming/add-hooks-to-memdb-txn
streaming: track changes to state
2020-06-16 14:32:36 -04:00
David Yu 818ce2eca6
Formatting spaces between keys in Config entries (#8116)
* Formatting spaces between keys in Config entries

* Service Router spacing

* Missing Camel Case proxy-defaults

* Remove extra spaces service-splitter

* Remove extra spsaces service-resolver

* More spaces a la hclfmt

* Nice!

* Oh joy!

* More spaces on proxy-defaults

* Update website/pages/docs/agent/config-entries/proxy-defaults.mdx

Co-authored-by: Chris Piraino <cpiraino@hashicorp.com>
2020-06-16 11:28:21 -07:00
John Cowen a4c491ae75
ui: Add ...attributes to healthcheck-info (#8120) 2020-06-16 19:22:04 +01:00
Alvin Huang 6c4cb5d357
split out oss and ent ember builds for testing (#8122) 2020-06-16 14:19:43 -04:00
Alvin Huang 6a721418c1
Add GitHub Notifications for cherry picks (#8115)
* add github PR notification for backport cherry picks

* count number of backport failures and exit after looping through all of them
2020-06-16 14:18:53 -04:00
Daniel Nephin 89d95561df Enable gofmt simplify
Code changes done automatically with 'gofmt -s -w'
2020-06-16 13:21:11 -04:00
Daniel Nephin 71e6534061 Rename txnWrapper to txn 2020-06-16 13:06:02 -04:00
Daniel Nephin 537ae1fd46 Rename db 2020-06-16 13:04:31 -04:00
Daniel Nephin 78c76f0773 Handle return value from txn.Commit 2020-06-16 13:04:31 -04:00
Daniel Nephin 50db8f409a state: Update docstrings for changeTrackerDB and txn
And un-embed memdb.DB to prevent accidental access to underlying
methods.
2020-06-16 13:04:31 -04:00
Paul Banks f9a6386c4a state: track changes so that they may be used to produce change events 2020-06-16 13:04:29 -04:00
Daniel Nephin cabd6b6105 Update go-memdb and go-lru dependencies 2020-06-16 13:00:28 -04:00
Matt Keeler ffc948383b
Update CHANGELOG.md 2020-06-16 12:59:50 -04:00
Matt Keeler 001d8383d6
Update CHANGELOG.md 2020-06-16 12:57:47 -04:00
Matt Keeler cdc4b20afa
ACL Node Identities (#7970)
A Node Identity is very similar to a service identity. Its main targeted use is to allow creating tokens for use by Consul agents that will grant the necessary permissions for all the typical agent operations (node registration, coordinate updates, anti-entropy).

Half of this commit is for golden file based tests of the acl token and role cli output. Another big updates was to refactor many of the tests in agent/consul/acl_endpoint_test.go to use the same style of tests and the same helpers. Besides being less boiler plate in the tests it also uses a common way of starting a test server with ACLs that should operate without any warnings regarding deprecated non-uuid master tokens etc.
2020-06-16 12:54:27 -04:00
David Yu 9b2c12bb0c
Small changes to Readme around Consul description (#8114)
Re-ordered features and revised Consul description.
2020-06-16 09:44:26 -07:00
Daniel Nephin dc84eed0f1
Merge pull request #7675 from hashicorp/dnephin/add-service
service_manager: small changes
2020-06-16 12:40:11 -04:00
Kenia 3946a48928
ui: Refactor detailed health checks to use more of the service/instance-checks helper (#8119) 2020-06-16 12:33:11 -04:00
Daniel Nephin bd866d694c agent/service_manager: remove 'updateCh' field from serviceConfigWatch
Passing the channel to the function which uses it significantly
reduces the scope of the variable, and makes its usage more explicit. It
also moves the initialization of the channel closer to where it is used.

Also includes a couple very small cleanups to remove a local var and
read the error from `ctx.Err()` directly instead of creating a channel
to check for an error.
2020-06-16 12:15:57 -04:00
Daniel Nephin 1c7fce73a8 agent/service_manager: remove 'defaults' field from serviceConfigWatch
This field was always read by the same function that populated the field,
so it does not need to be a field. Passing the value as an argument to
functions makes it more obvious where the value comes from, and also reduces
the scope of the variable significantly.
2020-06-16 12:15:52 -04:00
Daniel Nephin 93d7debbeb agent/service_manager: Pass ctx around
[The documentation for context](https://golang.org/pkg/context/)
recommends not storing context in a struct field:

> Do not store Contexts inside a struct type; instead, pass a Context
> explicitly to each function that needs it. The Context should be the
> first parameter, typically named ctx...

Sometimes there are good reasons to not follow this recommendation, but
in this case it seems easy enough to follow.

Also moved the ctx argument to be the first in one of the function calls
to follow the same recommendation.
2020-06-16 12:14:00 -04:00
Kenia 599551496f
ui: Add detailed Health Checks to Service Detail page (#8111) 2020-06-16 11:59:31 -04:00
John Cowen d2515ed409
ui: Move healthcheck ordering to use new comparators (#8096) 2020-06-16 14:13:29 +01:00
Hans Hasselberg 2162f8a4fa
Update CHANGELOG.md 2020-06-16 00:11:30 +02:00
David Yu de65e6300e
Switching service-route, service-resolver, service-splitter examples to CamelCase (#8107)
* Switching service-route example to CamelCase

* Switch service-resovler examples to CamelCase

* Changing service-splitter examples to CamelCase
2020-06-15 14:14:36 -07:00
Spencer Owen 9b7483c6df
docs: Fix ingress dns entry (#8072) 2020-06-15 15:15:33 -05:00
Daniel Nephin a117824ad5
Merge pull request #8106 from hashicorp/dnephin/hook-translate-keys-make-a-copy
decode: do not modify the source data in HookTranslateKeys
2020-06-15 14:48:33 -04:00
Daniel Nephin 13f564bdd4
Merge pull request #8074 from hashicorp/dnephin/remove-references-to-PatchSliceOfMaps
Update comments that reference PatchSliceOfMaps
2020-06-15 14:33:10 -04:00
Daniel Nephin 0fb5e53d14 decode: do not modify the source data in HookTranslateKeys
This was causing a 'fatal error: concurrent map iteration and map write' with gateways
2020-06-15 14:22:41 -04:00
Daniel Nephin 97808ce1d4
Merge pull request #8101 from hashicorp/dnephin/decode-hook-slice-interfaces
decode: recursively unslice opaque config
2020-06-15 13:33:55 -04:00
Daniel Nephin dad8f29d4e decode: Only recursively unslice when the target is an interface{} 2020-06-15 12:56:51 -04:00
Chris Piraino 0987b5e8b8
Update CHANGELOG.md 2020-06-15 11:01:12 -05:00
Matt Keeler 390be25b45
Update CHANGELOG.md 2020-06-15 11:03:07 -04:00
Matt Keeler 976f922abf
Make the Agent Cache more Context aware (#8092)
Blocking queries issues will still be uncancellable (that cannot be helped until we get rid of net/rpc). However this makes it so that if calling getWithIndex (like during a cache Notify go routine) we can cancell the outer routine. Previously it would keep issuing more blocking queries until the result state actually changed.
2020-06-15 11:01:25 -04:00
Daniel Nephin f613c919d2 decode: recursively unslice opaque config
Also handle []interface{} in HookWeakDecodeFromSlice

Without this change only the top level []map[string]interface{} will be
unpacked as a single item. With this change any nested config will be
unpacked.
2020-06-12 22:00:33 -04:00
Freddy 272b7aade4
Merge pull request #8099 from hashicorp/gateway-services-endpoint 2020-06-12 15:14:54 -06:00
freddygv f4179b400d Update telemetry for gateway-services endpoint 2020-06-12 14:44:36 -06:00
freddygv 51f8f76b3b Remove unused method and fixup docs ref 2020-06-12 13:47:43 -06:00
freddygv cc4ff3ae02 Fixup stray sid references 2020-06-12 13:47:43 -06:00
freddygv 26583e12ba Add docs 2020-06-12 13:47:43 -06:00
freddygv 1e7e716742 Move compound service names to use ServiceName type 2020-06-12 13:47:43 -06:00
freddygv 1cab73e609 Create HTTP endpoint 2020-06-12 13:46:47 -06:00