Skip to content

Cache and mount license file after validation#185

Open
silv-io wants to merge 2 commits intomainfrom
flc-546-cache-and-mount-license-files
Open

Cache and mount license file after validation#185
silv-io wants to merge 2 commits intomainfrom
flc-546-cache-and-mount-license-files

Conversation

@silv-io
Copy link
Copy Markdown
Member

@silv-io silv-io commented Apr 8, 2026

Motivation

The CLI fetches a license file per emulator/version on every start. This caches it locally to avoid redundant fetches and mounts it into the container so the emulator doesn't need to re-fetch it either.

Changes

  • GetLicense now returns ([]byte, error) so the license content can be used by the caller
  • Added config.LicenseFilePath() — returns $CACHE_DIR/lstk/license.json (OS-appropriate)
  • After successful license validation, writes the license file to the cache path
  • Mounts the cached license file read-only into each container at /etc/localstack/conf.d/license.json

Tests

Existing integration tests cover the license validation flow. Manual verification of cache write and container mount.

Related

@silv-io silv-io marked this pull request as ready for review April 8, 2026 08:07
Copy link
Copy Markdown

@claude claude bot left a comment

Choose a reason for hiding this comment

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

Copy link
Copy Markdown
Contributor

@anisaoshafi anisaoshafi left a comment

Choose a reason for hiding this comment

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

Nice optimization 👏🏼

Could you please clean up the cache file in cleanupLicense?
Also, would be great to add an integration test

@silv-io silv-io force-pushed the flc-546-cache-and-mount-license-files branch from d557cd7 to 21ef046 Compare April 10, 2026 08:35
@silv-io silv-io requested a review from anisaoshafi April 10, 2026 08:36
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