Skip to content

A few small v4 fixes #2153

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jun 6, 2025
Merged

A few small v4 fixes #2153

merged 8 commits into from
Jun 6, 2025

Conversation

nicktrn
Copy link
Collaborator

@nicktrn nicktrn commented Jun 5, 2025

  • Remove unused env vars from webapp
  • Increase branch limit fallback
  • Do not display usage page when self-hosting
  • Increase default org concurrency so the env default is correctly applied
  • Fix CLI init flow so dev/deploy don't fail due to bad version string

Copy link

changeset-bot bot commented Jun 5, 2025

🦋 Changeset detected

Latest commit: cd7768f

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

coderabbitai bot commented Jun 5, 2025

Walkthrough

This set of changes updates environment variable management, feature flag usage, and version handling logic across several components. The .env.example and environment schema were streamlined by removing unused or cloud-specific variables and tightening validation on deployment registry settings. Feature flag checks were added to conditionally render "Usage" navigation items in the web application, restricting their visibility to managed cloud environments. The default branch limit in branch management was significantly increased. Email alert configuration now prioritizes a new environment variable for the reply-to address. The CLI's update command and version comparison logic were improved for accurate handling of version ranges.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5301239 and cd7768f.

📒 Files selected for processing (9)
  • .changeset/light-peas-melt.md (1 hunks)
  • .env.example (1 hunks)
  • apps/webapp/app/components/navigation/OrganizationSettingsSideMenu.tsx (1 hunks)
  • apps/webapp/app/components/navigation/SideMenu.tsx (3 hunks)
  • apps/webapp/app/env.server.ts (2 hunks)
  • apps/webapp/app/services/email.server.ts (1 hunks)
  • apps/webapp/app/services/upsertBranch.server.ts (1 hunks)
  • docker/services-compose.yml (0 hunks)
  • packages/cli-v3/src/commands/update.ts (1 hunks)
💤 Files with no reviewable changes (1)
  • docker/services-compose.yml
🧰 Additional context used
🧬 Code Graph Analysis (2)
apps/webapp/app/components/navigation/SideMenu.tsx (3)
apps/webapp/app/hooks/useFeatures.ts (1)
  • useFeatures (5-9)
apps/webapp/app/components/primitives/Buttons.tsx (1)
  • LinkButton (335-401)
apps/webapp/app/utils/pathBuilder.ts (1)
  • v3UsagePath (436-438)
apps/webapp/app/services/email.server.ts (1)
apps/webapp/app/env.server.ts (1)
  • env (751-751)
⏰ Context from checks skipped due to timeout of 90000ms (25)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (10, 10)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (9, 10)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (8, 10)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (7, 10)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (6, 10)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (5, 10)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (4, 10)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (3, 10)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (8, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (2, 10)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (1, 10)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (7, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (6, 8)
  • GitHub Check: units / packages / 🧪 Unit Tests: Packages (1, 1)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (5, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (4, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (3, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (2, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (1, 8)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - pnpm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - npm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - pnpm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - npm)
  • GitHub Check: typecheck / typecheck
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (12)
packages/cli-v3/src/commands/update.ts (1)

116-122: Excellent fix for version range handling!

The updated logic properly handles semver ranges by extracting the minimum version before comparison. This prevents issues when dep.version contains range specifiers like ^1.2.3 or ~1.2.3, which would cause semver.gt() to fail or behave unexpectedly. The null check ensures robustness when dealing with malformed version strings.

.changeset/light-peas-melt.md (1)

1-6: Well-documented changeset.

The changeset accurately describes the fix with an appropriate patch-level designation and clear description that matches the code changes.

apps/webapp/app/components/navigation/OrganizationSettingsSideMenu.tsx (1)

69-77: Consistent feature flag implementation.

The conditional rendering of the "Usage" menu item using the isManagedCloud feature flag follows the same pattern as the existing "Billing" menu item, ensuring consistent behavior across navigation components.

apps/webapp/app/components/navigation/SideMenu.tsx (3)

90-90: Import required for feature flag check.

The import of useFeatures hook is necessary for the conditional rendering of the Usage link button below.


346-346: Feature flag retrieval for conditional rendering.

The feature flag is properly retrieved and used for conditional rendering of usage-related UI elements.


415-426: Consistent conditional rendering pattern.

The conditional rendering of the "Usage" link button follows the same feature flag pattern as implemented in OrganizationSettingsSideMenu.tsx, ensuring uniform behavior across navigation components.

apps/webapp/app/services/upsertBranch.server.ts (1)

168-168: Verify the dramatic increase in branch limit.

The default branch limit has been increased to 100,000,000, which is an extremely high value. While this aligns with the PR objective of increasing the branch limit fallback, please verify that this magnitude is intentional and won't cause any unexpected behavior or resource constraints.

apps/webapp/app/services/email.server.ts (1)

30-31: Improved email configuration with backwards compatibility.

The addition of ALERT_REPLY_TO_EMAIL as the primary source for alert email reply-to addresses, with a proper fallback chain to REPLY_TO_EMAIL and hardcoded default, provides better configuration flexibility while maintaining backwards compatibility.

.env.example (1)

24-26: Good addition of the DEPLOY_REGISTRY_HOST configuration.

The comment clearly explains the behavior difference when using localhost, which helps developers understand that images will only be loaded locally and not pushed to a remote registry. The default value localhost:5000 is appropriate for local development.

apps/webapp/app/env.server.ts (3)

195-195: Verify the impact of tripling the default organization concurrency limit.

The increase from 100 to 300 concurrent executions is significant and could impact system resources, Redis connections, and overall stability. Please ensure this change has been thoroughly tested under load.

Has this new default been load tested to ensure it doesn't cause resource exhaustion in typical deployment scenarios?


223-223: Good validation improvement for DEPLOY_REGISTRY_HOST.

Adding the .min(1) validation ensures the registry host is not empty, preventing deployment configuration errors.


226-226: Consistent validation improvement for DEPLOY_REGISTRY_NAMESPACE.

The .min(1) validation ensures the namespace is not empty while maintaining the sensible default value "trigger". This is consistent with the registry host validation.

✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@nicktrn nicktrn merged commit 47b19a4 into main Jun 6, 2025
33 checks passed
@nicktrn nicktrn deleted the fix/misc-v4 branch June 6, 2025 09:15
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