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

Information date switches 1 day #1972

Closed
DzMakatun opened this issue Nov 4, 2021 · 2 comments
Closed

Information date switches 1 day #1972

DzMakatun opened this issue Nov 4, 2021 · 2 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers Menas Menas component affected priority: undecided Undecided priority to be assigned after discussion under discussion Requires consideration before a decision is made whether/how to implement

Comments

@DzMakatun
Copy link
Contributor

DzMakatun commented Nov 4, 2021

Describe the bug

In the monitoring tab in Menas informations dates are shown as +1 day from the actual date.

To Reproduce

Compare the displayed information dates to the original records in the DB
Example dataset: spear_sovereignindicators

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

Screen Shot 2021-11-04 at 11.17.00.png

Additional context

The older Enceladus version, when Monitoring was implemented, was storing informationDate as a date string only. In the current version it includes default time of 23:59:59.590 which is 10 milliseconds before the midnight. Also, the timezone is not specified. The date gets switched, probably when casting the string to datetime object or adjusting for browser timezone. Further investigation is needed.

Release notes

Fixed incorrect info date display in monitoring UI.

@DzMakatun DzMakatun added bug Something isn't working good first issue Good for newcomers Menas Menas component affected priority: undecided Undecided priority to be assigned after discussion under discussion Requires consideration before a decision is made whether/how to implement labels Nov 4, 2021
@DzMakatun DzMakatun self-assigned this Nov 4, 2021
@DzMakatun
Copy link
Contributor Author

Screen Shot 2022-02-01 at 11 27 50

Screen Shot 2022-01-31 at 16 50 09

The root of the issue:
the infodate is stored without a timezone in mongo. For monitoring we to cast it to ISODate in mongo quiry to make it searchable. but when local time differs from GMT it gets shifted 1 day.

controlMeasure.metadata.informationDate
From user
controlMeasure.metadata.additionalInfo.enceladus_info_date
From spark-job

Should be same. But controlMeasure.metadata.informationDate format is not enforced at all.
Second's format should be enforced I think

Proposed solution:
keep mongo queries the same for internal processing but display the original enceladus_info_date string in the UI.

@DzMakatun
Copy link
Contributor Author

Checked existence of controlMeasure.metadata.additionalInfo.enceladus_info_date
in run docs

Using:
db.getCollection('run_v1').find({"controlMeasure.metadata.additionalInfo.enceladus_info_date": null},{"controlMeasure.metadata.additionalInfo.std_enceladus_version":1}).sort({"controlMeasure.metadata.additionalInfo.std_enceladus_version":-1}).limit(30)

Conclusion: all runs since 0.4.180 has the new attribute included. It is safe to switch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers Menas Menas component affected priority: undecided Undecided priority to be assigned after discussion under discussion Requires consideration before a decision is made whether/how to implement
Projects
None yet
Development

No branches or pull requests

1 participant