Skip to content

chore(logging): guarantee app metadata in log files [WPB-8645] 🍒 #3906

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

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Mar 6, 2025

This PR was automatically cherry-picked based on the following PR:

Original PR description:


EpicWPB-8645 [Android] Infrastructure code and developer experience


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

Most of the times, we don't get basic app information when reading the log files.

Causes

We launch an async coroutine that will initialise the LogFileWriter, and immediately log basic app information, like App version, OS version, Phone model, Commit hash, etc.

Solutions

Make it so that LogFileWriter.start() suspends until it actually starts. Then we can start printing basic information.

This is done by waiting for the first log lines to come before completing the LogFileWriter.start.


PR Post Merge Checklist for internal contributors

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

@github-actions github-actions bot added cherry-pick PR is cherry-picking changes from another banch size/XS labels Mar 6, 2025
@vitorhugods vitorhugods enabled auto-merge March 7, 2025 00:16
Copy link

sonarqubecloud bot commented Mar 7, 2025

@vitorhugods vitorhugods added this pull request to the merge queue Mar 7, 2025
@codecov-commenter
Copy link

codecov-commenter commented Mar 7, 2025

Codecov Report

Attention: Patch coverage is 0% with 11 lines in your changes missing coverage. Please review.

Project coverage is 45.55%. Comparing base (a7d84f0) to head (023ea6d).
Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
...main/kotlin/com/wire/android/util/LogFileWriter.kt 0.00% 6 Missing ⚠️
...in/com/wire/android/ui/debug/UserDebugViewModel.kt 0.00% 5 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3906      +/-   ##
===========================================
- Coverage    45.56%   45.55%   -0.02%     
===========================================
  Files          491      491              
  Lines        17064    17069       +5     
  Branches      2846     2846              
===========================================
  Hits          7776     7776              
- Misses        8495     8500       +5     
  Partials       793      793              
Files with missing lines Coverage Δ
...in/com/wire/android/ui/debug/UserDebugViewModel.kt 0.00% <0.00%> (ø)
...main/kotlin/com/wire/android/util/LogFileWriter.kt 0.00% <0.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a7d84f0...023ea6d. Read the comment docs.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Merged via the queue into develop with commit 73492b0 Mar 7, 2025
11 of 12 checks passed
@vitorhugods vitorhugods deleted the chore/logs/guarantee-app-metadata-in-log-files-cherry-pick branch March 7, 2025 16:27
Copy link
Contributor Author

github-actions bot commented Mar 7, 2025

Built wire-android-staging-compat-pr-3906.apk is available for download

Copy link
Contributor Author

github-actions bot commented Mar 7, 2025

Built wire-android-dev-debug-pr-3906.apk is available for download

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick PR is cherry-picking changes from another banch size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants