Skip to content

test(e2e): fix gRPC tests on nightly#3262

Merged
andynog merged 3 commits intomainfrom
andy/fix-grpc-tests-nightly
Jun 17, 2024
Merged

test(e2e): fix gRPC tests on nightly#3262
andynog merged 3 commits intomainfrom
andy/fix-grpc-tests-nightly

Conversation

@andynog
Copy link
Collaborator

@andynog andynog commented Jun 13, 2024

This PR changes some gRPC test on nightly. Instead of using a mix of RPC client (to fetch the height) and gRPC to fetch the block and results, the new logic leverages the gRPC get latest height

PR checklist

  • Tests written/updated
  • Changelog entry added in .changelog (we use unclog to manage our changelog)
  • Updated relevant documentation (docs/ or spec/) and code comments
  • Title follows the Conventional Commits spec

@andynog andynog added ci Continuous integration-related e2e Related to our end-to-end tests labels Jun 13, 2024
@andynog andynog added this to the 2024-Q2 milestone Jun 13, 2024
@andynog andynog self-assigned this Jun 13, 2024
@andynog andynog requested a review from a team as a code owner June 13, 2024 20:03
@andynog andynog requested a review from a team June 13, 2024 20:03
Copy link

@cason cason left a comment

Choose a reason for hiding this comment

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

For me is not really clear what those tests are actually testing.

Apparently, we ask a node for its status, to know its last block. Then use private GRPC to get this block and check that everything is ok.

This is flaky, I assume, because the node status gets outdated pretty fast (in particular on GitHub cloud/CI) and we at the same time prune old heights.

The solution is to use the private GRPC to test GRPC looks not ideal to me, honestly. But I don't think we want to have all those errors and this solution probably works.

Suggestion: add comments to the code showing the problem of the original version and/or create an issue to define the right way to test what we want to test here (which is also not clear due to the lack of comments).

@andynog andynog requested review from cason and melekes June 17, 2024 21:34
@andynog
Copy link
Collaborator Author

andynog commented Jun 17, 2024

tests are passing now https://github.com/cometbft/cometbft/actions/runs/9554601144

I will go ahead and merge this to prevent more nightly failures. @cason and @melekes if you feel this tests should be changed or modified please let me know.

@andynog andynog added this pull request to the merge queue Jun 17, 2024
Merged via the queue into main with commit 9bcafd9 Jun 17, 2024
@andynog andynog deleted the andy/fix-grpc-tests-nightly branch June 17, 2024 21:40
mergify bot pushed a commit that referenced this pull request Jun 17, 2024
This PR changes some gRPC test on nightly. Instead of using a mix of RPC
client (to fetch the height) and gRPC to fetch the block and results,
the new logic leverages the gRPC get latest height

#### PR checklist

- [X] Tests written/updated
- [ ] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [ ] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec

(cherry picked from commit 9bcafd9)
andynog added a commit that referenced this pull request Jun 17, 2024
This PR changes some gRPC test on nightly. Instead of using a mix of RPC
client (to fetch the height) and gRPC to fetch the block and results,
the new logic leverages the gRPC get latest height

#### PR checklist

- [X] Tests written/updated
- [ ] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [ ] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec
<hr>This is an automatic backport of pull request #3262 done by
[Mergify](https://mergify.com).

Co-authored-by: Andy Nogueira <me@andynogueira.dev>
hvanz pushed a commit that referenced this pull request Jun 20, 2024
This PR changes some gRPC test on nightly. Instead of using a mix of RPC
client (to fetch the height) and gRPC to fetch the block and results,
the new logic leverages the gRPC get latest height

#### PR checklist

- [X] Tests written/updated
- [ ] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [ ] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec
<hr>This is an automatic backport of pull request #3262 done by
[Mergify](https://mergify.com).

Co-authored-by: Andy Nogueira <me@andynogueira.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continuous integration-related e2e Related to our end-to-end tests

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants