AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

fix(backend): Fix static link resolving behavior on concurrent output

Open majdyz opened this issue 10 months ago β€’ 9 comments

Changes πŸ—οΈ

In the case of concurrent output, static links end up being re-used twice without although not producing any output.

Consider this scenario:

A ---- B
       |  
C-----/

If A-B is static, and an output is produced from C-B, B will try to re-use the output from C because it thinks a static output is connected to it.

Real example:

A FillTextTemplate block has its value pin connected to two different block outputs. The format pin is connected to another 2 blocks, but one of them is a static output (StoreValueBlock) that ends up never being executed.

wIth two inputs or value pin and only one input of format pin, the FillTextTemplate should only be executed once.

Correct behavior: image

Fill text Template is producing:

  • Hi Person-B
  • One incomplete execution waiting for format field to be provided.

Current behavior: image

Fill text Template is producing:

  • Hi Person-B
  • Hi Person-A (The combine text block output is unexpectedly being re-used twice).

Checklist πŸ“‹

For code changes:

  • [x] I have clearly listed my changes in the PR description
  • [x] I have made a test plan
  • [x] I have tested my changes according to the test plan:
    • [x] described on the description above.

majdyz avatar Mar 06 '25 16:03 majdyz

PR Reviewer Guide πŸ”

Here are some key observations to aid the review process:

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

Debug Print

There's a debug print statement that should be removed before merging. The print statement on line 564 is outputting debugging information that shouldn't be in production code.

print(">>>>>>>>> from links", links, "latest_output", latest_output)
String Formatting

The string formatting in the _wrap method has been changed to use an empty string when extra is falsy, but the syntax looks unusual with double quotes inside single quotes.

return f"{self.prefix} {msg} {extra or ""}"

qodo-code-review[bot] avatar Mar 06 '25 16:03 qodo-code-review[bot]

Deploy Preview for auto-gpt-docs-dev canceled.

Name Link
Latest commit 4cba1c0cb8b581b77fd09e4e2a4adc8c698fe0bd
Latest deploy log https://app.netlify.com/sites/auto-gpt-docs-dev/deploys/67e20ef08107ce0008ed4c08

netlify[bot] avatar Mar 06 '25 16:03 netlify[bot]

Here's the code health analysis summary for commits 4ca1a45..4cba1c0. View details on DeepSourceΒ β†—.

Analysis Summary

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

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

deepsource-io[bot] avatar Mar 06 '25 16:03 deepsource-io[bot]

Deploy Preview for auto-gpt-docs ready!

Name Link
Latest commit 1215fefe0721a150aed19dfbdedc23650da065e1
Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/67c9d31ee624c50008ed32c5
Deploy Preview https://deploy-preview-9593--auto-gpt-docs.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Mar 06 '25 16:03 netlify[bot]

While the PR title follows convention and the changes appear focused on fixing a specific issue with static link resolving, the PR template is incomplete. Key issues: 1) Missing test plan details despite code changes 2) Checklist items are not checked/completed. However, the changes appear targeted and within scope, touching only backend files.

AutoGPT-Agent avatar Mar 06 '25 16:03 AutoGPT-Agent

Deploy Preview for auto-gpt-docs ready!

Name Link
Latest commit 4cba1c0cb8b581b77fd09e4e2a4adc8c698fe0bd
Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/67e20ef07b69000008779404
Deploy Preview https://deploy-preview-9593--auto-gpt-docs.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Mar 06 '25 16:03 netlify[bot]

The PR has several issues that need to be addressed: 1) The PR template checklist is completely empty and should at least have the code changes section filled out given this is a code change PR. 2) While the title follows conventional commit format with fix(backend), the description of changes could be clearer in explaining what exactly was changed in each file. However, the core fix itself seems valid and the author explains the problem scenario well. The changes appear focused on fixing the static link resolution issue without major out-of-scope modifications.

AutoGPT-Agent avatar Mar 07 '25 04:03 AutoGPT-Agent

The PR has several issues: 1) The title follows conventional commit format but the PR template is not completely filled out - the test plan and checklist sections are empty. 2) However, the changes section is very well documented with clear examples and diagrams showing the current vs desired behavior. 3) The code changes appear focused on fixing a specific issue with static link behavior and concurrent outputs. The implementation looks contained to this scope. 4) There are appropriate data.py changes that handle user_id correctly.

AutoGPT-Agent avatar Mar 07 '25 06:03 AutoGPT-Agent

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

github-actions[bot] avatar Mar 10 '25 05:03 github-actions[bot]

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

github-actions[bot] avatar Mar 12 '25 00:03 github-actions[bot]

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

github-actions[bot] avatar Mar 20 '25 16:03 github-actions[bot]

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

github-actions[bot] avatar Mar 25 '25 02:03 github-actions[bot]

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

github-actions[bot] avatar Mar 25 '25 12:03 github-actions[bot]

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

github-actions[bot] avatar Mar 25 '25 12:03 github-actions[bot]

still an issue -- staying open

ntindle avatar Dec 18 '25 16:12 ntindle