Skip to content

Move Config to Writeable Dir#15

Merged
Alrobbertz merged 3 commits into
swxsoc:mainfrom
Alrobbertz:ccsdspy-config
Jun 30, 2026
Merged

Move Config to Writeable Dir#15
Alrobbertz merged 3 commits into
swxsoc:mainfrom
Alrobbertz:ccsdspy-config

Conversation

@Alrobbertz

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings June 30, 2026 15:06

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

This PR introduces a pattern for shipping “baked” per-package configuration inside the Lambda container image, then mirroring it into a writable /tmp/config/ directory at cold start, so packages with import-time config/logging initialization can run under Lambda’s read-only filesystem constraints.

Changes:

  • Adds documentation for the repo → image → /tmp config mirroring approach and how to wire packages via ENV.
  • Adds a baked ccsdspy configuration file under src/config/ccsdspy/.
  • Seeds /tmp/config from /lambda_function/config in entry_script.sh and sets ccsdspy_CONFIGDIR in the Dockerfile.

Reviewed changes

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

File Description
lambda_function/src/config/README.md Documents the baked-config mirroring mechanism and Dockerfile/entry script wiring for packages.
lambda_function/src/config/ccsdspy/config.yml Adds a baked ccsdspy config intended to control import-time behavior under Lambda’s writable-path constraints.
lambda_function/entry_script.sh Copies baked config into /tmp/config before starting the runtime.
lambda_function/Dockerfile Exposes ccsdspy_CONFIGDIR pointing at /tmp/config/ccsdspy so the package reads from the writable mirror.
Comments suppressed due to low confidence (1)

lambda_function/entry_script.sh:19

  • $@ is unquoted in the exec calls, which can break argument passing if any argument contains whitespace or shell glob characters. Quoting it ("$@") is the safe, standard pattern in POSIX sh.
if [ -z "${AWS_LAMBDA_RUNTIME_API}" ]; then
    exec /usr/local/bin/aws-lambda-rie python3 -m awslambdaric $@
else
    exec python3 -m awslambdaric $@
fi

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lambda_function/src/config/README.md
Comment thread lambda_function/src/config/README.md
Comment thread lambda_function/entry_script.sh
Comment thread lambda_function/Dockerfile
@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@0712f62). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #15   +/-   ##
=======================================
  Coverage        ?   51.79%           
=======================================
  Files           ?        2           
  Lines           ?      195           
  Branches        ?        0           
=======================================
  Hits            ?      101           
  Misses          ?       94           
  Partials        ?        0           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Alrobbertz Alrobbertz merged commit 719f2ea into swxsoc:main Jun 30, 2026
5 checks passed
@Alrobbertz Alrobbertz deleted the ccsdspy-config branch June 30, 2026 15:14
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