-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
connect: enable configuring sidecar_task.name #7684
Conversation
Before, the submitted jobspec for sidecar_task would pass through 2 key validation steps - once for the subset specific to connect sidecar task definitions, and once again for the set of normal task definition where the task would actually get unmarshalled. The valid keys for the normal task definition did not include "name", which is supposed to be configurable for the sidecar task. To fix this, just eliminate the double validation step, and instead pass-in the correct set of keys to validate against to the one generic task parser. Fixes #7680
jobspec/parse_task.go
Outdated
@@ -12,6 +12,48 @@ import ( | |||
"github.com/mitchellh/mapstructure" | |||
) | |||
|
|||
var ( | |||
normalTaskKeys = []string{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So that the shared keys don’t fall out of sync maybe we should have a coreTaskKeys
and have these two something like
normalTaskKeys = append(coreTaskKeys, ...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea; done!
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
Before, the submitted jobspec for
sidecar_task
would passthrough 2 HCL key validation steps - once for the subset specific
to connect sidecar task definitions, and once again for the set
of normal task definition.
The valid keys for the normal task definition did not include
name
, which is supposed to be configurable for the sidecartask. To fix this, just eliminate the double validation for sidecars,
and instead pass in the correct set of keys to validate against
to the one generic task parser.
Fixes #7680
Example)