Skip to content

fix: cherry-pick Prisma offline binaries feature for egress traffic fix - #62

Merged
mateo-di merged 8 commits into
carto/mainfrom
feature/sc-526258/egress-traffic-re-fix-in-new-version
Jan 7, 2026
Merged

fix: cherry-pick Prisma offline binaries feature for egress traffic fix#62
mateo-di merged 8 commits into
carto/mainfrom
feature/sc-526258/egress-traffic-re-fix-in-new-version

Conversation

@mateo-di

Copy link
Copy Markdown
Collaborator

Description

Shortcut

  • Autolink: [sc-526258]

Cherry-picks the Prisma offline binaries feature from upstream to fix egress traffic issues in security-restricted environments.

Changes

  • Prisma binaries at build time: Downloads Prisma CLI and engine binaries during Docker build instead of runtime
  • Offline mode support: Adds PRISMA_OFFLINE_MODE environment variable to prevent runtime downloads
  • Improved error handling: Better classification of permission vs idempotent migration errors
  • Hardened compose: Adds docker-compose.hardened.yml for security-restricted deployments

Key Files Modified

  • docker/Dockerfile.non_root - Build-time Prisma binary caching with PROXY_EXTRAS_SOURCE=local
  • litellm-proxy-extras/litellm_proxy_extras/utils.py - Private helper functions and improved P3018 error handling
  • docker-compose.hardened.yml - New hardened compose configuration
  • docker/README.md - Documentation for hardened/offline Docker validation

Type of change

  • Fix

Acceptance

  1. Build Docker image: docker build -f docker/Dockerfile.non_root -t litellm-test .
  2. Verify no egress traffic during container startup in air-gapped environment
  3. Confirm Prisma migrations work with PRISMA_OFFLINE_MODE=true

Basic checklist

  • Good PR name
  • Shortcut link
  • Just one issue per PR
  • GitHub labels
  • Proper status & reviewers
  • Tests
  • Documentation

…e for Security Restricted environments (BerriAI#17695)

* Use config file to enable prometheus metrics

* Revert "Use config file to enable prometheus metrics"

This reverts commit 15ae36e.

* Improve hardened stack and Prisma offline flow

* Document hardened compose usage

* Remove undesired change in fastapi-sso

* Restore dashboard lockfile

* Remove unecessary tempdirs

* Document hardened/offline Docker validation flow
@mateo-di

Copy link
Copy Markdown
Collaborator Author

/gemini review

@mateo-di
mateo-di changed the base branch from main to carto/main December 17, 2025 14:34
@mateo-di
mateo-di marked this pull request as ready for review December 17, 2025 14:36
@mateo-di mateo-di self-assigned this Jan 7, 2026
CARTO fork encodes chunk IDs for Redis session consistency.
Updated test to match this behavior instead of upstream's raw IDs.
- test_mock_create_audio_file: requires LITELLM_LICENSE for Enterprise features
- test_anthropic_web_search_in_model_info: model_prices_and_context_window.json out of sync

These should be addressed in separate PRs.
…nges

The encrypt_value_helper and decrypt_value_helper functions now accept
additional keyword arguments (key, new_encryption_key, return_original_value).
Updated the mock functions to accept these parameters to prevent test failures.
The test_url_with_format_param tests were broken by changes introduced
in a previous merge conflict resolution. Reverting to the working
origin/main version.
@mateo-di
mateo-di merged commit 94b8b58 into carto/main Jan 7, 2026
5 of 6 checks passed
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.

3 participants