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

Add log_utc option to sqlite3 returner #58003

Closed

Conversation

nathansgreen
Copy link

@nathansgreen nathansgreen commented Jul 22, 2020

Logging non-utc timestamps creates obvious problems for any system
that has a timezone configured. It should at least be possible to
use UTC timestamps in the returner output.

What does this PR do?

Add a log_utc option to the sqlite3 returner. This enables UTC as the logged timestamp.

What issues does this PR fix or reference?

Fixes: 58002

Previous Behavior

Always logs local time.

New Behavior

If enabled, logs in UTC.

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

No

Please review Salt's Contributing Guide for best practices.

See GitHub's page on GPG signing for more information about signing commits with GPG.

Logging non-utc timestamps creates obvious problems for any system
that has a timezone configured. It should at least be possible to
use UTC timestamps in the returner output.
@nathansgreen nathansgreen requested a review from a team as a code owner July 22, 2020 16:15
@ghost ghost requested review from cmcmarrow and removed request for a team July 22, 2020 16:15
@cmcmarrow cmcmarrow added the Needs-Testcase PR needs test cases written, or the issue is about a bug/feature that needs test cases label Jul 22, 2020
@cmcmarrow
Copy link
Contributor

@nathansgreen thanks for the PR! I agree that people will benefit from log_utc. Can we get some unit tests? Salt only merges PRs with test now. This is so new features don’t break in the future. Here is an example of a unit test #57978.

@nathansgreen
Copy link
Author

There's not much in the way of existing tests for returners, but I'll try to cook something up. It's hard to see a good way to test this without a lot of scaffolding.

@dwoz
Copy link
Contributor

dwoz commented Dec 10, 2023

Closing this due to inactivity. Anyone should feel free to re-open it if they want to see it through to the end in one release cycle.

@dwoz dwoz closed this Dec 10, 2023
@dwoz dwoz added Abandoned help-wanted Community help is needed to resolve this labels Dec 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Abandoned has-failing-test help-wanted Community help is needed to resolve this Needs-Testcase PR needs test cases written, or the issue is about a bug/feature that needs test cases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] sqlite3 returner logs using local timezone
4 participants