-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Feat: Active deployment details - status, creation date #9534
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
WalkthroughThis update introduces a new attribute, Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Controller
participant DeploymentService
participant Database
Client->>+Controller: Request deployment update
Controller->>+DeploymentService: Retrieve deployment attributes
DeploymentService-->>-Controller: Return deploymentCreatedAt
Controller->>+Database: Update document with new attribute
Database-->>-Controller: Confirm update
Controller-->>-Client: Send response with updated deployment info
Possibly related PRs
Suggested reviewers
Poem
Tip ⚡🧪 Multi-step agentic review comment chat (experimental)
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (10)
🚧 Files skipped from review as they are similar to previous changes (9)
🧰 Additional context used🧬 Code Definitions (1)tests/e2e/Services/Functions/FunctionsCustomServerTest.php (1)
⏰ Context from checks skipped due to timeout of 90000ms (2)
🔇 Additional comments (1)
✨ Finishing Touches
🪧 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
|
Security Scan Results for PRDocker Image Scan Results
Source Code Scan Results🎉 No vulnerabilities found! |
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
🧹 Nitpick comments (1)
src/Appwrite/Utopia/Response/Model/Site.php (1)
67-72
: Fix duplicate value in deploymentStatus descriptionThe description for
deploymentStatus
has a duplicate "waiting" value in the list of possible values.- 'description' => 'Active deployment status. Possible values are "waiting", "processing", "building", "waiting", "ready", and "failed".', + 'description' => 'Active deployment status. Possible values are "waiting", "processing", "building", "ready", and "failed".',
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (10)
app/config/collections/projects.php
(2 hunks)src/Appwrite/Platform/Modules/Functions/Http/Deployments/Delete.php
(1 hunks)src/Appwrite/Platform/Modules/Functions/Http/Functions/Deployment/Update.php
(1 hunks)src/Appwrite/Platform/Modules/Functions/Workers/Builds.php
(2 hunks)src/Appwrite/Platform/Modules/Sites/Http/Deployments/Delete.php
(1 hunks)src/Appwrite/Platform/Modules/Sites/Http/Sites/Deployment/Update.php
(1 hunks)src/Appwrite/Utopia/Response/Model/Func.php
(1 hunks)src/Appwrite/Utopia/Response/Model/Site.php
(1 hunks)tests/e2e/Services/Functions/FunctionsCustomServerTest.php
(1 hunks)tests/e2e/Services/Sites/SitesCustomServerTest.php
(1 hunks)
🧰 Additional context used
🧬 Code Definitions (2)
tests/e2e/Services/Sites/SitesCustomServerTest.php (1)
tests/e2e/Services/Sites/SitesBase.php (1) (1)
getSite
(161:169)
tests/e2e/Services/Functions/FunctionsCustomServerTest.php (1)
tests/e2e/Services/Functions/FunctionsBase.php (1) (1)
getFunction
(150:158)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Setup & Build Appwrite Image
🔇 Additional comments (14)
src/Appwrite/Platform/Modules/Sites/Http/Deployments/Delete.php (1)
105-106
: Added new deployment tracking fields in site reset.These new fields
deploymentStatus
anddeploymentCreatedAt
are properly reset to empty strings when a deployment is deleted, consistent with how other deployment attributes are handled.src/Appwrite/Platform/Modules/Sites/Http/Sites/Deployment/Update.php (1)
95-96
: Added deployment status and creation date tracking to site documents.The new fields properly capture the deployment's status and creation timestamp when updating a site's active deployment. This enhances the site document with important metadata about the active deployment.
src/Appwrite/Platform/Modules/Functions/Http/Functions/Deployment/Update.php (1)
96-97
: Added deployment status and creation date tracking to function documents.The implementation mirrors the changes in the Sites module, ensuring consistency across the codebase. The status and creation date fields enhance the function document with valuable metadata about the active deployment.
tests/e2e/Services/Functions/FunctionsCustomServerTest.php (1)
496-503
: Added test assertions for new deployment fields.Great test coverage for the new deployment attributes! The assertions properly verify both the presence of the new fields (
deploymentStatus
anddeploymentCreatedAt
) and ensure their values match the expected data from the deployment response.src/Appwrite/Platform/Modules/Functions/Http/Deployments/Delete.php (1)
103-104
: Adds deployment status tracking to function reset operationsThe addition of
deploymentStatus
anddeploymentCreatedAt
attributes completes the deployment information reset when a function's active deployment is removed, ensuring consistency with other deployment metadata.tests/e2e/Services/Sites/SitesCustomServerTest.php (1)
370-377
: Enhances test coverage for new deployment attributesGood additions to validate that the site correctly reflects the deployment's status and creation time. These assertions ensure the new attributes are properly propagated from deployments to sites.
src/Appwrite/Platform/Modules/Functions/Workers/Builds.php (2)
871-872
: Propagates deployment status and creation date to function objectThese additions properly update the function with the active deployment's status and creation timestamp when activating a deployment, providing valuable metadata for API consumers.
905-906
: Propagates deployment status and creation date to site objectSimilar to the function implementation, these lines ensure site objects maintain the same information about their active deployments. The consistent implementation across both functions and sites is a good pattern.
src/Appwrite/Utopia/Response/Model/Func.php (1)
74-85
: Adds model definitions for new deployment attributesWell-documented rule definitions for the new attributes. The description for
deploymentStatus
clearly lists all possible values, which is helpful for API consumers. The types, defaults, and examples are appropriate for these fields.src/Appwrite/Utopia/Response/Model/Site.php (1)
61-66
: Looks good: deploymentCreatedAt field addedThe new
deploymentCreatedAt
field is properly implemented with the correct type, description, and default values, following the established pattern in the codebase.app/config/collections/projects.php (4)
582-592
: Looks good: deploymentStatus attribute for functions collectionThe
deploymentStatus
attribute has been properly added to the functions collection schema with appropriate type, size, and default value.
593-603
: Looks good: deploymentCreatedAt attribute for functions collectionThe
deploymentCreatedAt
attribute has been properly added to the functions collection schema with the datetime type and filter.
1028-1038
: Looks good: deploymentStatus attribute for sites collectionThe
deploymentStatus
attribute has been properly added to the sites collection schema with consistent structure matching the functions collection definition.
1039-1049
: Looks good: deploymentCreatedAt attribute for sites collectionThe
deploymentCreatedAt
attribute has been properly added to the sites collection schema with the datetime type and filter, consistent with the functions collection.
✨ Benchmark results
⚡ Benchmark Comparison
|
'$id' => ID::custom('deploymentCreatedAt'), | ||
'type' => Database::VAR_DATETIME, | ||
'format' => '', | ||
'size' => 0, |
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.
Why is the size 0?
What does this PR do?
Adds site attributes about active deploymed nessessray for new iteration of sites screens
Test Plan
Tests updated
Related PRs and Issues
x
Checklist
Summary by CodeRabbit
deploymentCreatedAt
). This update provides clearer insights into deployment activities across the platform, offering users more detailed information on the state and timing of their deployments.