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

Set noValidate if the request only removes upstreams and changes nothing else. #310

Merged
merged 27 commits into from
Jun 17, 2019

Conversation

baconmania
Copy link
Contributor

No description provided.

@@ -302,6 +304,31 @@ public void run() {
}
}

private QueuedRequestWithState setNoValidateIfPossible(QueuedRequestWithState nonServiceChangeRequest) {
BaragonRequest originalRequest = nonServiceChangeRequest.getRequest();
if (originalRequest.getAddUpstreams().isEmpty() && originalRequest.getReplaceUpstreams().isEmpty() && !originalRequest.getRemoveUpstreams().isEmpty()) {
Copy link
Member

Choose a reason for hiding this comment

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

nit, but can we make this a nicely named method. Read the if statement 3 times before realizing there was a ! on the remove, lol. Maybe isOnlyUpstreamRemoval() or something?

@baconmania baconmania merged commit dac03d6 into master Jun 17, 2019
@baconmania baconmania deleted the set-noValidate-if-possible branch June 17, 2019 18:43
@baconmania baconmania added this to the 0.9.0 milestone Jun 17, 2019
@baconmania baconmania restored the set-noValidate-if-possible branch June 17, 2019 22:05
@ssalinas ssalinas deleted the set-noValidate-if-possible branch July 17, 2020 18:54
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