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(backend): Add cost on node & graph execution stats #9520

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

majdyz
Copy link
Contributor

@majdyz majdyz commented Feb 25, 2025

Changes πŸ—οΈ

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

@majdyz majdyz requested a review from ntindle February 25, 2025 22:58
@majdyz majdyz requested a review from a team as a code owner February 25, 2025 22:58
@majdyz majdyz requested review from kcze and removed request for a team February 25, 2025 22:58
Copy link

PR Reviewer Guide πŸ”

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 πŸ”΅πŸ”΅βšͺβšͺβšͺ
πŸ§ͺΒ No relevant tests
πŸ”’Β No security concerns identified
⚑ Recommended focus areas for review

Cost Initialization

The cost variable is initialized to 0 but then immediately overwritten by db_client.spend_credits(data). The initial assignment appears unnecessary.

cost = 0
try:
    # Charge the user for the execution before running the block.
    cost = db_client.spend_credits(data)

@github-actions github-actions bot added platform/backend AutoGPT Platform - Back end size/s labels Feb 25, 2025
Copy link

deepsource-io bot commented Feb 25, 2025

Here's the code health analysis summary for commits af8ea93..6626fd9. View details on DeepSourceΒ β†—.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource JavaScript LogoJavaScriptβœ…Β SuccessView CheckΒ β†—
DeepSource Python LogoPythonβœ…Β Success
❗ 19 occurences introduced
🎯 19 occurences resolved
View CheckΒ β†—

πŸ’‘ If you’re a repository administrator, you can configure the quality gates from the settings.

Copy link

netlify bot commented Feb 25, 2025

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

Name Link
πŸ”¨ Latest commit 6626fd9
πŸ” Latest deploy log https://app.netlify.com/sites/auto-gpt-docs-dev/deploys/67be4b0d00da590008d44388

Copy link

netlify bot commented Feb 25, 2025

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

Name Link
πŸ”¨ Latest commit 6626fd9
πŸ” Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/67be4b0dba71b200087866b3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant