open-nomad/nomad/structs
Charlie Voiselle d93ba0cf32
Add warnings to var put for non-alphanumeric keys. (#15933)
* Warn when Items key isn't directly accessible

Go template requires that map keys are alphanumeric for direct access
using the dotted reference syntax. This warns users when they create
keys that run afoul of this requirement.

- cli: use regex to detect invalid indentifiers in var keys
- test: fix slash in escape test case
- api: share warning formatting function between API and CLI
- ui: warn if var key has characters other than _, letter, or number

---------
Co-authored-by: Charlie Voiselle <464492+angrycub@users.noreply.github.com>
Co-authored-by: Luiz Aoqui <luiz@hashicorp.com>
2023-02-13 16:14:59 -05:00
..
config Label for the Web UI (#16006) 2023-02-02 16:29:04 -05:00
acl.go deps: upgrade to hashicorp/golang-lru/v2 (#16085) 2023-02-08 15:20:33 -06:00
acl_test.go sso: allow binding rules to create management ACL tokens. (#15860) 2023-01-26 09:57:44 +01:00
alloc.go
alloc_test.go
autopilot.go
batch_future.go
batch_future_test.go
bitmap.go
bitmap_test.go
check_test.go
checks.go
connect.go
connect_test.go
consul.go
consul_oss.go
consul_oss_test.go
consul_test.go
csi.go renamed stanza to block for consistency with other projects (#15941) 2023-01-30 15:48:43 +01:00
csi_test.go
devices.go
devices_test.go
diff.go Add option to expose workload token to task (#15755) 2023-02-02 10:59:14 -08:00
diff_test.go Add option to expose workload token to task (#15755) 2023-02-02 10:59:14 -08:00
encoding.go
errors.go Pre forwarding authentication (#15417) 2022-12-06 14:44:03 -05:00
errors_test.go
eval.go eval delete: move batching of deletes into RPC handler and state (#15117) 2022-11-14 14:08:13 -05:00
event.go events: add ACL binding rules to core events stream topics. (#15544) 2022-12-14 14:49:49 +01:00
extensions.go
funcs.go Add warnings to var put for non-alphanumeric keys. (#15933) 2023-02-13 16:14:59 -05:00
funcs_test.go Add warnings to var put for non-alphanumeric keys. (#15933) 2023-02-13 16:14:59 -05:00
generate.sh deps: upgrade to hashicorp/golang-lru/v2 (#16085) 2023-02-08 15:20:33 -06:00
handlers.go
job.go servicedisco: implicit constraint for nomad v1.4 when using nsd checks (#14868) 2022-10-11 08:21:42 -05:00
job_test.go servicedisco: implicit constraint for nomad v1.4 when using nsd checks (#14868) 2022-10-11 08:21:42 -05:00
keyring.go keyring: safely handle missing keys and restore GC (#15092) 2022-11-01 15:00:50 -04:00
network.go renamed stanza to block for consistency with other projects (#15941) 2023-01-30 15:48:43 +01:00
network_test.go
node.go Dynamic Node Metadata (#15844) 2023-02-07 14:42:25 -08:00
node_class.go
node_class_test.go
node_test.go Dynamic Node Metadata (#15844) 2023-02-07 14:42:25 -08:00
operator.go renamed stanza to block for consistency with other projects (#15941) 2023-01-30 15:48:43 +01:00
search.go
service_identities.go
service_registration.go
service_registration_test.go
services.go Rename fields on proxyConfig (#15541) 2023-01-30 09:31:16 -06:00
services_test.go renamed stanza to block for consistency with other projects (#15941) 2023-01-30 15:48:43 +01:00
streaming_rpc.go
structs.go deps: update go-set, go-landlock (#16146) 2023-02-13 08:26:30 -06:00
structs_codegen.go
structs_oss.go
structs_periodic_test.go
structs_test.go Add option to expose workload token to task (#15755) 2023-02-02 10:59:14 -08:00
testing.go
uuid.go tests: don't mutate global structs in core scheduler tests (#16120) 2023-02-10 09:26:00 -05:00
variables.go [feat] Nomad Job Templates (#15746) 2023-02-02 10:37:40 -05:00
variables_test.go [feat] Nomad Job Templates (#15746) 2023-02-02 10:37:40 -05:00
vault.go
volume_test.go System and sysbatch jobs always have zero index (#16030) 2023-02-02 16:18:01 -05:00
volumes.go System and sysbatch jobs always have zero index (#16030) 2023-02-02 16:18:01 -05:00
workload_id.go Add option to expose workload token to task (#15755) 2023-02-02 10:59:14 -08:00
workload_id_test.go Add option to expose workload token to task (#15755) 2023-02-02 10:59:14 -08:00