Skip to content

Move S3 config from region to onyxia-web - #1082

Merged
garronej merged 33 commits into
mainfrom
s3_explorer_standalone
Aug 17, 2026
Merged

Move S3 config from region to onyxia-web#1082
garronej merged 33 commits into
mainfrom
s3_explorer_standalone

Conversation

@garronej

@garronej garronej commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Added configurable S3 storage settings, including endpoints, regions, access modes, authentication, roles, and bookmarks.
    • S3 profiles can include personalized, project, and dissemination-data shortcuts.
    • S3 configuration is validated with clear error messages.
    • Added standalone S3 mode without requiring the Onyxia API.
  • Improvements

    • S3 Explorer and profile creation now use configured availability and defaults.
    • Deployments without an Onyxia API show only applicable features and navigation options.
    • User configuration remains available when some account details cannot be accessed.
  • Documentation

    • Documented API-enabled and standalone deployment options.

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The PR moves S3 configuration from deployment-region data to environment configuration. Bootstrap parses and exposes S3 settings through root context. S3 profile management, authentication, navigation, home-page routing, account tabs, and Helm deployment use the new configuration and optional Onyxia API URL.

Changes

S3 configuration centralization

Layer / File(s) Summary
S3 configuration contract and environment parsing
web/src/core/ports/OnyxiaApi/S3Config.ts, web/src/env.ts, web/.env, web/scripts/unyamlify-env-local.ts, web/src/vite-env.d.ts, web/src/core/adapters/onyxiaApi/ApiTypes.ts, web/src/core/ports/OnyxiaApi/DeploymentRegion.ts, web/package.json
S3 configuration now has validated and normalized models. Environment declarations and the local template include S3 settings. Deployment-region S3 declarations are removed.
Bootstrap and Onyxia API wiring
web/src/core/bootstrap.ts, web/src/core/rootContext.ts, web/src/core/adapters/onyxiaApi/mock.ts, web/src/ui/App/App.tsx, web/src/core/usecases/launcher/thunks.ts, web/src/core/usecases/userConfigs.ts
Bootstrap receives S3 configuration and an optional Onyxia API URL. It stores the root context and can create a mock Onyxia API. Launcher token access uses root OIDC context. Protected user fields use fallback Git identity values.
S3 profile management migration
web/src/core/usecases/s3ProfilesManagement/*, web/src/core/usecases/s3ProfilesCreationUiController/thunks.ts, web/src/core/usecases/s3ExplorerUiController/thunks.ts
Profile aggregation, bookmark resolution, STS role resolution, and creation defaults use bootstrap S3 entries instead of deployment-region profiles.
S3 availability in the UI
web/src/ui/App/LeftBar.tsx, web/src/ui/pages/home/Page.tsx, web/src/ui/pages/account/Page.tsx, web/src/ui/pages/account/route.ts
Navigation visibility, home-page redirects and cards, and account tabs depend on the optional Onyxia API URL and S3 Explorer availability.
Standalone Helm deployment
helm-chart/values.yaml, helm-chart/templates/api/*, helm-chart/templates/ingress.yaml, helm-chart/templates/httproute.yaml, helm-chart/templates/web/deployment.yaml, helm-chart/README.md
Helm conditionally renders API resources and API routes. Web deployment environment values inherit S3 and API defaults when API support is enabled.

Estimated code review effort: 4 (Complex) | ~45 minutes

Suggested reviewers: ddecrulle

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: moving S3 configuration from deployment-region data into onyxia-web.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch s3_explorer_standalone

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 3

🧹 Nitpick comments (1)
web/src/core/ports/OnyxiaApi/S3Config.ts (1)

48-69: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Use .strict() on zClaimFilter and zOidcConfigurationShape to catch typos.

zClaimFilter's two object branches and zOidcConfigurationShape are all-optional or loosely matched, and z.object() strips unknown keys by default instead of rejecting them. A typo such as a wrong field name is accepted silently and the mistyped value disappears without any validation error. web/scripts/unyamlify-env-local.ts demonstrates this exact failure mode with issuerURI/clientID instead of issuerUri/clientId.

Add .strict() to these object schemas so unexpected or misspelled keys throw during environment parsing instead of being dropped silently.

♻️ Proposed fix
     const zClaimFilter = z.union([
-        z.object({
-            claimName: z.undefined().optional()
-        }),
-        z.object({
+        z.object({
+            claimName: z.undefined().optional()
+        }).strict(),
+        z.object({
             claimName: z.string(),
             includedClaimPattern: z.string().optional(),
             excludedClaimPattern: z.string().optional()
-        })
+        }).strict()
     ]);
     const zOidcConfigurationShape = z.object({
         issuerUri: z.string().optional(),
         clientId: z.string().optional(),
         extraQueryParams_raw: z.string().optional(),
         scope_spaceSeparated: z.string().optional(),
         idleSessionLifetimeInSeconds: z.number().optional()
-    });
+    }).strict();
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/src/core/ports/OnyxiaApi/S3Config.ts` around lines 48 - 69, Apply
.strict() to both object branches within zClaimFilter and to
zOidcConfigurationShape so unknown or misspelled keys are rejected during
validation rather than stripped. Leave the surrounding zOidcConfiguration custom
validation and defined fields unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@web/scripts/unyamlify-env-local.ts`:
- Around line 48-53: Update the OIDC template fields in unyamlify-env-local.ts
to use the S3Config schema names issuerUri and clientId instead of issuerURI and
clientID, preserving the existing issuer and client values.

In `@web/src/core/ports/OnyxiaApi/S3Config.ts`:
- Around line 87-100: Resolve the S3 monitoring configuration mismatch by either
adding the monitoring field consistently to S3Config_UserProvided and
S3Config_Parsed.Entry and propagating it through s3Config_userProvidedToParsed,
or removing S3.monitoring.URLPattern from unyamlify-env-local.ts if unsupported.
Ensure the chosen behavior prevents the field from being silently stripped.

In `@web/src/core/usecases/s3ProfilesManagement/decoupledLogic/s3Profiles.ts`:
- Around line 188-193: Ensure the S3 profile aggregation flow skips entries
whose resolved STS configuration contains no roles before parsing or asserting
on it. Update the logic around resolvedTemplatedStsRoles and
aggregateS3ProfilesFromVaultAndRegionIntoAnUnifiedSet to require at least one
valid stsRoles entry, removing or excluding unresolved entries while preserving
valid profile aggregation.

---

Nitpick comments:
In `@web/src/core/ports/OnyxiaApi/S3Config.ts`:
- Around line 48-69: Apply .strict() to both object branches within zClaimFilter
and to zOidcConfigurationShape so unknown or misspelled keys are rejected during
validation rather than stripped. Leave the surrounding zOidcConfiguration custom
validation and defined fields unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 74665204-c19a-40dc-96e1-ebe72af5b75f

📥 Commits

Reviewing files that changed from the base of the PR and between 8a5be35 and 7f8a211.

📒 Files selected for processing (21)
  • web/.env
  • web/scripts/unyamlify-env-local.ts
  • web/src/core/adapters/onyxiaApi/ApiTypes.ts
  • web/src/core/adapters/onyxiaApi/onyxiaApi.ts
  • web/src/core/bootstrap.ts
  • web/src/core/ports/OnyxiaApi/DeploymentRegion.ts
  • web/src/core/ports/OnyxiaApi/S3Config.ts
  • web/src/core/rootContext.ts
  • web/src/core/usecases/s3ExplorerUiController/thunks.ts
  • web/src/core/usecases/s3ProfilesCreationUiController/thunks.ts
  • web/src/core/usecases/s3ProfilesManagement/decoupledLogic/resolveTemplatedBookmark.ts
  • web/src/core/usecases/s3ProfilesManagement/decoupledLogic/resolveTemplatedStsRole.ts
  • web/src/core/usecases/s3ProfilesManagement/decoupledLogic/s3Profiles.ts
  • web/src/core/usecases/s3ProfilesManagement/selectors.ts
  • web/src/core/usecases/s3ProfilesManagement/state.ts
  • web/src/core/usecases/s3ProfilesManagement/thunks.ts
  • web/src/env.ts
  • web/src/ui/App/App.tsx
  • web/src/ui/App/LeftBar.tsx
  • web/src/ui/pages/home/Page.tsx
  • web/src/vite-env.d.ts
💤 Files with no reviewable changes (3)
  • web/src/core/adapters/onyxiaApi/ApiTypes.ts
  • web/src/core/adapters/onyxiaApi/onyxiaApi.ts
  • web/src/core/ports/OnyxiaApi/DeploymentRegion.ts

Comment thread web/scripts/unyamlify-env-local.ts
Comment thread web/src/core/ports/OnyxiaApi/S3Config.ts
Comment on lines +188 to +193
if (fromAdminConfig.resolvedTemplatedStsRoles === undefined) {
return [];
}

const entry = fromRegion.resolvedTemplatedStsRoles.find(
e => e.correspondingS3ConfigIndexInRegion === index
const entry = fromAdminConfig.resolvedTemplatedStsRoles.find(
e => e.correspondingS3ConfigEntryIndex === index

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.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

ast-grep outline web/src/core/ports/OnyxiaApi/S3Config.ts --items all

rg -n -C 5 'roles\s*:|\.min\(|nonempty\(' \
  web/src/core/ports/OnyxiaApi/S3Config.ts

rg -n -C 4 'roles:\s*\[\s*\]|sts:.*roles' web \
  -g '*.{ts,tsx,json,yaml,yml}'

Repository: InseeFrLab/onyxia

Length of output: 1687


🏁 Script executed:

#!/bin/bash
set -euo pipefail

sed -n '1,260p' web/src/core/ports/OnyxiaApi/S3Config.ts

printf '\n--- s3Profiles aggregate section ---\n'
sed -n '150,220p' web/src/core/usecases/s3ProfilesManagement/decoupledLogic/s3Profiles.ts

printf '\n--- schema occurrences ---\n'
rg -n -C 4 'S3Config_UserProvided|s3Config_userProvidedToParsed|zS3Config_Entry|roles|entry\.roles|sts: ' web/src/core/ports/OnyxiaApi/S3Config.ts web/src/core/usecases/s3ProfilesManagement/decoupledLogic/s3Profiles.ts

Repository: InseeFrLab/onyxia

Length of output: 17003


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- s3Profiles relevant whole function ---'
rg -n -A 220 -B 40 'resolvedTemplatedStsRoles\.map|resolvedTemplatedStsRoles_forThisProfile' web/src/core/usecases/s3ProfilesManagement/decoupledLogic/s3Profiles.ts

printf '\n%s\n' '--- imports and surrounding definitions of useS3ProfilesProfileManager ---'
rg -n -C 80 'useS3ProfilesProfileManager|profileName =|resolvedTemplatedStsRoles_forThisProfile|profileName.*fromAdminConfig|correspondingS3ConfigEntryIndex' web/src/core/usecases/s3ProfilesManagement/decoupledLogic/s3Profiles.ts

printf '\n%s\n' '--- occurrences of resolvedTemplatedStsRoles in repo ---'
rg -n -C 8 'resolvedTemplatedStsRoles|correspondingS3ConfigEntryIndex' web/src/core/usecases/s3ProfilesManagement -g '*.ts'

Repository: InseeFrLab/onyxia

Length of output: 36565


🏁 Script executed:

#!/bin/bash
set -euo pipefail

node - <<'JS'
async function main() {
  for await (const module of [
    "core/usecases/s3ProfilesManagement/decoupledLogic/resolveTemplatedStsRole",
    "core/tools/resolveTemplate",
    "core/usecases/s3ProfilesManagement/decoupledLogic/resolveTemplates",
  ]) {
    try {
      const path = `web/src/core/${module}.ts`;
      const { createRequire } = await import("module");
      const fs = await import("fs");
      if (!fs.existsSync(path)) {
        console.log(`${module}: missing ${path}`);
        continue;
      }
      console.log(`\n--- ${module} outline ---`);
      const outline = await import("ast-grep");
      // Skip external dependency inspection when ast-grep Node API is unavailable.
    } catch (error) {
      console.log(`${module}: unavailable`);
    }
    const { readFileSync } = await import("fs");
    console.log(readFileSync(`web/src/core/${module}.ts`, "utf8"));
  }
}
main();
JS

Repository: InseeFrLab/onyxia

Length of output: 566


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- resolveTemplatedStsRole.ts ---'
sed -n '1,260p' web/src/core/usecases/s3ProfilesManagement/decoupledLogic/resolveTemplatedStsRole.ts

printf '%s\n' '--- resolveTemplate.ts candidates ---'
fd -a 'resolveTemplate.*\.ts$' web/src/core | sed 's#^\./##' | head -50

printf '%s\n' '--- resolveTemplates.ts candidates ---'
fd -a 'resolveTemplates.*\.ts$' web/src/core | sed 's#^\./##' | head -50

printf '%s\n' '--- imports of resolveTemplatedStsRole ---'
rg -n -C 3 'resolveTemplatedStsRole|resolveTemplate|resolveTemplates' web/src/core -g '*.ts'

Repository: InseeFrLab/onyxia

Length of output: 10139


🏁 Script executed:

#!/bin/bash
set -euo pipefail

fd -a 'OnyxiaApi.*\.ts$' web/src/core/ports | sed 's#^\./##' | xargs -r rg -n -C 6 'S3Config_UserProvided|zS3Config_UserProvided|s3Config_userProvidedToParsed|role:'

printf '%s\n' '--- OnyxiaApi exports ---'
fd -a 'OnyxiaApi.*\.ts$' web/src/core/ports | sed 's#^\./##' | xargs -r rg -n -C 5 'export .*S3|S3Config|s3Config'

Repository: InseeFrLab/onyxia

Length of output: 159


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- OnyxiaApi files ---'
git ls-files web/src/core/ports/OnyxiaApi

printf '%s\n' '--- S3 config validation occurrences ---'
rg -n -C 5 'S3Config_UserProvided|zS3Config_UserProvided|s3Config_userProvidedToParsed|role:|min\(|nonempty|atLeast' web/src/core/ports web/src/core/usecases/web -g '*.ts' || true

printf '%s\n' '--- schema field docs around S3 config ---'
rg -n -C 4 'S3Config_UserProvided|zS3Config_UserProvided|role\s*:|sts\.role' web -g '*.ts' -g '*.tsx' || true

Repository: InseeFrLab/onyxia

Length of output: 18220


Handle STS entries that resolve no roles.

resolveTemplatedStsRole can return [] when a claim value is absent, empty, rejected by filters, or no substitutions match. That empty result makes fromAdminConfig.entries[index].resolvedTemplatedStsRoles.stsRoles empty, and aggregateS3ProfilesFromVaultAndRegionIntoAnUnifiedSet asserts before creating a profile. Require at least one valid STS role before parsing, or remove entries that resolve no roles.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/src/core/usecases/s3ProfilesManagement/decoupledLogic/s3Profiles.ts`
around lines 188 - 193, Ensure the S3 profile aggregation flow skips entries
whose resolved STS configuration contains no roles before parsing or asserting
on it. Update the logic around resolvedTemplatedStsRoles and
aggregateS3ProfilesFromVaultAndRegionIntoAnUnifiedSet to require at least one
valid stsRoles entry, removing or excluding unresolved entries while preserving
valid profile aggregation.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@web/src/core/ports/OnyxiaApi/S3Config.ts`:
- Line 65: Update the idleSessionLifetimeInSeconds schema and its conversion
logic near the existing parsing code to accept numbers or non-empty strings
containing only decimal integer digits. Reject values such as "3600s" and
"not-a-number" before conversion, while preserving valid numeric values and
integer strings.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 1db3358a-e9c6-477c-952c-2a16144fdea6

📥 Commits

Reviewing files that changed from the base of the PR and between 7f8a211 and 624e3b1.

📒 Files selected for processing (2)
  • web/scripts/unyamlify-env-local.ts
  • web/src/core/ports/OnyxiaApi/S3Config.ts
💤 Files with no reviewable changes (1)
  • web/scripts/unyamlify-env-local.ts

clientID: z.string().optional(),
extraQueryParams: z.string().optional(),
scope: z.string().optional(),
idleSessionLifetimeInSeconds: z.union([z.number(), z.string()]).optional()

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.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Reject malformed idle-session duration strings.

z.string() accepts "3600s" and "not-a-number". Line 225 truncates the first value and produces NaN for the second value. Restrict non-empty strings to decimal integers before conversion.

Proposed fix
-        idleSessionLifetimeInSeconds: z.union([z.number(), z.string()]).optional()
+        idleSessionLifetimeInSeconds: z
+            .union([z.number(), z.literal(""), z.string().regex(/^\d+$/)])
+            .optional()
@@
-                            return parseInt(value);
+                            return Number(value);

Also applies to: 213-225

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/src/core/ports/OnyxiaApi/S3Config.ts` at line 65, Update the
idleSessionLifetimeInSeconds schema and its conversion logic near the existing
parsing code to accept numbers or non-empty strings containing only decimal
integer digits. Reject values such as "3600s" and "not-a-number" before
conversion, while preserving valid numeric values and integer strings.

Source: Linters/SAST tools

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
web/src/core/ports/OnyxiaApi/S3Config.ts (1)

50-58: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Validate claim-filter regular-expression patterns during S3 config parsing.

includedClaimPattern and excludedClaimPattern are accepted as plain strings now. resolveTemplatedStsRole and resolveTemplatedBookmark compile them with new RegExp(...) later. A malformed pattern lets the S3 env parse successfully and fails only during profile resolution. Reject invalid patterns in zClaimFilter.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/src/core/ports/OnyxiaApi/S3Config.ts` around lines 50 - 58, Update
zClaimFilter to validate includedClaimPattern and excludedClaimPattern as
regular-expression patterns during S3 configuration parsing, while preserving
their optional string behavior for valid values. Ensure malformed patterns are
rejected before resolveTemplatedStsRole or resolveTemplatedBookmark compiles
them.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@web/src/core/adapters/onyxiaApi/mock.ts`:
- Around line 18-31: Update the standalone API mock’s user and project fixtures
in userAndProjects to provide minimal safe placeholder values for the user
fields consumed by bootstrapCore and launch (familyName, firstName, username,
and email) and the project fields consumed after login (name and namespace),
while keeping unrelated guarded fields protected.

In `@web/src/ui/pages/account/Page.tsx`:
- Around line 52-58: Update the account page route handling so when
ONYXIA_API_URL is undefined, unavailable route.params.tabId values are
normalized to "user-interface" or rejected before activeTabId and the content
switch use them; keep available tabs unchanged. Add a regression test covering a
direct unavailable-tab URL in standalone mode.

In `@web/src/ui/pages/home/Page.tsx`:
- Around line 25-28: Update the homepage fallback logic around the
DISABLE_HOMEPAGE and ONYXIA_API_URL checks so it matches LeftBar’s feature
availability: when ONYXIA_API_URL is undefined, avoid redirecting to
routes.catalog() and only redirect to routes.s3Explorer_root() when S3 Explorer
is actually disabled, preserving S5 Explorer as the available no-API fallback.
- Around line 25-29: Move the environment checks currently inside the useConst
initializer in Home into the Home component body so they return from Home after
scheduling the route replacement. Preserve the existing redirects for missing
configuration, remove the no-op return after routes.s3Explorer_root().replace(),
and ensure remaining hooks and JSX are not executed when either check matches.

---

Outside diff comments:
In `@web/src/core/ports/OnyxiaApi/S3Config.ts`:
- Around line 50-58: Update zClaimFilter to validate includedClaimPattern and
excludedClaimPattern as regular-expression patterns during S3 configuration
parsing, while preserving their optional string behavior for valid values.
Ensure malformed patterns are rejected before resolveTemplatedStsRole or
resolveTemplatedBookmark compiles them.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c55a8a45-b5f1-4cb4-9b7e-d015d1736c6c

📥 Commits

Reviewing files that changed from the base of the PR and between 624e3b1 and a7972c6.

📒 Files selected for processing (19)
  • web/.env
  • web/src/core/adapters/onyxiaApi/mock.ts
  • web/src/core/bootstrap.ts
  • web/src/core/ports/OnyxiaApi/S3Config.ts
  • web/src/core/usecases/launcher/thunks.ts
  • web/src/core/usecases/s3ExplorerUiController/thunks.ts
  • web/src/core/usecases/s3ProfilesCreationUiController/thunks.ts
  • web/src/core/usecases/s3ProfilesManagement/decoupledLogic/resolveTemplatedBookmark.ts
  • web/src/core/usecases/s3ProfilesManagement/decoupledLogic/resolveTemplatedStsRole.ts
  • web/src/core/usecases/s3ProfilesManagement/decoupledLogic/s3Profiles.ts
  • web/src/core/usecases/s3ProfilesManagement/selectors.ts
  • web/src/core/usecases/s3ProfilesManagement/thunks.ts
  • web/src/core/usecases/userAuthentication/thunks.ts
  • web/src/env.ts
  • web/src/ui/App/App.tsx
  • web/src/ui/App/LeftBar.tsx
  • web/src/ui/pages/account/Page.tsx
  • web/src/ui/pages/home/Page.tsx
  • web/src/vite-env.d.ts
💤 Files with no reviewable changes (1)
  • web/src/core/usecases/userAuthentication/thunks.ts
🚧 Files skipped from review as they are similar to previous changes (8)
  • web/src/vite-env.d.ts
  • web/src/core/usecases/s3ProfilesCreationUiController/thunks.ts
  • web/src/core/usecases/s3ProfilesManagement/decoupledLogic/resolveTemplatedBookmark.ts
  • web/src/core/usecases/s3ProfilesManagement/decoupledLogic/s3Profiles.ts
  • web/src/core/usecases/s3ProfilesManagement/thunks.ts
  • web/src/ui/App/App.tsx
  • web/src/core/usecases/s3ExplorerUiController/thunks.ts
  • web/src/core/usecases/s3ProfilesManagement/selectors.ts

Comment thread web/src/core/adapters/onyxiaApi/mock.ts
Comment thread web/src/ui/pages/account/Page.tsx
Comment thread web/src/ui/pages/home/Page.tsx Outdated
Comment thread web/src/ui/pages/home/Page.tsx Outdated
@garronej
garronej force-pushed the s3_explorer_standalone branch from 0754d05 to f6ab37c Compare August 7, 2026 17:45

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@helm-chart/templates/web/deployment.yaml`:
- Around line 3-8: Make the first-region S3 selection explicit in the
regions-to-web environment logic: document or otherwise define
api.regions[0].data.S3 as the authoritative global S3 configuration, and add
explicit conflict handling if other regions also provide differing S3 values.
Preserve the existing web.env.S3 assignment for the authoritative configuration.
- Around line 49-56: Keep the API context path consistent across consumers by
deriving the default ONYXIA_API_URL in helm-chart/templates/web/deployment.yaml
(lines 49-56), the HTTPRoute match in helm-chart/templates/httproute.yaml (lines
55-63), and the Ingress path in helm-chart/templates/ingress.yaml (lines 50-58)
from .Values.api.contextPath instead of hardcoding /api.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 91f034ad-d3b9-40cb-a42f-50f926929a9c

📥 Commits

Reviewing files that changed from the base of the PR and between e5ffa12 and 0754d05.

📒 Files selected for processing (20)
  • helm-chart/README.md
  • helm-chart/templates/api/cluster-role-binding.yaml
  • helm-chart/templates/api/configmap.yaml
  • helm-chart/templates/api/configmaps-schemas.yaml
  • helm-chart/templates/api/configmaps-userprofile.yaml
  • helm-chart/templates/api/deployment.yaml
  • helm-chart/templates/api/rolebinding-namespace-admin.yaml
  • helm-chart/templates/api/route.yaml
  • helm-chart/templates/api/service.yaml
  • helm-chart/templates/api/serviceaccount-api.yaml
  • helm-chart/templates/httproute.yaml
  • helm-chart/templates/ingress.yaml
  • helm-chart/templates/tests/test-connection-api.yaml
  • helm-chart/templates/web/deployment.yaml
  • helm-chart/values.yaml
  • web/.env
  • web/src/core/adapters/onyxiaApi/mock.ts
  • web/src/core/ports/OnyxiaApi/S3Config.ts
  • web/src/ui/pages/account/Page.tsx
  • web/src/ui/pages/account/route.ts
💤 Files with no reviewable changes (1)
  • web/.env
🚧 Files skipped from review as they are similar to previous changes (3)
  • web/src/core/adapters/onyxiaApi/mock.ts
  • web/src/ui/pages/account/Page.tsx
  • web/src/core/ports/OnyxiaApi/S3Config.ts

Comment thread helm-chart/templates/web/deployment.yaml
Comment on lines +49 to 56
{{- if and .Values.api.enabled (not (hasKey $webEnv "ONYXIA_API_URL")) }}
- name: ONYXIA_API_URL
value: "/api"
{{- end }}
{{- range $key, $value := $webEnv }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}

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.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Keep the API context path consistent across all consumers.

api.contextPath is applied to the API, but the web default and both public routes hardcode /api. A non-default context path makes the frontend and proxies address an API path that is not served. Derive all three values from .Values.api.contextPath, or reject non-/api values. (raw.githubusercontent.com)

  • helm-chart/templates/web/deployment.yaml#L49-L56: use .Values.api.contextPath for the default ONYXIA_API_URL.
  • helm-chart/templates/httproute.yaml#L55-L63: use .Values.api.contextPath for the HTTPRoute match.
  • helm-chart/templates/ingress.yaml#L50-L58: use .Values.api.contextPath for the Ingress path.
Proposed alignment
-              value: "/api"
+              value: {{ .Values.api.contextPath | quote }}

-            value: /api
+            value: {{ .Values.api.contextPath | quote }}

-          - path: /api
+          - path: {{ .Values.api.contextPath | quote }}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{{- if and .Values.api.enabled (not (hasKey $webEnv "ONYXIA_API_URL")) }}
- name: ONYXIA_API_URL
value: "/api"
{{- end }}
{{- range $key, $value := $webEnv }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
{{- if and .Values.api.enabled (not (hasKey $webEnv "ONYXIA_API_URL")) }}
- name: ONYXIA_API_URL
value: {{ .Values.api.contextPath | quote }}
{{- end }}
{{- range $key, $value := $webEnv }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
Suggested change
{{- if and .Values.api.enabled (not (hasKey $webEnv "ONYXIA_API_URL")) }}
- name: ONYXIA_API_URL
value: "/api"
{{- end }}
{{- range $key, $value := $webEnv }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
{{- if $apiEnabled }}
- matches:
- path:
type: PathPrefix
value: {{ .Values.api.contextPath | quote }}
backendRefs:
- name: {{ $fullNameApi }}
port: {{ $svcPortApi }}
{{- end }}
Suggested change
{{- if and .Values.api.enabled (not (hasKey $webEnv "ONYXIA_API_URL")) }}
- name: ONYXIA_API_URL
value: "/api"
{{- end }}
{{- range $key, $value := $webEnv }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
{{- if $apiEnabled }}
- path: {{ .Values.api.contextPath | quote }}
pathType: Prefix
backend:
service:
name: {{ $fullNameApi }}
port:
number: {{ $svcPortApi }}
{{- end }}
📍 Affects 3 files
  • helm-chart/templates/web/deployment.yaml#L49-L56 (this comment)
  • helm-chart/templates/httproute.yaml#L55-L63
  • helm-chart/templates/ingress.yaml#L50-L58
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@helm-chart/templates/web/deployment.yaml` around lines 49 - 56, Keep the API
context path consistent across consumers by deriving the default ONYXIA_API_URL
in helm-chart/templates/web/deployment.yaml (lines 49-56), the HTTPRoute match
in helm-chart/templates/httproute.yaml (lines 55-63), and the Ingress path in
helm-chart/templates/ingress.yaml (lines 50-58) from .Values.api.contextPath
instead of hardcoding /api.

@garronej
garronej force-pushed the s3_explorer_standalone branch from b7e8c52 to 2286080 Compare August 10, 2026 15:34
@garronej
garronej force-pushed the s3_explorer_standalone branch from 3f8529d to 0ad23b3 Compare August 10, 2026 16:08
@garronej
garronej merged commit 1282163 into main Aug 17, 2026
2 checks passed
@garronej
garronej deleted the s3_explorer_standalone branch August 17, 2026 17:37
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