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

Better logging on Subql test failing on matching dates #2294

Open
3 tasks done
bz888 opened this issue Mar 7, 2024 · 4 comments
Open
3 tasks done

Better logging on Subql test failing on matching dates #2294

bz888 opened this issue Mar 7, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@bz888
Copy link
Contributor

bz888 commented Mar 7, 2024

Prerequisites

  • Are you running the latest version(s)?
  • Have you searched the documentation for your issue?
  • Did you search for an existing issue or pull request?

Description

Screenshot 2024-03-08 at 1 30 35 AM

Subql-test failing despite having the same date logged, the test fails.
This is due to the difference in milliseconds-nanoseconds, but the log does not print that.
we should print this for clarity when failing a test due to this.

e.g.

expected time: 1708742045000 // Saturday, 24 February 2024 02:34:05
actual time 1708742045762 // Saturday, 24 February 2024 02:34:05.762

The fail log should show the difference between these date values.

Details

These details can help to reproduce the environment the issue is occurring

Local Environment: [You can get this information from executing subql version.]
Query Version: [What is the version of the query service?]
Indexer Version: [What is the version of the indexer service?]
Network Details:

  • [Network]
  • [Block height, a block height where the issue is happening]
  • [Dictionary endpoint, if used]

Steps to Reproduce

  1. [First Step]
  2. [Second Step]
  3. [and so on...]

Example project: [A link to a minimal example that can reproduce the issue]

Expected behavior: [What you expected to happen]

Actual behavior: [What actually happened]

Any other information

Is there any other information you would like to add?

@apollo-sturdy
Copy link

Any update on this? Would be great to get this fixed.

@stwiname
Copy link
Collaborator

@apollo-sturdy this is low priority for us right now.

You're more than welcome to make a PR that fixes the issue

@apollo-sturdy
Copy link

@apollo-sturdy this is low priority for us right now.

You're more than welcome to make a PR that fixes the issue

I ended up switching to using unix timestamps to avoid the issue. Do you know what the max value for the Int type is? I couldn't find it in the docs. Asking cause I'm unsure if I need to use BigInt for unix timestamps in milliseconds.

@stwiname
Copy link
Collaborator

@apollo-sturdy this is low priority for us right now.
You're more than welcome to make a PR that fixes the issue

I ended up switching to using unix timestamps to avoid the issue. Do you know what the max value for the Int type is? I couldn't find it in the docs. Asking cause I'm unsure if I need to use BigInt for unix timestamps in milliseconds.

Int should be more than enough for unix timestamps in milliseconds

@stwiname stwiname added the bug Something isn't working label Mar 19, 2024
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

No branches or pull requests

3 participants