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

Checking for jid before returning data #52459

Closed
wants to merge 4 commits into from
Closed

Checking for jid before returning data #52459

wants to merge 4 commits into from

Conversation

brejoc
Copy link
Contributor

@brejoc brejoc commented Apr 9, 2019

What does this PR do?

Seems raw can have returns for the same minion, but an other job. In order to not return resutls from the wrong job, we need to check for the jid.

What issues does this PR fix or reference?

#50927

Previous Behavior

Wrong job results might be returned. Please take a look at #50927

New Behavior

Only the correct jobs results should be returned.

Tests written?

No

Commits signed with GPG?

Yes

Seems raw can have returns for the same minion, but an other job. In
order to not return resutls from the wrong job, we need to check for the
jid.
@brejoc brejoc requested a review from a team as a code owner April 9, 2019 14:37
Copy link
Contributor

@Ch3LL Ch3LL left a comment

Choose a reason for hiding this comment

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

Can you write a test for this change?

@brejoc
Copy link
Contributor Author

brejoc commented Aug 7, 2019

@Ch3LL Sorry for dragging my feet here for so long, but finally I've just added two test cases. Could you please check your the test runs? Hudson seems to have problems fetching the changes.

@Ch3LL
Copy link
Contributor

Ch3LL commented Aug 9, 2019

I restarted the tests. I went ahead and tested this PR against my test case i pasted in the issue and unfortunately im still seeing the issue:

(salt-py2) ➜  ~ for i in {1..100}; do sudo python2 ~/programa.py; done
{u'newrecipe': {u'ret': u'testa'}}
{u'newrecipe': {u'ret': u'testa'}}
{u'newrecipe': {u'ret': u'testa'}}
{u'newrecipe': {u'ret': u'testa'}}
{u'newrecipe': {u'ret': u'testb'}}
{u'newrecipe': {u'ret': u'testa'}}

are you seeing it fixed for you? I tried multiple times to make sure.

@brejoc
Copy link
Contributor Author

brejoc commented Nov 6, 2019

@Ch3LL I've been re-running the tests several times and for me the issue is gone. As soon as I remove the patch, I see it again. Are you running both scripts on the master?

@brejoc
Copy link
Contributor Author

brejoc commented Nov 6, 2019

@Ch3LL I'm closing this PR because I've just opened the same PR against the master branch: #55216

@brejoc brejoc closed this Nov 6, 2019
@brejoc brejoc deleted the 2018.3-get-full-returns-jid-fix branch January 2, 2020 13:09
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.

2 participants