Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Fix pipeline exec steps run in Nomad #4185

Merged
merged 1 commit into from
Nov 15, 2022

Conversation

paladin-devops
Copy link
Contributor

Prior to this PR, the Nomad task launcher plugin previously set the "command" field for launching tasks. Before pipelines, this was fine for ODRs. However, pipelines pass a slice of string to the TaskLaunchInfo struct (from the Waypoint plugin SDK) for the Entrypoint field. The Nomad Docker driver's command field accepts only string, not slice of string. Therefore, any exec steps for pipelines run by Nomad ODRs would fail to start before this PR.

The entrypoint field of the Nomad Docker driver config does accept a slice of string, and that is the config now being set in the Nomad task launcher plugin.

Prior to this commit, the Nomad task launcher plugin previously set the "command" field for launching tasks. Before pipelines, this was fine for ODRs. However, pipelines pass a slice of string to the TaskLaunchInfo struct for the Entrypoint field. The Nomad Docker driver's command field accepts only string, not slice of string. Therefore, any exec steps for pipelines run by Nomad ODRs would fail to start.

The entrypoint field of the Nomad Docker driver config does accept a slice of string.
"command": tli.Entrypoint,
"image": tli.OciUrl,
"args": tli.Arguments,
"entrypoint": tli.Entrypoint,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, surprised we didn't catch this with other ODR jobs! Do we not need to also set the command for the launched resource too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope! Setting the command in addition to the entrypoint here would just add args to the command that the entrypoint runs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/0.10.x core/pipeline Issues related to the pipelines feature plugin/nomad plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants