Skip to content

🎨🐛Maintenance: fix CI build image issue #4434

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

Merged
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
25 changes: 24 additions & 1 deletion .ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,27 @@ ignore = [
"S101", # use of `assert` detected hanbled by pylance, does not support noseq
"TID252", # [*] Relative imports from parent modules are banned
]
extend-exclude = ["**/tests", "**/generated_models", "**/director/"]

target-version = "py310"


[per-file-ignores]
"**/tests/**" = [
"T201", # print found
"ARG001", # unused function argument
"PT019", # user pytest.mark.usefixture
"PLR2004", # use of magic values
"PLR0913", # too many arguments
"N806", # Uppercase variables in functions
"PT001", # use pytest.fixture over pytest.fixture() whatsoever
"ERA001", # found commented out code
]

[flake8-pytest-style]
fixture-parentheses = false
parametrize-names-type = "csv"



[pylint]
max-args = 10
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,11 @@ ruff: ## python ruffing
@ruff --version
# Running ruff in packages and services (except director)
@ruff check \
--config=$(CURDIR)/.ruff.toml \
--respect-gitignore \
--extend-exclude="**/tests" \
--extend-exclude="**/generated_models" \
--extend-exclude="**/director/" \
$(CURDIR)/services \
$(CURDIR)/packages

Expand Down
7 changes: 7 additions & 0 deletions scripts/common.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,13 @@ pyupgrade: ## upgrades python syntax for newer versions of the language (SEE htt
pylint: $(REPO_BASE_DIR)/.pylintrc ## runs pylint (python linter) on src and tests folders
@pylint --rcfile="$(REPO_BASE_DIR)/.pylintrc" -v $(CURDIR)/src $(CURDIR)/tests

.PHONY: ruff
ruff: $(REPO_BASE_DIR)/.ruff.toml ## runs ruff (python fast linter) on src and tests folders
@ruff check \
--config=$(REPO_BASE_DIR)/.ruff.toml \
--respect-gitignore \
$(CURDIR)/src \
$(CURDIR)/tests

