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

refactor(backend): Introduced Graph Input & Output Schema, Merge GraphMeta & Graph, Remove subgraph functionality #8526

Merged
merged 11 commits into from
Nov 7, 2024

Conversation

majdyz
Copy link
Contributor

@majdyz majdyz commented Nov 3, 2024

Background

GraphMeta will require the input & output schema, the information derived from the nodes.
This makes GraphMeta & Graph coincide.

Changes 🏗️

  • Removed subgraph functionality both code & db changes.
  • Merge GraphMeta & Graph into a single object.
  • Reworked Graph input & output schema, now it's embedded in the graph object.
  • Removed the need of joining AgentNodeExecutions only for total_run_time information.
  • Moved prisma include object into a single file.

Unrelated change:

  • Fixed testing block: ConditionBlock

Testing 🔍

Note

Only for the new autogpt platform, currently in autogpt_platform/

  • 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

Configuration Changes 📝

Note

Only for the new autogpt platform, currently in autogpt_platform/

If you're making configuration or infrastructure changes, please remember to check you've updated the related infrastructure code in the autogpt_platform/infra folder.

Examples of such changes might include:

  • 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 review from ntindle, Swiftyos and Pwuts November 3, 2024 15:26
@majdyz majdyz requested a review from a team as a code owner November 3, 2024 15:26
Copy link

qodo-merge-pro bot commented Nov 3, 2024

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 4 🔵🔵🔵🔵⚪
🧪 PR contains tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Data Model Change
The Graph model has been significantly refactored. The subgraph functionality has been removed, and the input and output schema are now computed properties. This change may have implications on how graphs are created, stored, and queried.

API Endpoint Removal
The '/graphs/{graph_id}/input_schema' endpoint has been removed. This could potentially break client applications that rely on this endpoint.

Execution Statistics Change
The way execution statistics are collected and updated has changed. This could affect how graph execution performance is measured and reported.

Test Case Modifications
Several test cases have been modified or removed, particularly those related to subgraphs and input schema. Ensure that these changes don't leave any functionality untested.

@github-actions github-actions bot added the conflicts Automatically applied to PRs with merge conflicts label Nov 4, 2024
Copy link
Contributor

github-actions bot commented Nov 4, 2024

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

Copy link
Contributor

github-actions bot commented Nov 4, 2024

Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.

@github-actions github-actions bot removed the conflicts Automatically applied to PRs with merge conflicts label Nov 4, 2024
@ntindle
Copy link
Member

ntindle commented Nov 5, 2024

If I get more context on the why's of this I can probably give it a go reviewing it but as of now, its probably up to someone else

@github-actions github-actions bot added the conflicts Automatically applied to PRs with merge conflicts label Nov 5, 2024
Copy link
Contributor

github-actions bot commented Nov 5, 2024

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

@github-actions github-actions bot removed the conflicts Automatically applied to PRs with merge conflicts label Nov 5, 2024
Copy link
Contributor

github-actions bot commented Nov 5, 2024

Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.

@majdyz majdyz changed the title refactor(backend): Merge GraphMeta & Graph, remove subgraph refactor(backend): Introduced Graph Input & Output Schema, Merge GraphMeta & Graph, Remove subgraph functionality Nov 5, 2024
@ntindle
Copy link
Member

ntindle commented Nov 5, 2024

Okay I kinda see where this is going, I can review it later today

@ntindle
Copy link
Member

ntindle commented Nov 6, 2024

Approved with nits

@majdyz majdyz merged commit 86c5441 into dev Nov 7, 2024
8 checks passed
@majdyz majdyz deleted the zamilmajdy/unifygraphmeta-and-graph branch November 7, 2024 02:30
@majdyz
Copy link
Contributor Author

majdyz commented Nov 7, 2024

@ntindle I'm following up on your comment on JSON by providing a type hint and type conversion for JSON parsing here:

#8578

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.

2 participants