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

go-runtime seemingly failed to extract 1/2 of the modules #1580

Closed
alecthomas opened this issue May 27, 2024 · 6 comments · Fixed by #1605
Closed

go-runtime seemingly failed to extract 1/2 of the modules #1580

alecthomas opened this issue May 27, 2024 · 6 comments · Fixed by #1605
Assignees
Labels
bug Something isn't working

Comments

@alecthomas
Copy link
Collaborator

=== FAIL: buildengine TestGeneratedTypeRegistry (1.19s)
info:other: Building module
debug:other: Generating external modules
debug:other: Extracting schema
debug:other: Generating main module
debug:other: Tidying go.mod files
trace:other: exec: cd /Users/alec/dev/ftl/buildengine/testdata/projects/other/_ftl/go/modules && go mod tidy
trace:other: exec: cd /Users/alec/dev/ftl/buildengine/testdata/projects/other && go mod tidy
trace:other: exec: cd /Users/alec/dev/ftl/buildengine/testdata/projects/other/_ftl/go/main && go mod tidy
debug:other: go: found github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/ftlv1connect in github.com/TBD54566975/ftl v0.0.0-00010101000000-000000000000
debug:other: go: found github.com/TBD54566975/ftl/common/plugin in github.com/TBD54566975/ftl v0.0.0-00010101000000-000000000000
debug:other: go: found github.com/TBD54566975/ftl/go-runtime/ftl/reflection in github.com/TBD54566975/ftl v0.0.0-00010101000000-000000000000
debug:other: go: found github.com/TBD54566975/ftl/go-runtime/server in github.com/TBD54566975/ftl v0.0.0-00010101000000-000000000000
debug:other: go: found github.com/TBD54566975/ftl/go-runtime/ftl/reflection in github.com/TBD54566975/ftl v0.0.0-00010101000000-000000000000
debug:other: Compiling
trace:other: exec: cd /Users/alec/dev/ftl/buildengine/testdata/projects/other/_ftl/go/main && go build -o ../../main .
    /Users/alec/dev/ftl/buildengine/build_go_test.go:342: Expected values to be equal:
         	"github.com/TBD54566975/ftl/go-runtime/ftl/reflection"
         	"github.com/TBD54566975/ftl/go-runtime/server"
         
        -	"ftl/another"
         	"ftl/other"
         )
         
         func init() {
         	reflection.Register(
        -		reflection.WithSumType[another.SecondTypeEnum](
        -			*new(another.One),
        -			*new(another.Two),
        -		),
        -		reflection.WithSumType[another.TypeEnum](
        -			*new(another.A),
        -			*new(another.B),
        -		),
         		reflection.WithSumType[other.SecondTypeEnum](
         			*new(other.A),
         			*new(other.B),
@alecthomas alecthomas added the bug Something isn't working label May 27, 2024
@github-actions github-actions bot added the triage Issue needs triaging label May 27, 2024
@ftl-robot ftl-robot mentioned this issue May 27, 2024
@alecthomas
Copy link
Collaborator Author

I also just realised that this shouldn't be registering types for another at all, as this is the main entry point for the other package.

@alecthomas
Copy link
Collaborator Author

This is now seemingly failing a great deal of the time.

@wesbillman wesbillman added next Work that will be be picked up next and removed triage Issue needs triaging labels May 28, 2024
@wesbillman wesbillman self-assigned this May 30, 2024
@github-actions github-actions bot removed the next Work that will be be picked up next label May 30, 2024
wesbillman added a commit that referenced this issue May 30, 2024
Fixes #1580

It seemed like the test was just wrong, so I updated it. I ran it a
bunch locally and it seemed ok 🤷
@alecthomas alecthomas reopened this May 30, 2024
@alecthomas
Copy link
Collaborator Author

This is not really "fixed", just ignored?

@wesbillman
Copy link
Collaborator

wesbillman commented May 30, 2024

yeah sorry I'm not 100% sure either. Other than we had the wrong test code in there I think since it had another in it. if I'm reading it correctly. So it seemed like it would just fail every time I ran it. Correcting the code make it pass. So my theory was that maybe the code was wrong for a bit, but worked sometimes before we added code to delete the _ftl folder completely during builds.

Happy to revert the change though. Or we can see if it's still flaky for people with these updates.

#1605 (comment)

@alecthomas
Copy link
Collaborator Author

It's fine to ignore it temporarily but we should leave this open until it can be fixed

@wesbillman
Copy link
Collaborator

This seems stable now. Closing and will reopen if this pops up again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants