-
Notifications
You must be signed in to change notification settings - Fork 29
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
enhancement(queue): don't inject default route #540
Conversation
Codecov Report
@@ Coverage Diff @@
## master #540 +/- ##
==========================================
- Coverage 54.79% 54.79% -0.01%
==========================================
Files 178 178
Lines 13506 13505 -1
==========================================
- Hits 7401 7400 -1
Misses 5798 5798
Partials 307 307
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think it's worth adding a flag for this?
Instead of adding a flag, what if remove the default injection of the vela
route?
To be more specific, I'm proposing we remove the following code:
Lines 40 to 43 in d7a6968
// check if the default route is provided | |
if !strings.Contains(strings.Join(s.Routes, ","), constants.DefaultRoute) { | |
s.Routes = append(s.Routes, constants.DefaultRoute) | |
} |
This would achieve the same end-goal without adding another variable to configure.
It would turn this into a breaking change since folks will probably have to update worker configs to include |
I don't believe that's the case since we already set Lines 57 to 63 in df1ca62
But if it was a breaking change, I'm not sure that is something that should prevent the change. |
Or are you talking about when a worker is already configured with routes that don't include Meaning those workers would also have to update the configuration to include the |
yes, this. maybe the assumption that most folks set up routes on the worker is too much of an assumption though. i can get behind that. |
Ok I think I understand and can see the cause for concern 🤔 Unsure what we should do about the assumption of routes configured for workers. Thinking about this a bit more, I still like the idea of removing the injection of the I say this because I could see the cause for confusion from an admin perspective if you configure a worker to listen on specific routes, and unknown to you, the worker is also listening on a route you didn't configure it with ( Thoughts? FWIW: On our end, I don't believe we configure the worker routes and we just use the default set by Vela. |
I do as well.
That's fair. At the very least, we would probably want to call the change out in the release notes, since for non-default behavior this could essentially result in non-working.. workers. |
change made 👍🏼 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know I approved it already 😞
But could we also remove the routes being declared in the Docker compose file?
https://github.com/go-vela/server/blob/master/docker-compose.yml#L31
https://github.com/go-vela/server/blob/master/docker-compose.yml#L69
@jbrockopp change made |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🐬
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
closes go-vela/community#445
adds another flag to allow not adding the default route. open to alternative naming of the flag.removes injection of default route for redis queue setup.
IMPORTANT:
since pipelines that don't have a
worker
declaration automatically get published to the default route:vela
, any workers configured with custom routes must also explicitly includevela
in their route configuration if the workers are meant to process those workloads.