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

v2.x Python dep updates #4503

Merged
merged 4 commits into from
Sep 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions DEPENDENCIES.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,11 @@ libraries:
---- ------- ----------
CacheControl 0.12.10 Apache License 2.0
Cython 0.29.24 Apache License 2.0
Flask 2.0.2 3-clause BSD license
Jinja2 3.0.3 3-clause BSD license
MarkupSafe 2.0.1 3-clause BSD license
Flask 2.2.1 3-clause BSD license
Jinja2 3.1.2 3-clause BSD license
MarkupSafe 2.1.1 3-clause BSD license
PyYAML 5.4.1 MIT license
Werkzeug 2.0.2 3-clause BSD license
Werkzeug 2.2.1 3-clause BSD license
appdirs 1.4.4 MIT license
attrs 21.4.0 MIT license
cachetools 5.0.0 MIT license
Expand All @@ -164,6 +164,7 @@ libraries:
gunicorn 20.1.0 MIT license
html5lib 1.1 MIT license
idna 3.3 3-clause BSD license
importlib-metadata 4.12.0 Apache License 2.0
itsdangerous 2.0.1 3-clause BSD license
jsonpatch 1.32 3-clause BSD license
jsonpointer 2.2 3-clause BSD license
Expand Down Expand Up @@ -197,3 +198,4 @@ libraries:
urllib3 1.26.8 MIT license
webencodings 0.5.1 3-clause BSD license
websocket-client 1.2.3 Apache License 2.0
zipp 3.8.1 MIT license
49 changes: 49 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,52 @@ deploy-only: preflight-dev-kubeconfig $(tools/kubectl) build-output/yaml-$(patsu
@printf "$(GRN)Your ambassador image:$(END) $(BLD)$$($(tools/kubectl) --kubeconfig $(DEV_KUBECONFIG) get -n ambassador deploy ambassador -o 'go-template={{(index .spec.template.spec.containers 0).image}}')$(END)\n"
@printf "$(GRN)Your built image:$(END) $(BLD)$$(sed -n 2p docker/$(LCNAME).docker.push.remote)$(END)\n"
.PHONY: deploy-only

##############################################
LanceEa marked this conversation as resolved.
Show resolved Hide resolved
##@ Telepresence based runners
##############################################

.PHONY: tel-quit
tel-quit: ## Quit telepresence
telepresence quit

tel-list: ## List intercepts
telepresence list

EMISSARY_AGENT_ENV=emissary-agent.env

.PHONY: intercept-emissary-agent
intercept-emissary-agent:
telepresence intercept --namespace ambassador ambassador-agent -p 8080:http \
--http-header=test-$(USER)=1 --preview-url=false --env-file $(EMISSARY_AGENT_ENV)

.PHONY: leave-emissary-agent
leave-emissary-agent:
telepresence leave ambassador-agent-ambassador

RUN_EMISSARY_AGENT=bin/run-emissary-agent.sh
$(RUN_EMISSARY_AGENT):
@test -e $(EMISSARY_AGENT_ENV) || echo "Environment file $(EMISSARY_AGENT_ENV) does not exist, please run 'make intercept-emissary-agent' to create it."
echo 'AES_LOG_LEVEL=debug AES_SNAPSHOT_URL=http://ambassador-admin.ambassador:8005/snapshot-external AES_DIAGNOSTICS_URL="http://ambassador-admin.ambassador:8877/ambassador/v0/diag/?json=true" AES_REPORT_DIAGNOSTICS_TO_CLOUD=true go run ./cmd/busyambassador agent' >> $(RUN_EMISSARY_AGENT)
chmod a+x $(RUN_EMISSARY_AGENT)

.PHONY: irun-emissary-agent
irun-emissary-agent: bin/run-emissary-agent.sh ## Run emissary-agent using the environment variables fetched by the intercept.
bin/run-emissary-agent.sh

## Helper target for setting up local dev environment when working with python components
LanceEa marked this conversation as resolved.
Show resolved Hide resolved
## such as pytests, diagd, etc...
.PHONY: python-dev-setup
python-dev-setup:
# recreate venv and upgrade pip
rm -rf venv
python3 -m venv venv
venv/bin/python3 -m pip install --upgrade pip

# install deps, dev deps and diagd
./venv/bin/pip install -r python/requirements.txt
./venv/bin/pip install -r python/requirements-dev.txt
./venv/bin/pip install -e python

# activate venv
@echo "run 'source ./venv/bin/activate' to activate venv in local shell"
18 changes: 12 additions & 6 deletions python/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,19 @@ durationpy==0.5
# via -r requirements.in
expiringdict==1.2.1
# via -r requirements.in
flask==2.0.2
flask==2.2.1
# via -r requirements.in
google-auth==2.6.0
# via kubernetes
gunicorn==20.1.0
# via -r requirements.in
idna==3.3
# via requests
importlib-metadata==4.12.0
# via flask
itsdangerous==2.0.1
# via flask
jinja2==3.0.3
jinja2==3.1.2
# via flask
jsonpatch==1.32
# via -r requirements.in
Expand All @@ -44,8 +46,10 @@ jsonschema==4.4.0
# via -r requirements.in
kubernetes==21.7.0
# via -r requirements.in
markupsafe==2.0.1
# via jinja2
markupsafe==2.1.1
# via
# jinja2
# werkzeug
oauthlib==3.2.0
# via requests-oauthlib
orjson==3.6.6
Expand Down Expand Up @@ -92,11 +96,13 @@ urllib3==1.26.8
# requests
websocket-client==1.2.3
# via kubernetes
werkzeug==2.0.2
werkzeug==2.2.1
# via flask
zipp==3.8.1
# via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
setuptools==60.7.1
setuptools==63.4.2
# via
# -r requirements.in
# gunicorn
Expand Down
3 changes: 2 additions & 1 deletion tools/src/py-mkopensource/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ func parseLicenses(name, version, license string) map[License]struct{} {
{"gitdb", "4.0.5", "BSD License"}: {BSD3},
{"idna", "2.7", "BSD-like"}: {BSD3, PSF, Unicode2015},
{"idna", "2.8", "BSD-like"}: {BSD3, PSF, Unicode2015},
{"importlib-metadata", "4.12.0", "None"}: {Apache2},
{"importlib-resources", "5.4.0", "UNKNOWN"}: {Apache2},
{"itsdangerous", "1.1.0", "BSD"}: {BSD3},
{"jsonpatch", "1.32", "Modified BSD License"}: {BSD3},
Expand All @@ -68,7 +69,7 @@ func parseLicenses(name, version, license string) map[License]struct{} {
{"webencodings", "0.5.1", "BSD"}: {BSD3},
{"websocket-client", "0.57.0", "BSD"}: {BSD3},
{"websocket-client", "1.2.3", "Apache-2.0"}: {Apache2},
{"zipp", "3.6.0", "UNKNOWN"}: {MIT},
{"zipp", "3.8.1", "None"}: {MIT},

// These are packages with non-trivial strings to parse, and
// it's easier to just hard-code it.
Expand Down