.PHONY: mypy
mypy: $(REPO_BASE_DIR)/scripts/mypy.bash $(REPO_BASE_DIR)/mypy.ini ## runs mypy python static type-checker on this services's code. Use AFTER make install-*
Expand Down
2 changes: 1 addition & 1 deletion services/agent/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ WORKDIR /build/services/agent
RUN \
--mount=type=bind,source=packages,target=/build/packages,rw \
--mount=type=bind,source=services/agent,target=/build/services/agent,rw \
--mount=type=cache,mode=0755,target=/root/.cache/pip \
--mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private \
pip install \
--requirement requirements/prod.txt \
&& pip list -v
Expand Down
2 changes: 1 addition & 1 deletion services/api-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ WORKDIR /build/services/api-server
RUN \
--mount=type=bind,source=packages,target=/build/packages,rw \
--mount=type=bind,source=services/api-server,target=/build/services/api-server,rw \
--mount=type=cache,mode=0755,target=/root/.cache/pip \
--mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private \
pip install \
--requirement requirements/prod.txt \
&& pip list -v
Expand Down
2 changes: 1 addition & 1 deletion services/autoscaling/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ WORKDIR /build/services/autoscaling
RUN \
--mount=type=bind,source=packages,target=/build/packages,rw \
--mount=type=bind,source=services/autoscaling,target=/build/services/autoscaling,rw \
--mount=type=cache,mode=0755,target=/root/.cache/pip \
--mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private \
pip install \
--requirement requirements/prod.txt \
&& pip list -v
Expand Down
2 changes: 1 addition & 1 deletion services/catalog/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ WORKDIR /build/services/catalog
RUN \
--mount=type=bind,source=packages,target=/build/packages,rw \
--mount=type=bind,source=services/catalog,target=/build/services/catalog,rw \
--mount=type=cache,mode=0755,target=/root/.cache/pip \
--mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private \
pip install \
--requirement requirements/prod.txt \
&& pip list -v
Expand Down
2 changes: 1 addition & 1 deletion services/dask-sidecar/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ WORKDIR /build/services/dask-sidecar
RUN \
--mount=type=bind,source=packages,target=/build/packages,rw \
--mount=type=bind,source=services/dask-sidecar,target=/build/services/dask-sidecar,rw \
--mount=type=cache,mode=0755,target=/root/.cache/pip \
--mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private \
pip install \
--requirement requirements/prod.txt \
&& pip list -v
Expand Down
2 changes: 1 addition & 1 deletion services/datcore-adapter/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ WORKDIR /build/services/datcore-adapter
RUN \
--mount=type=bind,source=packages,target=/build/packages,rw \
--mount=type=bind,source=services/datcore-adapter,target=/build/services/datcore-adapter,rw \
--mount=type=cache,mode=0755,target=/root/.cache/pip \
--mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private \
pip install \
--requirement requirements/prod.txt \
&& pip list -v
Expand Down
2 changes: 1 addition & 1 deletion services/director-v2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ WORKDIR /build/services/director-v2
RUN \
--mount=type=bind,source=packages,target=/build/packages,rw \
--mount=type=bind,source=services/director-v2,target=/build/services/director-v2,rw \
--mount=type=cache,mode=0755,target=/root/.cache/pip \
--mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private \
pip install \
--requirement requirements/prod.txt \
&& pip list -v
Expand Down
2 changes: 1 addition & 1 deletion services/dynamic-sidecar/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ WORKDIR /build/services/dynamic-sidecar
RUN \
--mount=type=bind,source=packages,target=/build/packages,rw \
--mount=type=bind,source=services/dynamic-sidecar,target=/build/services/dynamic-sidecar,rw \
--mount=type=cache,mode=0755,target=/root/.cache/pip \
--mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private \
pip install \
--requirement requirements/prod.txt \
&& pip list -v
Expand Down
2 changes: 1 addition & 1 deletion services/invitations/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ WORKDIR /build/services/invitations
RUN \
--mount=type=bind,source=packages,target=/build/packages,rw \
--mount=type=bind,source=services/invitations,target=/build/services/invitations,rw \
--mount=type=cache,mode=0755,target=/root/.cache/pip \
--mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private \
pip install \
--requirement requirements/prod.txt \
&& pip list -v
Expand Down
2 changes: 1 addition & 1 deletion services/migration/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ WORKDIR /build/packages/postgres-database
# install only base 3rd party dependencies
RUN \
--mount=type=bind,source=packages/postgres-database,target=/build/packages/postgres-database,rw \
--mount=type=cache,mode=0755,target=/root/.cache/pip \
--mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private \
pip install \
--requirement requirements/prod.txt \
&& pip list -v
Expand Down
2 changes: 1 addition & 1 deletion services/resource-usage-tracker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ WORKDIR /build/services/resource-usage-tracker
RUN \
--mount=type=bind,source=packages,target=/build/packages,rw \
--mount=type=bind,source=services/resource-usage-tracker,target=/build/services/resource-usage-tracker,rw \
--mount=type=cache,mode=0755,target=/root/.cache/pip \
--mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private \
pip install \
--requirement requirements/prod.txt \
&& pip list -v
Expand Down
2 changes: 1 addition & 1 deletion services/storage/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ WORKDIR /build/services/storage
RUN \
--mount=type=bind,source=packages,target=/build/packages,rw \
--mount=type=bind,source=services/storage,target=/build/services/storage,rw \
--mount=type=cache,mode=0755,target=/root/.cache/pip \
--mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private \
pip install \
--requirement requirements/prod.txt \
&& pip list -v
Expand Down
2 changes: 1 addition & 1 deletion services/web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ WORKDIR /build/services/web/server
RUN \
--mount=type=bind,source=packages,target=/build/packages,rw \
--mount=type=bind,source=services/web/server,target=/build/services/web/server,rw \
--mount=type=cache,mode=0755,target=/root/.cache/pip \
--mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private \
pip install \
--requirement requirements/prod.txt \
&& pip list -v
Expand Down