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

Run aio pool tests in docker #467

Merged
merged 5 commits into from
Aug 7, 2023
Merged

Run aio pool tests in docker #467

merged 5 commits into from
Aug 7, 2023

Conversation

smallhive
Copy link
Contributor

@smallhive smallhive commented Jul 11, 2023

closes #445

@smallhive smallhive marked this pull request as ready for review July 11, 2023 06:45
@@ -1,5 +1,3 @@
//go:build aiotest
Copy link
Member

@carpawell carpawell Jul 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it mean that a dev has to have docker for developing SDK?

Copy link
Contributor Author

@smallhive smallhive Jul 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct. The same method already exists in the rest gate and works perfectly

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i can't deny this cuz i have docker, but im really 😟 about this

Copy link
Member

@carpawell carpawell Jul 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

already exists in the rest gate and works perfectly

sure, i do not think that your code or docker client lib is bad, i just meant that i am not sure we need to force such a requirement on everybody: if i want to make a contribution to a go lib and run tests locally, i would expect me to have go and... all? while CI on the GH side can run everything with all the dependencies we want

what @roman-khimov thinks about it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docker is a very common software, I tend to think almost all backend developers have it on board

Copy link
Contributor

@cthulhu-rider cthulhu-rider Jul 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SDK is just a Go lib, i don't expect to require anything but pure Go to maintain it. If we wanna test AIO, lets test it within https://github.com/nspcc-dev/neofs-aio where Docker is natural. Or make docker test an optional feature make test-docker

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional tests never really work, it has to be a part of the regular testing routine. I agree that in general it should be possible to cover the code with pure synthetic tests, but at the same time these are valuable as well, they prove that the system works as a whole.

What can be done is:

  • a separate target
  • but a mandatory GH action always running it

Maybe that's the optimal combination, but this still raises some questions of proper coverage counting.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets try to cover both goals. If we decide that Docker requirement can not be avoided, then i dont mind to have it if tests will really help

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left make test as is and everyone may use it for SDK development. Also I've added a new make target test-with-docker for all tests, including docker AIO. Updated GH workflow to use test-with-docker

@smallhive smallhive requested a review from carpawell July 13, 2023 06:41
@carpawell
Copy link
Member

BTW, my 1.20.4 changes go.mod: it moves github.com/docker/docker v23.0.5+incompatible to a // indirect block.

@smallhive smallhive force-pushed the 445-add-aio-pool-tests branch 3 times, most recently from 8a4e2e8 to f79cfd1 Compare July 19, 2023 11:50
Copy link
Contributor

@cthulhu-rider cthulhu-rider left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls pay attention to @carpawell comment about go.mod

@smallhive smallhive force-pushed the 445-add-aio-pool-tests branch from 5494893 to 68f7ce6 Compare July 21, 2023 04:07
@smallhive
Copy link
Contributor Author

pls pay attention to @carpawell comment about go.mod

I've updated the go.mod in a separate commit, but without an explicit go mod tidy there is no changes

@smallhive smallhive force-pushed the 445-add-aio-pool-tests branch from 68f7ce6 to 893c503 Compare July 21, 2023 04:12
@smallhive smallhive requested a review from carpawell July 21, 2023 04:13
@smallhive smallhive force-pushed the 445-add-aio-pool-tests branch 3 times, most recently from 80bba8f to a091f9e Compare July 21, 2023 05:04
@smallhive
Copy link
Contributor Author

smallhive commented Jul 21, 2023

There is some issue with the latest go versions. Go 1.19.11 and 1.20.6 rise errors. I see two solutions:

  • temporary downgrade to 1.19.10 and 1.20.5 and use these versions for tests. This solution works, checked
  • don't use docker right now

Of course, it is for a few days, until the bug is fixed. What do you see? @roman-khimov

@roman-khimov
Copy link
Member

I think we can just wait a little before merging this.

@carpawell carpawell mentioned this pull request Jul 26, 2023
@roman-khimov
Copy link
Member

BTW, the bug is fixed in testcontainers now and we just need a new release from them.

@roman-khimov
Copy link
Member

Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
closes #445

Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
…unction

Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
For local development we left `make test` command to check regular unit tests.
For GH actions we will use one more step with docker AIO container.

Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
@smallhive smallhive force-pushed the 445-add-aio-pool-tests branch from a091f9e to a295c21 Compare August 7, 2023 04:52
@smallhive
Copy link
Contributor Author

Rebased from the latest master version. Updated testcontainers-go to v.0.22.0. Right now all tests are green

@roman-khimov roman-khimov merged commit 38848dc into master Aug 7, 2023
@roman-khimov roman-khimov deleted the 445-add-aio-pool-tests branch August 7, 2023 06:24
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.

Add AIO pool tests
4 participants