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(platform/featureflags): Setting up feature flagging #8718

Open
wants to merge 9 commits into
base: dev
Choose a base branch
from

Conversation

aarushik93
Copy link
Contributor

@aarushik93 aarushik93 commented Nov 19, 2024

So we can hide and show features at will

Changes πŸ—οΈ

Created a launch darkly decorator that can be used to hide or show functionality in the backend.

Checklist πŸ“‹

For code changes:

  • I have clearly listed my changes in the PR description
  • I have made a test plan
  • I have tested my changes according to the test plan:
    • ...
Example test plan
  • Create from scratch and execute an agent with at least 3 blocks
  • Import an agent from file upload, and confirm it executes correctly
  • Upload agent to marketplace
  • Import an agent from marketplace and confirm it executes correctly
  • Edit an agent from monitor, and confirm it executes correctly

For configuration changes:

  • .env.example is updated or already compatible with my changes
  • docker-compose.yml is updated or already compatible with my changes
  • I have included a list of my configuration changes in the PR description (under Changes)
Examples of configuration changes
  • Changing ports
  • Adding new services that need to communicate with each other
  • Secrets or environment variable changes
  • New or infrastructure changes such as databases

@github-actions github-actions bot added platform/backend AutoGPT Platform - Back end conflicts Automatically applied to PRs with merge conflicts labels Nov 19, 2024
Copy link
Contributor

This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.

Copy link

netlify bot commented Nov 19, 2024

βœ… Deploy Preview for auto-gpt-docs canceled.

Name Link
πŸ”¨ Latest commit 33b92d6
πŸ” Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/673f27883ba7800008861f1e

@aarushik93 aarushik93 force-pushed the aarushikansal/feature-flagging-backend branch from 141bc46 to 4e09cef Compare November 20, 2024 17:42
@github-actions github-actions bot removed the conflicts Automatically applied to PRs with merge conflicts label Nov 20, 2024
Copy link
Contributor

Conflicts have been resolved! πŸŽ‰ A maintainer will review the pull request shortly.

@github-actions github-actions bot added size/xl and removed size/l labels Nov 20, 2024
@aarushik93 aarushik93 marked this pull request as ready for review November 20, 2024 18:12
@aarushik93 aarushik93 requested a review from a team as a code owner November 20, 2024 18:12
@aarushik93 aarushik93 requested review from Swiftyos, Bentlybro, ntindle and kcze and removed request for a team November 20, 2024 18:12
Copy link

PR Reviewer Guide πŸ”

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 3 πŸ”΅πŸ”΅πŸ”΅βšͺβšͺ
πŸ§ͺΒ PR contains tests
πŸ”’Β Security concerns

Sensitive information exposure:
The code logs SDK key presence at debug level (line 28 in client.py), which could potentially expose sensitive information in logs if the actual key is accidentally logged in other debug statements. Consider removing SDK key related debug logging.

⚑ Recommended focus areas for review

Error Handling
The error handling in the feature flag decorator returns None by default when an exception occurs, which could lead to unexpected behavior. Consider raising the exception or providing a more specific error response.

Code Duplication
The sync_wrapper and async_wrapper functions contain duplicated logic for feature flag checking. Consider extracting common logic to reduce duplication.

Logging Level
Setting logging level to DEBUG by default may be too verbose for production environments and could impact performance.

@aarushik93 aarushik93 enabled auto-merge (squash) November 20, 2024 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant