fix: build error#2144
Conversation
Allow per-environment overrides of the Campsite session cookie used by the web UI and mono OAuth store, defaulting to _campsite_api_session.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7ba2d1db25
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| NEXT_PUBLIC_WEB_URL=https://rt-web.placeholder.local | ||
| NEXT_PUBLIC_SYNC_URL=wss://rt-sync.placeholder.local | ||
| NEXT_PUBLIC_CRATES_PRO_URL=https://rt-crates-pro.placeholder.local | ||
| NEXT_PUBLIC_CAMPSITE_API_SESSION_COOKIE=__rt_campsite_api_session_cookie__ |
There was a problem hiding this comment.
Set the runtime cookie-name env for the UI
In the unified image path, this value is baked into the Next build as the placeholder shown here and docker-entrypoint.sh only rewrites it when NEXT_PUBLIC_CAMPSITE_API_SESSION_COOKIE is present. I checked the demo compose env block and both .env.example files added in this change, and they set only MEGA_OAUTH__CAMPSITE_API_SESSION_COOKIE, not the NEXT_PUBLIC_ value, so the shipped demo/default UI keeps looking for __rt_campsite_api_session_cookie__ in apiCookieHeaders instead of forwarding the real _campsite_api_session cookie on SSR/middleware requests. Please pass the public cookie-name env (or avoid placeholdering the default) anywhere the runtime placeholders are expected to be resolved.
Useful? React with 👍 / 👎.
| use qlean::{Distro, GuestArch, Image, ImageConfig, MachineConfig, with_machine}; | ||
| use serde_json::Value; | ||
|
|
||
| use common::config::DEFAULT_CAMPSITE_API_SESSION_COOKIE; |
There was a problem hiding this comment.
Qualify the workspace common crate import
Because this integration test declares mod common;, use common::config::... resolves to the local mono/tests/common helper module rather than the workspace common crate, and that helper has no config module. This makes the test target fail to compile before the ignored VM test can run; the same new import in login_user_extractor_tests.rs has the same issue. Use ::common::config::DEFAULT_CAMPSITE_API_SESSION_COOKIE or rename the helper module.
Useful? React with 👍 / 👎.
No description provided.