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

py/tools: Namespace repo packages to prevent conflict #29787

Merged
merged 1 commit into from
Oct 2, 2023

Conversation

phlax
Copy link
Member

@phlax phlax commented Sep 24, 2023

This allows repo tooling to work externally alongside our namepsaced pypi packages

Commit Message:
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

@repokitteh-read-only repokitteh-read-only bot added the deps Approval required for changes to Envoy's external dependencies label Sep 24, 2023
@repokitteh-read-only
Copy link

CC @envoyproxy/dependency-shepherds: Your approval is needed for changes made to (bazel/.*repos.*\.bzl)|(bazel/dependency_imports\.bzl)|(api/bazel/.*\.bzl)|(.*/requirements\.txt)|(.*\.patch).
envoyproxy/dependency-shepherds assignee is @htuch

🐱

Caused by: #29787 was opened by phlax.

see: more, trace.

@phlax phlax marked this pull request as draft September 24, 2023 11:43
@phlax
Copy link
Member Author

phlax commented Sep 24, 2023

this requires an upstream fix bazel-contrib/bazel-lib#547

it also has a really dirty hack (repeated) - its v similar to the ones we used to have to patch sys.path - in fact that hack may work and be cleaner - this was was v much a distressed hack

breaking out bits of here as they are resolved (eg #29786) - downstream target is envoyproxy/envoy-website#336

@phlax
Copy link
Member Author

phlax commented Sep 29, 2023

@htuch this is what is left to make the external docs/protodoc build work

essentially the problem boils down to the fact that we have pip deps that are namespaced envoy.* and rules_python is creating non namespaced-packages for tool/* which externally it sees as envoy/tools/*

not sure how best to resolve - not as current in this Pr - at least without some cleanup - will try and follow up one way or anotherr - for now the website is carrying the patch from this pr

@phlax phlax force-pushed the protodoc-prefix branch 2 times, most recently from 98e83b5 to 0d343b7 Compare September 30, 2023 12:31
@phlax phlax changed the title [WIP] docs/build: Fixes for building as external target py/tools: Namespace repo packages to prevent conflict Sep 30, 2023
@phlax phlax marked this pull request as ready for review September 30, 2023 12:34
@phlax phlax force-pushed the protodoc-prefix branch 10 times, most recently from 42ddabc to 5f16d71 Compare September 30, 2023 13:26
@phlax phlax force-pushed the protodoc-prefix branch 3 times, most recently from 3ebbba1 to 4ebf12d Compare September 30, 2023 14:01
@phlax
Copy link
Member Author

phlax commented Sep 30, 2023

this should work now and is a i think a much more elegant/reliable/bazelish solution

essentially it injects namespaced init.py into all the places that were making it impossible to use tooling externally

i may have missed a couple but this will at least allow external building of docs, and use of most of the linting tools

Signed-off-by: Ryan Northey <ryan@synca.io>
@repokitteh-read-only repokitteh-read-only bot removed the deps Approval required for changes to Envoy's external dependencies label Oct 2, 2023
@phlax phlax merged commit 40ce065 into envoyproxy:main Oct 2, 2023
121 checks passed
phlax added a commit to phlax/envoy that referenced this pull request Oct 3, 2023
Signed-off-by: Ryan Northey <ryan@synca.io>

Signed-off-by: phlax <phlax@users.noreply.github.com>
phlax added a commit to phlax/envoy that referenced this pull request Oct 3, 2023
Signed-off-by: Ryan Northey <ryan@synca.io>

Signed-off-by: phlax <phlax@users.noreply.github.com>
phlax added a commit that referenced this pull request Oct 3, 2023
Signed-off-by: Ryan Northey <ryan@synca.io>

Signed-off-by: phlax <phlax@users.noreply.github.com>
phlax added a commit that referenced this pull request Oct 3, 2023
Signed-off-by: Ryan Northey <ryan@synca.io>

Signed-off-by: phlax <phlax@users.noreply.github.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.

2 participants