Skip to content

fix: update hardcoded year 2024 to 2025 in tests and popup #10210

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ZunedKhan07
Copy link

👟 Reproduction steps

Visit the https://cloud.appwrite.io/console/ with more than 2 projects.
A pop-up appears saying:

"Choose which projects to keep before Sep 1, 2024..."

👍 Expected Behavior

It should say:

"Choose which projects to keep before Sep 1, 2025..."

🔧 Fix Details

  • Updated hardcoded year from 2024 to 2025 in:
    • Project limit popup (views)
    • Test files (DatabasesBase.php, V18Test.php)
    • Country DB file name (registers.php)

✅ Related Issue

Fixes appwrite/console#2157


Please let me know if there’s anything else to improve. 🙂

Copy link
Contributor

coderabbitai bot commented Jul 26, 2025

📝 Walkthrough

Walkthrough

The changes update hardcoded date strings in two test files. In tests/e2e/Services/Databases/DatabasesBase.php, the date in a Query::greaterThan filter for the birthDay attribute is changed from '16/01/2024 12:00:00AM' to the ISO 8601 format '1970-01-01T00:00:00Z'. In tests/unit/Utopia/Response/Filters/V18Test.php, the scheduledAt timestamp in the "remove scheduledAt" test case is modified to dynamically generate a timestamp one year from the current date and time, formatted as an ISO 8601 string with milliseconds and a 'Z' suffix, replacing the previously fixed timestamp "2024-07-13T09:00:00.000Z". No other logic, structure, or declarations are altered.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5ef4d54 and d61af72.

📒 Files selected for processing (2)
  • tests/e2e/Services/Databases/DatabasesBase.php (1 hunks)
  • tests/unit/Utopia/Response/Filters/V18Test.php (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • tests/unit/Utopia/Response/Filters/V18Test.php
🚧 Files skipped from review as they are similar to previous changes (1)
  • tests/e2e/Services/Databases/DatabasesBase.php
⏰ 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). (1)
  • GitHub Check: scan
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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 generate unit tests to generate unit tests for 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.

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.

Copy link
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: 0

🧹 Nitpick comments (2)
tests/unit/Utopia/Response/Filters/V18Test.php (1)

57-63: Consider generating the date dynamically to prevent future “hard-coded year” regressions

This test keeps requiring manual updates each year. Instead of hard-coding 2025-07-13…, compute the timestamp relative to “now” so the intent (“some future date”) remains stable and you won’t need another PR next year.

-                    'scheduledAt' => '2025-07-13T09:00:00.000Z',
+                    // Use a value 1 year in the future to keep the test evergreen
+                    'scheduledAt' => (new \DateTime('+1 year'))->format('Y-m-d\TH:i:s.v\Z'),

This keeps the test behaviour identical while eliminating yearly maintenance noise.

tests/e2e/Services/Databases/DatabasesBase.php (1)

2641-2644: Consider switching to an unambiguous ISO-8601 literal for future‐proofness

The hard-coded string has been bumped to 2025, which solves the immediate problem.
However the dd/mm/yyyy hh:mm:ssAM format is locale-dependent and still rejected by the API (the test expects a 400).
Using an ISO-8601 example (1970-01-01T00:00:00Z) keeps the intent (“invalid for this attribute”) while avoiding maintenance churn the next time the year rolls.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d939415 and 5ef4d54.

📒 Files selected for processing (2)
  • tests/e2e/Services/Databases/DatabasesBase.php (1 hunks)
  • tests/unit/Utopia/Response/Filters/V18Test.php (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). (1)
  • GitHub Check: scan

Copy link

github-actions bot commented Jul 26, 2025

Security Scan Results for PR

Docker Image Scan Results

Package Version Vulnerability Severity
binutils 2.42-r0 CVE-2025-0840 HIGH
git 2.45.3-r0 CVE-2025-48384 HIGH
git 2.45.3-r0 CVE-2025-48385 HIGH
git-init-template 2.45.3-r0 CVE-2025-48384 HIGH
git-init-template 2.45.3-r0 CVE-2025-48385 HIGH
icu 74.2-r0 CVE-2025-5222 HIGH
icu-data-en 74.2-r0 CVE-2025-5222 HIGH
icu-dev 74.2-r0 CVE-2025-5222 HIGH
icu-libs 74.2-r0 CVE-2025-5222 HIGH
libexpat 2.6.4-r0 CVE-2024-8176 HIGH
libxml2 2.12.7-r0 CVE-2024-56171 HIGH
libxml2 2.12.7-r0 CVE-2025-24928 HIGH
libxml2 2.12.7-r0 CVE-2025-27113 HIGH
libxml2 2.12.7-r0 CVE-2025-32414 HIGH
libxml2 2.12.7-r0 CVE-2025-32415 HIGH
pyc 3.12.9-r0 CVE-2024-12718 HIGH
pyc 3.12.9-r0 CVE-2025-4138 HIGH
pyc 3.12.9-r0 CVE-2025-4330 HIGH
pyc 3.12.9-r0 CVE-2025-4517 HIGH
python3 3.12.9-r0 CVE-2024-12718 HIGH
python3 3.12.9-r0 CVE-2025-4138 HIGH
python3 3.12.9-r0 CVE-2025-4330 HIGH
python3 3.12.9-r0 CVE-2025-4517 HIGH
python3-pyc 3.12.9-r0 CVE-2024-12718 HIGH
python3-pyc 3.12.9-r0 CVE-2025-4138 HIGH
python3-pyc 3.12.9-r0 CVE-2025-4330 HIGH
python3-pyc 3.12.9-r0 CVE-2025-4517 HIGH
python3-pycache-pyc0 3.12.9-r0 CVE-2024-12718 HIGH
python3-pycache-pyc0 3.12.9-r0 CVE-2025-4138 HIGH
python3-pycache-pyc0 3.12.9-r0 CVE-2025-4330 HIGH
python3-pycache-pyc0 3.12.9-r0 CVE-2025-4517 HIGH
sqlite-libs 3.45.3-r1 CVE-2025-29087 HIGH
xz 5.6.2-r0 CVE-2025-31115 HIGH
xz-libs 5.6.2-r0 CVE-2025-31115 HIGH
golang.org/x/crypto v0.31.0 CVE-2025-22869 HIGH
golang.org/x/oauth2 v0.24.0 CVE-2025-22868 HIGH

Source Code Scan Results

🎉 No vulnerabilities found!

@ZunedKhan07
Copy link
Author

Hi 👋 Maintainers, kindly review my PR when you get time. Thank you!

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.

🐛 Bug Report: Incorrect Year in Pop-up notification at [https://cloud.appwrite.io/console/]
1 participant