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

[GraphQL] fix health check acting up on tests #19121

Merged
merged 2 commits into from
Aug 28, 2024

Conversation

manolisliolios
Copy link
Contributor

@manolisliolios manolisliolios commented Aug 28, 2024

Description

Waiting a bit longer (until we've indexed checkpoint 1), to give time to the watermark task to pick up the proper timestamp in tests, otherwise the timestamp has the value of 0 causing a 504.

if (now - checkpoint_timestamp) > max_checkpoint_lag_ms {

(checkpoint_timestamp being 0 would always cause this to fail as now is a system utc timestamp).

Test plan

How did you test the new or updated feature?


Release notes

Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.

For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.

  • Protocol:
  • Nodes (Validators and Full nodes):
  • Indexer:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:
  • REST API:

Copy link

vercel bot commented Aug 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sui-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 28, 2024 2:40pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview Aug 28, 2024 2:40pm
sui-kiosk ⬜️ Ignored (Inspect) Visit Preview Aug 28, 2024 2:40pm
sui-typescript-docs ⬜️ Ignored (Inspect) Visit Preview Aug 28, 2024 2:40pm

@manolisliolios manolisliolios changed the title [GraphQL] fix health check acting up [GraphQL] fix health check acting up on tests Aug 28, 2024
Copy link
Contributor

@wlmyng wlmyng left a comment

Choose a reason for hiding this comment

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

approving to unblock but don't quite follow how this addresses flakiness. is this because checkpoint 0 will always have a checkpoint timestamp of 0? i would think that checkpoint 0 would have a timestamp of whenever it was instantiated though

@manolisliolios
Copy link
Contributor Author

approving to unblock but don't quite follow how this addresses flakiness. is this because checkpoint 0 will always have a checkpoint timestamp of 0? i would think that checkpoint 0 would have a timestamp of whenever it was instantiated though

@wlmyng My assumption is that even if checkpoint 0 gets indexed, the watermark task hasn't yet picked it up because it runs on intervals so it returns 0 for the timestamp. The wait for checkpoint 1 just gives it more time to do so (It's not a full solution, but I think it'd be way way harder to fall into the same continuous failure).

@manolisliolios manolisliolios merged commit d81dfa2 into main Aug 28, 2024
48 checks passed
@manolisliolios manolisliolios deleted the ml/fix-health-check-test branch August 28, 2024 17:20
jangid pushed a commit to jangid/sui that referenced this pull request Aug 30, 2024
## Description 

Waiting a bit longer (until we've indexed checkpoint 1), to give time to
the watermark task to pick up the proper timestamp in tests, otherwise
the timestamp has the value of 0 causing a 504.


https://github.com/MystenLabs/sui/blob/f6dd9a8ef91612f541405d0e2f704b1895abbc37/crates/sui-graphql-rpc/src/server/builder.rs#L658
(`checkpoint_timestamp` being 0 would always cause this to fail as `now`
is a system utc timestamp).

## Test plan 

How did you test the new or updated feature?

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] Indexer: 
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
- [ ] REST API:
suiwombat pushed a commit that referenced this pull request Sep 16, 2024
## Description 

Waiting a bit longer (until we've indexed checkpoint 1), to give time to
the watermark task to pick up the proper timestamp in tests, otherwise
the timestamp has the value of 0 causing a 504.


https://github.com/MystenLabs/sui/blob/f6dd9a8ef91612f541405d0e2f704b1895abbc37/crates/sui-graphql-rpc/src/server/builder.rs#L658
(`checkpoint_timestamp` being 0 would always cause this to fail as `now`
is a system utc timestamp).

## Test plan 

How did you test the new or updated feature?

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] Indexer: 
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
- [ ] REST API:
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