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

Prevent receiving list of random changes for empty topic name #78

Merged
merged 1 commit into from
Feb 28, 2018

Conversation

Jimilian
Copy link
Contributor

@Jimilian Jimilian commented Feb 28, 2018

Unfortunately, sometimes Gerrit sends empty topic field or Jenkins deserialise topic as empty string. To prevent receiving list of random changes for empty topic this change adds explicit checks.

And because we are using masked topic name ({}) to support spaces, commas and other things we end up in have full list of all gerrit changes (with some limit on gerrit side):

ssh -p PORT user@gerrit gerrit query --current-patch-set --format=JSON topic:{} | wc -l
501

Without mask (no entries found):

ssh -p PORT user@gerrit gerrit query --current-patch-set --format=JSON topic: | wc -l
1

So, now we forcibly switch topic/topicObject to null if name is empty and check that we don't query changes for empty topic name.

Unfortunately, sometimes Gerrit sends empty topic field or Jenkins
deserialise topic as empty string. To prevent receiving list of random
changes for empty topic this change adds explicit checks.
@rsandell rsandell merged commit 43564cb into sonyxperiadev:master Feb 28, 2018
@Jimilian Jimilian deleted the fix_empty_topic branch February 28, 2018 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants