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

fix(aqua): Remove topology hack #125

Merged
merged 2 commits into from
Oct 25, 2023
Merged

fix(aqua): Remove topology hack #125

merged 2 commits into from
Oct 25, 2023

Conversation

InversionSpaces
Copy link
Contributor

Remove topology hack related to LNG-257

@linear
Copy link

linear bot commented Oct 25, 2023

LNG-257 Incorrect topology with adjacent `on`s

aqua:

func rem(x: i32) -> i32:
    <- x % 2

func test(a: i32) -> []i32:
    result: *i32

    on HOST_PEER_ID:
        result <- rem(a + 1)
        on "worker" via "host":
            result <- rem(a + 2)
        on INIT_PEER_ID via HOST_PEER_ID:
            result <- rem(a + 3)
        
    <- result

bair:

try:
    -relay- <- call %init_peer_id% ("getDataSrv", "-relay-") []
    -a-arg- <- call %init_peer_id% ("getDataSrv", "a") []
    new $result:
        try:
            add <- call -relay- ("math", "add") [-a-arg-, 1]
            rem-0 <- call -relay- ("math", "rem") [add, 2]
            ap rem-0 $result
            try:
                new $-ephemeral-stream-:
                    new #-ephemeral-canon-:
                        canon "host" $-ephemeral-stream- #-ephemeral-canon-
                add-0 <- call "worker" ("math", "add") [-a-arg-, 2]
                rem-1 <- call "worker" ("math", "rem") [add-0, 2]
                ap rem-1 $result
                new $-ephemeral-stream-:
                    new #-ephemeral-canon-:
                        canon "host" $-ephemeral-stream- #-ephemeral-canon-
            catch:
                new $-ephemeral-stream-:
                    new #-ephemeral-canon-:
                        canon "host" $-ephemeral-stream- #-ephemeral-canon-
                new $-ephemeral-stream-:
                    new #-ephemeral-canon-:
                        canon -relay- $-ephemeral-stream- #-ephemeral-canon-
                fail :error:
            try:
                ;; No hop to -relay- here
                add-1 <- call %init_peer_id% ("math", "add") [-a-arg-, 3]
                rem-2 <- call %init_peer_id% ("math", "rem") [add-1, 2]
                ap rem-2 $result
            catch:
                fail :error:
        catch:
            fail :error:
        canon %init_peer_id% $result #-result-fix-0
        ap #-result-fix-0 -result-flat-0
    call %init_peer_id% ("callbackSrv", "response") [-result-flat-0]
catch:
    call %init_peer_id% ("errorHandlingSrv", "error") [:error:, 0]

No hop to -relay- is generated

@InversionSpaces InversionSpaces merged commit 95ce0ad into main Oct 25, 2023
@InversionSpaces InversionSpaces deleted the fix/remove-hack branch October 25, 2023 10:01
nahsi added a commit that referenced this pull request Nov 1, 2023
* fix(aqua): Remove topology hack (#125)

* Fix scripts

* Remove hack

* feat(readme): Add `fluence deal logs` output example to README [DXJ-512] (#126)

Add deal logs output to README

* Setup fcli with action

* Use unstable

* Test CI

* Fix

* Fx

* Add colors

* Fix

* Dump logs

* Bump js-client

* More logs

* Log stdout and stderr

* Capture stderr

* F

* F

* F

* >

* NO COLOR

* Setup tmate

* Add workers

* Run without CI true

* Run on builder

* Run tmata

* Setup rust

* No colors

* Do not setup tmate

* Cleanup

---------

Co-authored-by: InversionSpaces <InversionSpaces@vivaldi.net>
InversionSpaces added a commit that referenced this pull request Nov 1, 2023
* Basic tests setup

* Add ts configs

* Update configs

* Remove cli dep

* Add utils

* Run fluence cli

* Simplify configs

* Quickstart test

* Use Tree Kill

* Test quickstart for all modes

* Wait gateway start

* Use sequential runner

* Start writing deploy tests

* Remove undefined

* Tests with local env

* Add comments

* Use env variables

* Wait for workers deploy

* Remove bail

* Update js-client

* Remove log, wait for service

* Remove skip

* chore: Add tests CI (#130)

* fix(aqua): Remove topology hack (#125)

* Fix scripts

* Remove hack

* feat(readme): Add `fluence deal logs` output example to README [DXJ-512] (#126)

Add deal logs output to README

* Setup fcli with action

* Use unstable

* Test CI

* Fix

* Fx

* Add colors

* Fix

* Dump logs

* Bump js-client

* More logs

* Log stdout and stderr

* Capture stderr

* F

* F

* F

* >

* NO COLOR

* Setup tmate

* Add workers

* Run without CI true

* Run on builder

* Run tmata

* Setup rust

* No colors

* Do not setup tmate

* Cleanup

---------

Co-authored-by: InversionSpaces <InversionSpaces@vivaldi.net>

---------

Co-authored-by: Anatolios Laskaris <github_me@nahsi.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants