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

Conversation

Projects
None yet
3 participants
@dmacvicar
Contributor

dmacvicar commented Jan 8, 2016

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.

dmacvicar added some commits Jan 8, 2016

include the 'success' field in scheduled jobs return data (part of #2…
…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

This comment has been minimized.

Show comment
Hide comment
@cachedout

cachedout Jan 12, 2016

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.

Contributor

cachedout commented Jan 12, 2016

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.

@garethgreenaway

This comment has been minimized.

Show comment
Hide comment
@garethgreenaway
Member

garethgreenaway commented Jan 12, 2016

@cachedout looks good.

@cachedout

This comment has been minimized.

Show comment
Hide comment
@cachedout

cachedout Jan 13, 2016

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.

Contributor

cachedout commented Jan 13, 2016

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 added a commit that referenced this pull request Jan 13, 2016

Merge pull request #30246 from dmacvicar/dmacvicar-2015.8-24237
Add missing return data to scheduled jobs (#24237)

@cachedout cachedout merged commit 15707e0 into saltstack:2015.8 Jan 13, 2016

2 of 5 checks passed

default Merged build finished.
Details
jenkins/salt-pr-rs-cent7-n Salt PR - RS CentOS 7 #11188 — FAILURE
Details
jenkins/salt-pr-rs-ubuntu14.04-n Salt PR - RS Ubuntu 14 #8681 — FAILURE
Details
jenkins/salt-pr-clone Salt PR - Clone Repository #12600 — SUCCESS
Details
jenkins/salt-pr-lint-n Salt PR - Code Lint #12299 — SUCCESS
Details

@dmacvicar dmacvicar deleted the dmacvicar:dmacvicar-2015.8-24237 branch Jan 14, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment