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] Duplicated mock breaks RunPluginEndToEndTest util #4343

Closed
2 tasks done
andresgomezfrr opened this issue Nov 1, 2023 · 0 comments · Fixed by #4342
Closed
2 tasks done

[BUG] Duplicated mock breaks RunPluginEndToEndTest util #4343

andresgomezfrr opened this issue Nov 1, 2023 · 0 comments · Fixed by #4342
Labels
bug Something isn't working untriaged This issues has not yet been looked at by the Maintainers

Comments

@andresgomezfrr
Copy link
Contributor

Describe the bug

This flyteorg/flyteplugins#391 added a duplicated mock in the outputWriter (https://github.com/flyteorg/flyteplugins/pull/391/files#diff-988f7d1f2acc61bd0d31ded3c8f086ba0bf42731e75ebbf13ac0c0141c3b7710R95)

outputWriter.OnPutMatch(mock.Anything, mock.Anything).Return(nil)

This mock is duplicated with the following one but without the Run callback which is used to write the output data inside the in-memory storage.

I discovered this because after updating the flyteplugins dependency from v1.1.8 to the latest (monorepo) some of my test end-to-end started failing with file does not exist error:

time="2023-11-01T10:34:44+01:00" level=error msg="Failed to read from the raw store [fake://bucket/prefix/2g6/outputs.pb] Error: file does not exist"
        	Error:      	Received unexpected error:
        	            	file does not exist
        	            	path:fake://bucket/prefix/2g6/outputs.pb
        	            	github.com/flyteorg/flyte/flytestdlib/storage.DefaultProtobufStore.ReadProtobuf
        	            		/Users/andresg/go/pkg/mod/github.com/flyteorg/flyte/[email protected]/storage/protobuf_store.go:39
        	            	github.com/flyteorg/flyte/flyteplugins/tests.RunPluginEndToEndTest
        	            		/Users/andresg/go/pkg/mod/github.com/flyteorg/flyte/[email protected]/tests/end_to_end.go:261

Debugging it, I discovered that the Run function was not executed if we have the duplicated mock.

Expected behavior

The output data should be written inside the in-memory storage.

Additional context to reproduce

Try to use the RunPluginEndToEndTest with some task template that writes output data.

Screenshots

No response

Are you sure this issue hasn't been raised already?

  • Yes

Have you read the Code of Conduct?

  • Yes
@andresgomezfrr andresgomezfrr added bug Something isn't working untriaged This issues has not yet been looked at by the Maintainers labels Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working untriaged This issues has not yet been looked at by the Maintainers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant