Skip to content

Add flow staging folder - #2920

Open
csafreen wants to merge 4 commits into
developfrom
csafreen/add_staging_folder
Open

Add flow staging folder#2920
csafreen wants to merge 4 commits into
developfrom
csafreen/add_staging_folder

Conversation

@csafreen

Copy link
Copy Markdown
Collaborator

Merge Checklist

Please cross check this list if additions / modifications needs to be done on top of your core changes and tick them off. Reviewer can as well glance through and help the developer if something is missed out.

  • Automated Tests (Jasmine integration tests, Unit tests, and/or Performance tests)
  • Updated Manual tests / Demo Config
  • Documentation (Application guide, Admin guide, Markdown, Readme and/or Wiki)
  • Verified that local development environment is working with latest changes (integrated with latest develop branch)
  • following best practices in code review doc

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a writable “flow staging” directory under /usr/src/data intended to be used as a shared bulk-load exchange location for Prefect flows, ensuring it exists with permissive permissions both in the image build and at Kubernetes runtime.

Changes:

  • Create /usr/src/data/flow_staging during the Trex image build and set it to mode 1777 (world-writable + sticky bit).
  • Ensure the same directory (and permissions) is created on the mounted PV via the Helm chart init container.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
services/trex/Dockerfile.v2 Creates /usr/src/data/flow_staging in the image and sets sticky world-writable permissions.
charts/d2e-services/templates/d2e-deployment.yaml Creates/chmods /usr/src/data/flow_staging at pod init time on the mounted volume.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Suppressed comments (2)

charts/d2e-services/templates/d2e-deployment.yaml:78

  • chmod 1777 makes /usr/src/data/flow_staging world-writable on the trex-volume PVC. That can be risky if multiple workloads/users can access this volume. Prefer least-privilege permissions via a dedicated GID + setgid directory (chmod 2770/2775) with appropriate pod fsGroup/runAsGroup, or document why 1777 is necessary.
              "mkdir -p /usr/src/data/plugins && mkdir -p /usr/src/data/cache && \
              mkdir -p /usr/src/data/flow_staging && chmod 1777 /usr/src/data/flow_staging && \
              cp -rfv /data/plugins/.npmrc /usr/src/data/plugins/.npmrc && \

services/trex/Dockerfile.v2:45

  • chmod 1777 makes /usr/src/data/flow_staging world-writable. If this directory is on a shared PVC, any process with access could write/overwrite files there. Consider using a dedicated group (e.g., chgrp + chmod 2770/2775 with setgid) and setting fsGroup/runAsGroup in the pod, or document why 1777 is required.
# flow_staging: shared bulk-load exchange dir for Prefect flows with write access.
RUN mkdir -p /usr/src/data/cache /usr/src/data/plugins /usr/src/data/flow_staging /usr/src/cdw_data/built_in ./cert \
    && chmod 1777 /usr/src/data/flow_staging

Signed-off-by: Afreen <csafreen@gmail.com>
Signed-off-by: Afreen <csafreen@gmail.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.

5 participants