Skip to content

Feat: Add project status attribute#11291

Merged
abnegate merged 4 commits into1.8.xfrom
feat-project-status
Feb 12, 2026
Merged

Feat: Add project status attribute#11291
abnegate merged 4 commits into1.8.xfrom
feat-project-status

Conversation

@lohanidamodar
Copy link
Copy Markdown
Member

What does this PR do?

  • Adds project status attribute to platform collections and set default status in project creation

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. Screenshots may also be helpful.)

Related PRs and Issues

  • (Related PR or issue)

Checklist

  • Have you read the Contributing Guidelines on issues?
  • If the PR includes a change to an API's metadata (desc, label, params, etc.), does it also include updated API specs and example docs?

Add project status attribute to platform collections and set default status in project creation
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 11, 2026

📝 Walkthrough

Walkthrough

Adds a new status attribute to the projects collection schema (app/config/collections/platform.php), introduces a new constant PROJECT_STATUS_ACTIVE = 'active' (app/init/constants.php), and sets the default status to PROJECT_STATUS_ACTIVE when creating new projects (src/Appwrite/Platform/Modules/Projects/Http/Projects/Create.php). No other logic, control flow, or error handling changes detected.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 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 (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Feat: Add project status attribute' clearly and accurately summarizes the main changes—adding a project status attribute to the platform collections and setting default status during project creation.
Description check ✅ Passed The description accurately describes the changes made: adding a project status attribute to platform collections and setting default status in project creation, which directly relate to the changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat-project-status

No actionable comments were generated in the recent review. 🎉


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 and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 11, 2026

Security Scan Results for PR

Docker Image Scan Results

Package Version Vulnerability Severity
libcrypto3 3.5.4-r0 CVE-2025-15467 CRITICAL
libcrypto3 3.5.4-r0 CVE-2025-69419 HIGH
libcrypto3 3.5.4-r0 CVE-2025-69421 HIGH
libpng 1.6.51-r0 CVE-2025-66293 HIGH
libpng 1.6.51-r0 CVE-2026-22695 HIGH
libpng 1.6.51-r0 CVE-2026-22801 HIGH
libpng-dev 1.6.51-r0 CVE-2025-66293 HIGH
libpng-dev 1.6.51-r0 CVE-2026-22695 HIGH
libpng-dev 1.6.51-r0 CVE-2026-22801 HIGH
libssl3 3.5.4-r0 CVE-2025-15467 CRITICAL
libssl3 3.5.4-r0 CVE-2025-69419 HIGH
libssl3 3.5.4-r0 CVE-2025-69421 HIGH
libxml2 2.13.8-r0 CVE-2025-49794 CRITICAL
libxml2 2.13.8-r0 CVE-2025-49796 CRITICAL
libxml2 2.13.8-r0 CVE-2025-49795 HIGH
libxml2 2.13.8-r0 CVE-2025-6021 HIGH
openssl 3.5.4-r0 CVE-2025-15467 CRITICAL
openssl 3.5.4-r0 CVE-2025-69419 HIGH
openssl 3.5.4-r0 CVE-2025-69421 HIGH
openssl-dev 3.5.4-r0 CVE-2025-15467 CRITICAL
openssl-dev 3.5.4-r0 CVE-2025-69419 HIGH
openssl-dev 3.5.4-r0 CVE-2025-69421 HIGH
py3-urllib3 1.26.20-r0 CVE-2026-21441 HIGH
py3-urllib3-pyc 1.26.20-r0 CVE-2026-21441 HIGH
github.com/containerd/containerd/v2 v2.0.2 CVE-2024-25621 HIGH
golang.org/x/crypto v0.31.0 CVE-2025-22869 HIGH
golang.org/x/oauth2 v0.24.0 CVE-2025-22868 HIGH
stdlib 1.22.10 CVE-2025-68121 CRITICAL
stdlib 1.22.10 CVE-2025-47907 HIGH
stdlib 1.22.10 CVE-2025-58183 HIGH
stdlib 1.22.10 CVE-2025-61726 HIGH
stdlib 1.22.10 CVE-2025-61728 HIGH
stdlib 1.22.10 CVE-2025-61729 HIGH
stdlib 1.22.10 CVE-2025-61730 HIGH

Source Code Scan Results

🎉 No vulnerabilities found!

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a 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

🤖 Fix all issues with AI agents
In `@app/init/constants.php`:
- Around line 393-395: The file ends with the constant PROJECT_STATUS_ACTIVE and
is missing a trailing newline which triggers PSR12 single_blank_line_at_eof;
open app/init/constants.php, locate the declaration of PROJECT_STATUS_ACTIVE and
add a single newline character at the end of the file (ensure exactly one blank
line/EOF newline) so the file ends with a newline to satisfy the linter.

In `@src/Appwrite/Platform/Modules/Projects/Http/Projects/Create.php`:
- Around line 122-123: The 'status' property is incorrectly added inside the
$auths JSON blob (so the top-level projects.status column stays null); move the
status assignment out of $auths and add it as a top-level field when creating
the project document: remove 'status' from the $auths array and include 'status'
=> PROJECT_STATUS_ACTIVE in the array passed to
$dbForPlatform->createDocument('projects', new Document([...])) (refer to
$auths, status, createDocument and the projects collection in Create.php).
🧹 Nitpick comments (3)
app/init/constants.php (1)

394-395: Consider defining additional status constants now.

Only PROJECT_STATUS_ACTIVE is defined. If the feature is meant to support disabling/suspending projects, defining the full set of expected statuses (e.g., PROJECT_STATUS_DISABLED, PROJECT_STATUS_SUSPENDED) upfront avoids magic strings creeping in elsewhere.

app/config/collections/platform.php (2)

345-355: Minor: Use ID::custom('status') for consistency with other attributes.

Most attributes in this collection use ID::custom(...) for $id. This one uses a bare string. While functionally equivalent, it's inconsistent with the dominant pattern.

🔧 Proposed fix
-                '$id' => 'status',
+                '$id' => ID::custom('status'),

345-355: status attribute has default => null but no index — consider adding one if you plan to query/filter projects by status.

If the intent is to list or filter projects by status (e.g., active vs. disabled), an index on status (or a composite index including status) will be needed. Without it, those queries will require full collection scans.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 11, 2026

✨ Benchmark results

  • Requests per second: 2,049
  • Requests with 200 status code: 368,856
  • P99 latency: 0.076094268

⚡ Benchmark Comparison

Metric This PR Latest version
RPS 2,049 1,131
200 368,856 203,544
P99 0.076094268 0.180236015

@abnegate abnegate merged commit d931003 into 1.8.x Feb 12, 2026
63 checks passed
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