-
Notifications
You must be signed in to change notification settings - Fork 3
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
fix: Remove expired envs #291
Conversation
Warning Rate limit exceeded@adityachoudhari26 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 19 minutes and 23 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (4)
WalkthroughThis pull request focuses on removing functionality related to expired environments across multiple components of the system. The changes include deleting the Changes
Possibly related PRs
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🔭 Outside diff range comments (1)
apps/webservice/src/app/[workspaceSlug]/(app)/systems/[systemSlug]/deployments/[deploymentSlug]/releases/DeploymentPageContent.tsx (1)
Line range hint
202-214
: Remove commented out UI elements.Remove the commented out Switch component and its label as they're no longer needed with the removal of expired environments feature.
- {/* <div className="flex items-center gap-2"> - <Switch - checked={showEphemeralEnvs} - id="show-ephemeral-envs" - onCheckedChange={setShowEphemeralEnvs} - /> - <Label - htmlFor="show-ephemeral-envs" - className="text-sm text-muted-foreground" - > - Show ephemeral environments - </Label> - </div> */}
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
apps/jobs/src/expired-env-checker/index.ts
(0 hunks)apps/jobs/src/index.ts
(0 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/systems/[systemSlug]/deployments/[deploymentSlug]/releases/DeploymentPageContent.tsx
(5 hunks)packages/db/src/schema/environment.ts
(0 hunks)packages/job-dispatch/src/__test__/job-variables-deployment.test.ts
(0 hunks)
💤 Files with no reviewable changes (4)
- packages/db/src/schema/environment.ts
- apps/jobs/src/expired-env-checker/index.ts
- apps/jobs/src/index.ts
- packages/job-dispatch/src/test/job-variables-deployment.test.ts
🧰 Additional context used
📓 Path-based instructions (1)
apps/webservice/src/app/[workspaceSlug]/(app)/systems/[systemSlug]/deployments/[deploymentSlug]/releases/DeploymentPageContent.tsx (1)
Pattern **/*.{ts,tsx}
: Note on Error Handling:
Avoid strict enforcement of try/catch blocks. Code may use early returns, Promise chains (.then().catch()), or other patterns for error handling. These are acceptable as long as they maintain clarity and predictability.
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: Typecheck
- GitHub Check: Lint
- GitHub Check: build (linux/amd64)
- GitHub Check: build (linux/amd64)
🔇 Additional comments (2)
apps/webservice/src/app/[workspaceSlug]/(app)/systems/[systemSlug]/deployments/[deploymentSlug]/releases/DeploymentPageContent.tsx (2)
161-161
: LGTM! Environment blocks calculation is correctly simplified.The calculation now properly uses the full environments array without filtering.
Line range hint
271-276
: LGTM! Environment mapping is correctly simplified.The code now properly iterates over all environments without filtering, which is consistent with the removal of expired environments feature.
Also applies to: 336-351
// const selectedEnvironments = showEphemeralEnvs | ||
// ? environments | ||
// : environments.filter((e) => e.expiresAt == null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Remove commented out environment filtering logic.
Remove the commented out filtering logic as it's no longer needed with the removal of expired environments feature.
- // const selectedEnvironments = showEphemeralEnvs
- // ? environments
- // : environments.filter((e) => e.expiresAt == null);
@@ -155,13 +152,13 @@ | |||
const loading = releases.isLoading; | |||
const router = useRouter(); | |||
|
|||
const [showEphemeralEnvs, setShowEphemeralEnvs] = useState(false); | |||
// const [showEphemeralEnvs, setShowEphemeralEnvs] = useState(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Remove commented out code.
Instead of keeping commented out code, remove it entirely since we're removing the expired environments feature.
- // const [showEphemeralEnvs, setShowEphemeralEnvs] = useState(false);
Summary by CodeRabbit
Removal of Features
Database Changes
expiresAt
field from environment schemaCode Cleanup