Skip to content

Commit

Permalink
fix: Add version to docker file and remove environment from workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
PedroSiqueira1 committed Sep 4, 2024
1 parent cabccdd commit 99977af
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 16 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/scripts/register_flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,23 +242,19 @@ def prepare_flows(flows: "List[FlowLike]") -> None:
for flow in flows:
if isinstance(flow, dict):
# Add any extra labels to the flow
if flow.get("environment"):
new_labels = set(flow["environment"].get("labels") or []).union(labels)
flow["environment"]["labels"] = sorted(new_labels)
else:
new_labels = set(flow["run_config"].get("labels") or []).union(labels)
flow["run_config"]["labels"] = sorted(new_labels)
new_labels = set(flow["run_config"].get("labels") or []).union(labels)
flow["run_config"]["labels"] = sorted(new_labels)
else:
# Set the default flow result if not specified
if not flow.result:
flow.result = flow.storage.result

# Add a `run_config` if not configured explicitly
if flow.run_config is None and flow.environment is None:
if flow.run_config is None:
flow.run_config = UniversalRun()
# Add any extra labels to the flow (either specified via the CLI,
# or from the storage object).
obj = flow.run_config or flow.environment
obj = flow.run_config
obj.labels.update(labels)
obj.labels.update(flow.storage.labels)

Expand Down
13 changes: 9 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,20 @@ FROM python:${PYTHON_VERSION} as base

# Install git and other dependencies
# hadolint ignore=DL3008
# Install git and other dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
git \
ffmpeg \
libsm6 \
libxext6 && \
ffmpeg=7:4.1.11-0+deb10u1 \
git=1:2.20.1-2+deb10u9 \
libsm6=2:1.2.3-1 \
libxext6=2:1.3.3-1+b2 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Setting environment variables for libgdal
ENV CPLUS_INCLUDE_PATH /usr/include/gdal
ENV C_INCLUDE_PATH=/usr/include/gdal

# Setting environment with prefect version
ARG PREFECT_VERSION=1.4.1
ENV PREFECT_VERSION $PREFECT_VERSION
Expand Down
5 changes: 1 addition & 4 deletions pipelines/bot_semaforo/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,4 @@
image=constants.DOCKER_IMAGE.value,
labels=[constants.RJ_COR_AGENT_LABEL.value],
)
cet_telegram_flow.schedule = bot_schedule


x = 2
cet_telegram_flow.schedule = bot_schedule

0 comments on commit 99977af

Please sign in to comment.