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

build: setup contrib #17595

Merged
merged 7 commits into from
Aug 13, 2021
Merged

build: setup contrib #17595

merged 7 commits into from
Aug 13, 2021

Conversation

mattklein123
Copy link
Member

@mattklein123 mattklein123 commented Aug 4, 2021

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

@repokitteh-read-only
Copy link

As a reminder, PRs marked as draft will not be automatically assigned reviewers,
or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

🐱

Caused by: #17595 was opened by mattklein123.

see: more, trace.

@mattklein123
Copy link
Member Author

@phlax @lizan I have more work to do on documentation but I think this is pretty close to ready on the code side. Can you give me a first pass to see if you have any high level comments while I work on more docs?

Also move Squash extension to contrib

Signed-off-by: Matt Klein <mklein@lyft.com>
@mattklein123 mattklein123 changed the title [WIP] build: setup contrib build: setup contrib Aug 9, 2021
@mattklein123 mattklein123 marked this pull request as ready for review August 9, 2021 16:44
@mattklein123
Copy link
Member Author

@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"
Copy link
Member

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

Copy link
Member Author

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.

Copy link
Member

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.

Copy link
Member Author

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?

Copy link
Member

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.

Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor

@adisuissa adisuissa left a 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.

CONTRIBUTING.md Outdated Show resolved Hide resolved
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Matt Klein <mklein@lyft.com>
@mattklein123
Copy link
Member Author

@htuch @lizan @adisuissa updated per comments

EXTENSION_POLICY.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Show resolved Hide resolved
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Matt Klein <mklein@lyft.com>
@mattklein123
Copy link
Member Author

Updated, PTAL

Copy link
Contributor

@ggreenway ggreenway left a 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.

@mattklein123
Copy link
Member Author

@lizan @htuch PTAL when you have time, thanks.

@mattklein123 mattklein123 merged commit e385e01 into main Aug 13, 2021
@mattklein123 mattklein123 deleted the contrib branch August 13, 2021 01:03
Copy link
Member

@htuch htuch left a 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!

leyao-daily pushed a commit to leyao-daily/envoy that referenced this pull request Sep 30, 2021
Signed-off-by: Matt Klein <mklein@lyft.com>
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.

9 participants