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

Hotfix/timestamp mismatch for logs #149

Merged
merged 7 commits into from
Feb 9, 2024

Conversation

hamzaimran08
Copy link
Collaborator

Hotfix for logs not working in production environment. Dev cluster timestamps from containers are of the format 2024-02-08T11:36:10.49903621Z and from prod the format is "2024-02-08T15:22:46.160554532+01:00". Patched it to handle this now using DEBUG option from settings. Needs to be addressed in a later release to use different timestamps options from Loki. Jira link SS-926.

Checklist

If you're unsure about any of the items below, don't hesitate to ask. We're here to help!
This is simply a reminder of what we are going to look for before merging your code.

  • This pull request is against develop branch (not applicable for hotfixes)
  • I have included a link to the issue on GitHub or JIRA (if any)
  • I have included migration files (if there are changes to the model classes)
  • I have included, reviewed and executed tests (unit and end2end) to complement my changes
  • I have updated the related documentation (if necessary)
  • I have updated the release notes (releasenotes.md)
  • I have added a reviewer for this pull request
  • I have added myself as an author for this pull request
  • In the case I have modified settings.py, then I have also updated the studio-settings-configmap.yaml file in serve-charts

@hamzaimran08 hamzaimran08 requested a review from a team February 8, 2024 18:25
@sandstromviktor sandstromviktor added the bug Something isn't working label Feb 9, 2024
Copy link
Contributor

@sandstromviktor sandstromviktor left a comment

Choose a reason for hiding this comment

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

Good finding Hamza. I've approved it, but also suggested a change that you can accept if you want to. Just tidyness/nitpicking.

apps/views.py Outdated
Comment on lines 93 to 96
if settings.DEBUG is True:
prod_timestamp = False
else:
prod_timestamp = True
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems a bit unnecessary to create a boolean from a boolean, then use the boolean to do boolean stuff :) I suggest remove this, and commit my suggestion from below

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah makes sense. I had it in my mind to change this in the morning, got too tired last night.

Copy link
Contributor

Choose a reason for hiding this comment

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

Understandable :)

hamzaimran08 and others added 2 commits February 9, 2024 09:47
Co-authored-by: Viktor Sandström <v.sandstrom@icloud.com>
Co-authored-by: Viktor Sandström <v.sandstrom@icloud.com>
@hamzaimran08 hamzaimran08 changed the base branch from main to develop February 9, 2024 12:06
@hamzaimran08 hamzaimran08 merged commit 3241585 into develop Feb 9, 2024
2 checks passed
@hamzaimran08 hamzaimran08 deleted the hotfix/timestamp-mismatch-logs branch February 9, 2024 12:45
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

Successfully merging this pull request may close these issues.

2 participants