-
Notifications
You must be signed in to change notification settings - Fork 72
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
Enable environment overrides for job tasks #779
Conversation
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.
Minor changes needed, otherwise LGTM
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.
Nit remaining, good to merge on update.
bundle/config/resources/job.go
Outdated
// The tasks field is a slice, and as such, overrides are appended to it. | ||
// We can identify a task by its task key, however, so we can use this key | ||
// to figure out which definitions are actually overrides and merge them. | ||
func (j *Job) MergeJobTasks() error { |
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.
Function name also includes "JobTasks".
Bundles: * Use enums for default python template ([#765](#765)). * Make bundle deploy work if no resources are defined ([#767](#767)). * Added support for experimental scripts section ([#632](#632)). * Error when unknown keys are encounters during template execution ([#766](#766)). * Fall back to full Git clone if shallow clone is not supported ([#775](#775)). * Enable environment overrides for job tasks ([#779](#779)). * Increase timeout waiting for job run to 1 day ([#786](#786)). Internal: * Update Go SDK to v0.19.3 (unreleased) ([#778](#778)).
Bundles: * Use enums for default python template ([#765](#765)). * Make bundle deploy work if no resources are defined ([#767](#767)). * Added support for experimental scripts section ([#632](#632)). * Error when unknown keys are encounters during template execution ([#766](#766)). * Fall back to full Git clone if shallow clone is not supported ([#775](#775)). * Enable environment overrides for job tasks ([#779](#779)). * Increase timeout waiting for job run to 1 day ([#786](#786)). Internal: * Update Go SDK to v0.19.3 (unreleased) ([#778](#778)).
## Changes Follow up for #658 When a job definition has multiple job tasks using the same key, it's considered invalid. Instead we should combine those definitions with the same key into one. This is consistent with environment overrides. This way, the override ends up in the original job tasks, and we've got a clear way to put them all together. ## Tests Added unit tests
Bundles: * Use enums for default python template ([#765](#765)). * Make bundle deploy work if no resources are defined ([#767](#767)). * Added support for experimental scripts section ([#632](#632)). * Error when unknown keys are encounters during template execution ([#766](#766)). * Fall back to full Git clone if shallow clone is not supported ([#775](#775)). * Enable environment overrides for job tasks ([#779](#779)). * Increase timeout waiting for job run to 1 day ([#786](#786)). Internal: * Update Go SDK to v0.19.3 (unreleased) ([#778](#778)).
Changes
Follow up for #658
When a job definition has multiple job tasks using the same key, it's considered invalid. Instead we should combine those definitions with the same key into one. This is consistent with environment overrides. This way, the override ends up in the original job tasks, and we've got a clear way to put them all together.
Tests
Added unit tests