-
Notifications
You must be signed in to change notification settings - Fork 198
fix: include git details in deployments list queries #2589
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
Conversation
Console (appwrite/console)Project ID: Tip HTTPS and SSL certificates are handled automatically for all your Sites |
WalkthroughThree page route files were changed to expand the fields returned by deployment queries. The Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (2)
🧰 Additional context used📓 Path-based instructions (4)**/*.{ts,tsx,js,jsx,svelte}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.ts📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{ts,tsx,js,jsx,svelte,json}📄 CodeRabbit inference engine (AGENTS.md)
Files:
src/routes/**📄 CodeRabbit inference engine (AGENTS.md)
Files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🔇 Additional comments (2)
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. Comment |
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: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/routes/(console)/project-[region]-[project]/sites/site-[site]/+page.ts (1)
33-48: Add provider fields to the second deployment query to display Git information in the rollback modal.The second query (lines 33-48) is missing provider fields that are accessed in the UI. In
instantRollbackModal.svelte(lines 177-180), the component rendersprodDeployment?.providerCommitAuthorUrlandprodDeployment?.providerCommitAuthor, but these fields are not included in theQuery.select()for theprodReadyDeploymentsquery. This causes these values to be undefined in the rollback modal.Add
providerCommitAuthorUrlandproviderCommitAuthorto the second query's select array:Query.select([ 'buildDuration', 'totalSize', 'sourceSize', 'buildSize', 'type', 'resourceId', 'providerCommitAuthorUrl', 'providerCommitAuthor' ])
🧹 Nitpick comments (1)
src/routes/(console)/project-[region]-[project]/sites/site-[site]/deployments/+page.ts (1)
32-40: Provider fields added correctly, but consider extracting to a constant.The addition of provider-related metadata fields enables git details to be displayed in the UI, addressing the PR objective.
However, the same 8-field list is duplicated across multiple files. Consider extracting it to a shared constant:
// In a shared constants file (e.g., $lib/constants.ts) export const DEPLOYMENT_PROVIDER_FIELDS = [ 'providerRepositoryUrl', 'providerRepositoryOwner', 'providerRepositoryName', 'providerBranchUrl', 'providerBranch', 'providerCommitMessage', 'providerCommitHash', 'providerCommitUrl' ] as const;Then use it in the query:
Query.select([ 'buildSize', 'sourceSize', 'totalSize', 'buildDuration', 'status', 'type', - 'resourceId', - 'providerRepositoryUrl', - 'providerRepositoryOwner', - 'providerRepositoryName', - 'providerBranchUrl', - 'providerBranch', - 'providerCommitMessage', - 'providerCommitHash', - 'providerCommitUrl' + 'resourceId', + ...DEPLOYMENT_PROVIDER_FIELDS ]),
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
src/routes/(console)/project-[region]-[project]/functions/function-[function]/+page.ts(1 hunks)src/routes/(console)/project-[region]-[project]/sites/site-[site]/+page.ts(1 hunks)src/routes/(console)/project-[region]-[project]/sites/site-[site]/deployments/+page.ts(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: build
- GitHub Check: e2e
🔇 Additional comments (2)
src/routes/(console)/project-[region]-[project]/sites/site-[site]/+page.ts (1)
18-30: Provider fields added correctly to the first deployment query.The expansion of selected fields enables git details to be displayed for recent deployments.
src/routes/(console)/project-[region]-[project]/functions/function-[function]/+page.ts (1)
44-52: Provider fields added correctly for function deployments.The addition of provider-related metadata fields enables git details to be displayed for function deployments, consistent with the changes made for site deployments.
As with the other files, consider extracting this field list to a shared constant (see comment on deployments/+page.ts) to reduce duplication and ensure consistency.

What does this PR do?
Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)
Related PRs and Issues
(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)
Have you read the Contributing Guidelines on issues?
(Write your answer here.)
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.