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

feat(sync): pull feature flags when online [WPB-5403] #2208

Conversation

vitorhugods
Copy link
Member

@vitorhugods vitorhugods commented Nov 8, 2023


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

On big teams, the user may not be notified when feature flags change.

Causes

Backend limitation.

Solutions

Fetch every 1h or so, when becoming online.

Rely on similar mechanisms that we already have for uploading keypackages and prekeys, for example: observe incremental sync status.

This way, when the app becomes online, it will fetch the feature configs if:

  • The app was killed and reopened, or
  • The last feature configs fetch was more than 1h ago

Testing

Test Coverage

  • I have added automated test to this contribution

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.

On big teams, the user may not be notified when feature flags change, so we need to manually pull this information from the backend.
@vitorhugods vitorhugods enabled auto-merge (squash) November 8, 2023 14:05
…ureConfig/FeatureFlagsSyncWorker.kt

Co-authored-by: Yamil Medina <yamilmedina@users.noreply.github.com>
Copy link
Contributor

github-actions bot commented Nov 8, 2023

Unit Test Results

   413 files     413 suites   23s ⏱️
2 269 tests 2 149 ✔️ 120 💤 0

Results for commit 469c4ac.

♻️ This comment has been updated with latest results.

@codecov-commenter
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (release/candidate@2ae885d). Click here to learn what that means.
The diff coverage is n/a.

@@                 Coverage Diff                  @@
##             release/candidate    #2208   +/-   ##
====================================================
  Coverage                     ?   58.21%           
  Complexity                   ?       21           
====================================================
  Files                        ?     1011           
  Lines                        ?    37770           
  Branches                     ?     3440           
====================================================
  Hits                         ?    21986           
  Misses                       ?    14317           
  Partials                     ?     1467           

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 2ae885d...469c4ac. Read the comment docs.

@vitorhugods vitorhugods merged commit bb40497 into release/candidate Nov 8, 2023
14 checks passed
@vitorhugods vitorhugods deleted the feat/pull-team-configs-and-feature-flags-when-online branch November 8, 2023 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants