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

[BUG] no error when component links to itself #505

Open
ricochet opened this issue Dec 6, 2024 · 4 comments
Open

[BUG] no error when component links to itself #505

ricochet opened this issue Dec 6, 2024 · 4 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@ricochet
Copy link
Contributor

ricochet commented Dec 6, 2024

When the source and target of a link are the same, the application status should surface an error. This should be considered an invalid link.

❯ wash app status test

test@ - Deployed                                                                                            
                                                                                            
  Name                                                             Kind                   Status    
  component1                                                  SpreadScaler   Deployed  
  component1 -(test:foo)-> component1     LinkScaler         Deployed  
  component2                                                 SpreadScaler    Deployed  
  httpserver -(wasi:http)-> component1      LinkScaler         Deployed  
  httpserver                                                     SpreadScaler    Deployed  
@brooksmtownsend
Copy link
Member

@ricochet to play devils advocate, is there a legitimate use case for recursion with the same component? I tend to agree that this is probably always invalid (especially if not running with a certain scale, since it would just timeout) but figured before we make it an error it would be good to consider if this is a real use case

@brooksmtownsend brooksmtownsend added help wanted Extra attention is needed question Further information is requested labels Dec 6, 2024
@ricochet
Copy link
Contributor Author

ricochet commented Dec 6, 2024

I couldn't come up with a reason this would be valid, especially not where the solution had to involve recursion over the same component (vs making another component for fan-out-fan-in even if they have the same logic, both components serve as logically different nodes in the DAG).

If we're looking to replicate linking but distributed, then note that circular linking is disallowed in the component model.

@brooksmtownsend
Copy link
Member

Yeah, I think that if it's something that's not allowed with just regular composition, then it's not something we want to encourage. Maybe there's a real use case here, but we can address that when it comes up

@brooksmtownsend brooksmtownsend added good first issue Good for newcomers and removed question Further information is requested labels Dec 19, 2024
Copy link

stale bot commented Feb 17, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this has been closed too eagerly, please feel free to tag a maintainer so we can keep working on the issue. Thank you for contributing to wasmCloud!

@stale stale bot added the stale label Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants