Skip to content
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

Feat api testing with devzery #6765

Conversation

nitishvarmaus
Copy link

@nitishvarmaus nitishvarmaus commented Mar 17, 2025

This pull request introduces a new middleware to integrate Devzery into the project. The most important changes include adding the DevzeryDjangoMiddleware to the middleware settings and including the devzery package in the project dependencies.

Integration with Devzery:

Description

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Improvement (change that would cause existing functionality to not work as expected)
  • Code refactoring
  • Performance improvements
  • Documentation update

Screenshots and Media (if applicable)

Test Scenarios

Ran Plane and tested out the APIs if they are working fine with Devzery

References

Summary by CodeRabbit

  • New Features
    • Introduced two new configurable options for enhanced service integration.
    • Integrated an additional middleware to improve request handling and logging.
    • Added a new dependency to support these upgrades.

sriramveeraghanta and others added 4 commits February 24, 2025 20:40
* fix: issue activity for project id validation (makeplane#6668)

* fix: work item attachment count mutation (makeplane#6670)

* updated the action to modify the release build assets (makeplane#6669)

* feat: russian translation (makeplane#6666)

* chore: ru translation updated (makeplane#6672)

* fix: state drop down refactor

* fix: intake work item creation refactor

* fix: cleanup for deprecated functions

* fix: date range picker on cycles and modules list (makeplane#6676)

* fix: Handled workspace switcher closing on click

* fix: replaced date range picker with date picker at some places

* chore: add common translation keys (makeplane#6688)

* chore: add missing translation keys

* chore: add russian translation keys

* fix: issue activity task (makeplane#6689)

* changed github workflow action ubuntu version to `ubuntu-22.04` (makeplane#6683)

* chore: update russian translation (makeplane#6682)

* chore: update russian translation

* chore: rename issues to work items in russian translation

* [PE-275] chore: editor line spacing variables (makeplane#6678)

* chore: variable editor line spacing

* chore: variable list spacing

---------

Co-authored-by: Aaryan Khandelwal <aaryankhandu123@gmail.com>

* [WEB-3475] fix: cycle dates dropdown (makeplane#6690)

* fix: Handled workspace switcher closing on click

* fix: Cycle date picker

* fix: Made onSelect optional in range range component

* fix: module date picker (makeplane#6691)

* fix: Handled workspace switcher closing on click

* fix: reverted module date picker changes

* chore: extended sidebar improvement (makeplane#6693)

* feat: italian translations (makeplane#6692)

* Create translations.json - ITALIAN translation (makeplane#6667)

* chore: italian translation updated

* feat: italian translation added

* fix: module end date translation

---------

Co-authored-by: Nicolas Bossi <nicolasbossi@gmail.com>
Co-authored-by: gakshita <akshitagoyal1516@gmail.com>

* fix: attachment item created by (makeplane#6695)

* fix: module flicker issue on property updation (makeplane#6699)

* [WEB-3477] fix: mutation issue on moving work items for a manually ended cycle (makeplane#6696)

* fix: package version update

* fix: esbuild version fix

* fix: package license repliation

* [WEB-3488] improvement: assignee validation for work item creation (makeplane#6701)

* fix: work item assignee update validation (makeplane#6704)

---------

Co-authored-by: Nikhil <118773738+pablohashescobar@users.noreply.github.com>
Co-authored-by: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com>
Co-authored-by: Manish Gupta <59428681+mguptahub@users.noreply.github.com>
Co-authored-by: Nikita Mitasov <32384814+ch4og@users.noreply.github.com>
Co-authored-by: Akshita Goyal <36129505+gakshita@users.noreply.github.com>
Co-authored-by: Aaryan Khandelwal <65252264+aaryan610@users.noreply.github.com>
Co-authored-by: Akshat Jain <akshatjain9782@gmail.com>
Co-authored-by: Lakhan Baheti <94619783+1akhanBaheti@users.noreply.github.com>
Co-authored-by: Aaryan Khandelwal <aaryankhandu123@gmail.com>
Co-authored-by: Nicolas Bossi <nicolasbossi@gmail.com>
Co-authored-by: gakshita <akshitagoyal1516@gmail.com>
Co-authored-by: Prateek Shourya <prateekshourya29@gmail.com>
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ sriramveeraghanta
❌ nitishvarmaus
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Contributor

coderabbitai bot commented Mar 17, 2025

Walkthrough

The pull request introduces two new configuration variables, DEVZERY_API_KEY and DEVZERY_SERVER_NAME, in the settings file, both initialized as empty strings. Additionally, the middleware stack now includes the devzery.django.middleware.DevzeryDjangoMiddleware. A new dependency, devzery==0.1.0, has also been added to the requirements file. These changes adjust configuration and dependency management without altering the overall structure.

Changes

File(s) Change Summary
apiserver/plane/.../common.py Added DEVZERY_API_KEY and DEVZERY_SERVER_NAME configuration variables; inserted "devzery.django.middleware.DevzeryDjangoMiddleware" into middleware.
apiserver/requirements/base.txt Added new dependency: devzery==0.1.0.

Sequence Diagram(s)

sequenceDiagram
    participant C as Client
    participant MW as DevzeryMiddleware
    participant V as View

    C->>MW: Send Request
    MW->>V: Process Request
    V->>MW: Return Response
    MW->>C: Send Response
Loading

Poem

I'm a rabbit in the code field, hopping with delight,
New keys and middleware make my day so bright,
Dependencies line up like carrots in a row,
With every change, our app begins to grow,
Hopping through the code till everything's just right!

Tip

⚡🧪 Multi-step agentic review comment chat (experimental)
  • We're introducing multi-step agentic chat in review comments. This experimental feature enhances review discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments.
    - To enable this feature, set early_access to true under in the settings.
✨ Finishing Touches
  • 📝 Generate Docstrings

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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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 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.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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: 1

🧹 Nitpick comments (1)
apiserver/plane/settings/common.py (1)

66-71: Include documentation for the Devzery integration.

The PR adds new middleware and configuration but doesn't include documentation explaining what Devzery does, why it's being added, or how it should be configured.

Consider adding comments explaining:

  • The purpose of the Devzery integration
  • Documentation link for the package
  • Configuration requirements
  • Impact on the application's behavior

For example:

+# Devzery Integration
+# This middleware enables API observability and monitoring using Devzery
+# See: https://devzery.com/docs for more information
 DEVZERY_API_KEY = os.environ.get("DEVZERY_API_KEY", "")
 DEVZERY_SERVER_NAME = os.environ.get("DEVZERY_SERVER_NAME", "")
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d4991b9 and c16d6d8.

📒 Files selected for processing (2)
  • apiserver/plane/settings/common.py (1 hunks)
  • apiserver/requirements/base.txt (1 hunks)
🔇 Additional comments (2)
apiserver/requirements/base.txt (1)

70-70:

❓ Verification inconclusive

Verify the Devzery package version.

The PR introduces devzery==0.1.0 as a new dependency. Note that version 0.1.0 typically indicates an early development stage of a package, which might lack stability or comprehensive documentation.


🌐 Web query:

What is the latest version of the devzery Python package and its stability status?

💡 Result:

Based on the provided search results, there's no direct mention of a Python package named "devzery" in PyPI or standard packaging resources. However, Devzery appears to be a software testing platform that offers SDKs for multiple languages including Python[13][17].

Key findings about Devzery's Python integration:

  1. SDK Availability:

    • Devzery provides a Python SDK as part of its middleware solution for API testing automation[13][17]
    • Installation instructions show usage of standard Python packaging tools:
      pip install mpire  # Example from their testing tools[11]
  2. Release Status:
    While specific version numbers aren't listed in the search results, Devzery's documentation shows active maintenance as of:

    • September 2024 references in testing guides[11]
    • December 2024 articles about API testing[18]
  3. Stability Indicators:
    The platform demonstrates production-ready characteristics through:

    • CI/CD integration capabilities[17]
    • Security-focused testing features[18]
    • Active development shown by multiple 2024-dated references[11][13][18]

For the most current version information, you would need to check either:

  1. PyPI directly (pip show devzery)
  2. Devzery's official Python SDK documentation[13]
  3. Their GitHub repositories[15]

The search results suggest Devzery maintains modern Python compatibility, with examples using Python 3.12 syntax and type hints[11][13].

Citations:


Action Required: Verify the Correct Devzery Dependency Version

Based on our web search, there is no official PyPI package named “devzery”, and the available documentation points to Devzery offering a Python SDK as part of a testing platform rather than a directly published package. The current use of devzery==0.1.0 appears to be a placeholder, and it’s not clear if this version correctly reflects a stable, production-ready release.

  • Please confirm whether this dependency is meant to reference an internal package or if it should be installed from a non-PyPI source (e.g., directly via a VCS URL or an alternative repository).
  • Verify the intended package name and version through the official Devzery documentation or repository.
  • Ensure that the version specified aligns with the stable version provided by Devzery if available.
apiserver/plane/settings/common.py (1)

66-66:

❓ Verification inconclusive

Confirm middleware placement and impact.

Adding the Devzery middleware to the end of the MIDDLEWARE list will affect the request/response processing order. In Django, middleware ordering matters - the request passes through middleware from top to bottom, and the response passes through from bottom to top.


🏁 Script executed:

#!/bin/bash
# Check documentation for this middleware to understand its requirements
pip install devzery==0.1.0 || true
python -c "import devzery; help(devzery.django.middleware)" 2>/dev/null || echo "No middleware documentation available"

# Check if other projects implement this middleware and how they configure it
rg -A 2 -B 2 "DevzeryDjangoMiddleware" --type py

Length of output: 1827


Verify Middleware Order Impact

The DevzeryDjangoMiddleware is being added as the last middleware in the list, meaning it will process responses first and requests last—consistent with Django’s middleware behavior. However, note that the middleware’s documentation wasn’t available via the installation check, and our repository search shows its standard placement without additional context. Please confirm that this ordering aligns with your intended request/response processing logic, and consider verifying its behavior through additional testing or by reviewing its implementation if any ordering dependencies exist.

  • Location: apiserver/plane/settings/common.py (middleware added at the end)
  • Impact: Request processing flows top-to-bottom and responses bottom-to-top; ensure this placement doesn’t inadvertently affect behavior relative to other middleware.

Comment on lines +69 to +71
DEVZERY_API_KEY = "" # Replace with your Devzery API key
DEVZERY_SERVER_NAME = "" # Replace with an identifier for your microservice

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Environment variables should be used for the Devzery credentials.

Currently, the Devzery API key and server name are hardcoded as empty strings with comments to replace them. For security best practices:

  1. These values should be loaded from environment variables rather than hardcoded
  2. API keys should never be committed to version control
  3. This follows the pattern used for other sensitive values in this file
-DEVZERY_API_KEY = ""  # Replace with your Devzery API key
-DEVZERY_SERVER_NAME = ""  # Replace with an identifier for your microservice
+DEVZERY_API_KEY = os.environ.get("DEVZERY_API_KEY", "")
+DEVZERY_SERVER_NAME = os.environ.get("DEVZERY_SERVER_NAME", "")
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
DEVZERY_API_KEY = "" # Replace with your Devzery API key
DEVZERY_SERVER_NAME = "" # Replace with an identifier for your microservice
DEVZERY_API_KEY = os.environ.get("DEVZERY_API_KEY", "")
DEVZERY_SERVER_NAME = os.environ.get("DEVZERY_SERVER_NAME", "")

@sriramveeraghanta
Copy link
Contributor

We're closing this PR as devzery does not meet the open source standards we maintain for this repository. Our community repository does not rely on proprietary applications, and we need to ensure all contributions align with this principle.

Thank you for your interest in contributing. If you'd like to make future contributions that align with our open source standards, we welcome your participation.

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.

3 participants