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

internal/server: Ensure on-demand runner config exists before start job #3054

Merged
merged 3 commits into from
Mar 2, 2022

Conversation

briancain
Copy link
Member

Prior to this commit, if the state package returned nil or nothing for
an on-demand runner config based on the id set for a job, Waypoint would
still attempt to queue the job with a nil ODR config. This leads to a
panic immediately after when we attempt to set environment variables
from the ODR config for the job on a nil config. This commit fixes that
by returning an error if the requested ODR config does not exist in the
state database.

This is related to #3051 but
mainly fixes the bad behavior with the panic, not the core bug of a invalid
or missing ODR config set on a job.

@briancain briancain added pr/no-changelog No automatic changelog entry required for this pull request backport/0.7.x labels Mar 1, 2022
@briancain briancain requested a review from a team March 1, 2022 19:54
@github-actions github-actions bot added the core label Mar 1, 2022
@briancain briancain removed the pr/no-changelog No automatic changelog entry required for this pull request label Mar 1, 2022
Prior to this commit, if the state package returned nil or nothing for
an on-demand runner config based on the id set for a job, Waypoint would
still attempt to queue the job with a nil ODR config. This leads to a
panic immediately after when we attempt to set environment variables
from the ODR config for the job on a nil config. This commit fixes that
by returning an error if the requested ODR config does not exist in the
state database.
@briancain briancain force-pushed the odr-no-profile-for-job branch from 73218fd to 74c99a5 Compare March 2, 2022 19:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants