Skip to content
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

Add missing return data to scheduled jobs (#24237) #30246

Merged
merged 3 commits into from Jan 13, 2016
Merged

Add missing return data to scheduled jobs (#24237) #30246

merged 3 commits into from Jan 13, 2016

Conversation

dmacvicar
Copy link
Contributor

Scheduled jobs miss success and retcode, as described in #24237

This PR refactors the job execution so that:

  • retcode is set
  • Wrong function names do not result in ignoring the job, but sending the appropriate ret event back
  • Emulate success False by capturing exceptions and sending the event back even in the error case
  • Making the case of missing function name a forced success false

Feedback welcome.

…4237)

* Instead of ignoring the execution of jobs with invalid function names,
  continue, so that always some data is returned.

* Move the code that returns data to the master to the 'finally' section, so
  that data is returned also in case of error.

* Set a default 'success' value, and overwrite it with the value from
  the function context.
@cachedout
Copy link
Contributor

This all looks pretty solid to me. Thanks, @dmacvicar

I'd like to first cc: @garethgreenaway on this one for some additional review though before we get this in.

@cachedout cachedout added the Pending-Discussion The issue or pull request needs more discussion before it can be closed or merged label Jan 12, 2016
@garethgreenaway
Copy link
Contributor

@cachedout looks good.

@cachedout
Copy link
Contributor

I'm going to go ahead and merge this. Looks really good.

@jacobhammons This might be a nice feature to highlight in the release notes.

cachedout pushed a commit that referenced this pull request Jan 13, 2016
Add missing return data to scheduled jobs (#24237)
@cachedout cachedout merged commit 15707e0 into saltstack:2015.8 Jan 13, 2016
@cachedout cachedout added Release-Notes and removed Pending-Discussion The issue or pull request needs more discussion before it can be closed or merged labels Jan 13, 2016
@dmacvicar dmacvicar deleted the dmacvicar-2015.8-24237 branch January 14, 2016 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants