-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
build: setup contrib #17595
build: setup contrib #17595
Conversation
4a49763
to
7c6f4ff
Compare
Also move Squash extension to contrib Signed-off-by: Matt Klein <mklein@lyft.com>
@phlax @htuch @adisuissa @lizan this is ready for review. PTAL. The only thing not done is the creation of the docker hub repos which I will do once we agree on the general shape of this. |
@@ -1,12 +1,13 @@ | |||
#include "source/extensions/filters/http/squash/config.h" | |||
#include "contrib/filters/http/squash/source/config.h" |
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 thought this will be contrib/squash/source/filters/http/config.h
? Per https://docs.google.com/document/d/1yl7GOZK1TDm_7vxQvt8UQEAu07UQFru1uEKXM6ZZg_g/edit#heading=h.zgixgx1c4t8u
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.
IMO it makes more sense to use the full extension path that matches the normal extensions tree. I can make the doc more clear on this.
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 meant we want contrib/<extension_name>/ as a unit, have source and test under it. In that way we can group extensions that have to be used together (for example, something like dynamic_forward_proxy should have both filter and cluster extension under contrib/dynamic_forward_proxy
.) It also makes CODEOWNER clearer instead of mixing multiple extensions in same tree.
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 did end up grouping source/test under the same name, but I still think if we just do things by name it will get pretty chaotic. I have a strong preference for matching the same directory structure as source/extensions. You don't think it will get extremely messy if we don't have this structure?
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 did end up grouping source/test under the same name, but I still think if we just do things by name it will get pretty chaotic. I have a strong preference for matching the same directory structure as source/extensions. You don't think it will get extremely messy if we don't have this structure?
No, that was the whole point I proposed contrib/<extension_name>
and I feel strongly that under every contrib/extension_name
it should look like a standalone repository. Then we can give the CODEOWNERS responsibility of managing everything under it, if no one is maintaining we can just delete the whole directory. It also has the flexibility of having multiple extension under same name like I stated above. We can have a guidance that under contrib/<extension_name>
should still follow same structure of the main tree.
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 mildly prefer keeping code for a given extension in a given directory, though deleting the contrib/source/extensions/foo contrib/include/extensions/foo contrib/test/extensions/foo isn't a deal breaker (I'm fine either way)
I'm strongly against copy-pasted common code. I'd lean towards a common directory with default visibility private, and explicit opt-in for each library so we can easily tell that common/foo_lib is used by extension A and B, and clean up if we delete extension A and B.
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.
Sorry I want to be completely clear about what is being proposed here since I'm not sure everyone is talking about the same thing.
The current code:
/contrib/<... full hierarchical path based on extension type ...>/<extension name>/<source|test>/
Lizan's proposal:
/contrib/<extension name>/<... full hierarchical path based on extension type ...>//<source|test>/
The latter means that when one looks in the contrib folder they will see a giant list of names with no context beyond that.
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.
The reason I suggested copy/paste shared code, is that if it isn't clear who the owner of the shared code is, what happens if one of the extensions using it wants to make a change and the other user doesn't? But I'm fine with the group-consensus to not duplicate the shared code.
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 think one way to looking at the /contrib/extension-name/full
is like github organizations. The extension-name
part is like a github org; then there's >=1 extensions underneath it, all owned by the same logical owner.
I think both proposals have merit; I'd be fine with either approach, and as we get more experience with managing this, and if we feel like it, we can re-org it into the other approach if needed. So do whatever is most expedient.
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.
My immediate take is putting extension name on the top level would be pretty messy, especially since I think we'd need the full extension name? We have extensions with the same name for different categories, e.g. envoy.filters.network.rbac and envoy.filters.http.rbac. We might not have this for any of the contrib candidates, but it seems odd to require unique names for extensions when we previously didn't.
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.
Changes LGTM, thanks!
Left a couple of suggestions here and in the doc.
Signed-off-by: Matt Klein <mklein@lyft.com>
@htuch @lizan @adisuissa updated per comments |
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Matt Klein <mklein@lyft.com>
Updated, PTAL |
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.
Docs, policy, directory structure all look good to me. Will defer to other reviewers on the bazel/build-system changes.
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.
Post-merge LGTM, thanks!
Signed-off-by: Matt Klein <mklein@lyft.com>
Also move Squash extension to contrib
As per: https://docs.google.com/document/d/1yl7GOZK1TDm_7vxQvt8UQEAu07UQFru1uEKXM6ZZg_g/edit#
Part of #14078
Risk Level: Low
Testing: Existing tests. Also a bunch of manual testing.
Docs Changes: Added
Release Notes: Added
Platform Specific Features: N/A