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: harden ClientCapabilityDTO for api v7 [WPB-14882] #3151

Merged
merged 24 commits into from
Jan 9, 2025

Conversation

MohamadJaara
Copy link
Member

@MohamadJaara MohamadJaara commented Dec 6, 2024

StoryWPB-14882 [Android] harden ClientCapabilityDTO for api v7


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

make the ClientCapability accept any unknown values

Causes (Optional)

in the migration from 1pi 6 to 7 there may be a new values there

Solutions

harden the serilizer to accept unknown values

Dependencies (Optional)

If there are some other pull requests related to this one (e.g. new releases of frameworks), specify them here.

Needs releases with:

  • GitHub link to other pull request

Testing

Test Coverage (Optional)

  • I have added automated test to this contribution

How to Test

Briefly describe how this change was tested and if applicable the exact steps taken to verify that it works as expected.

Notes (Optional)

Specify here any other facts that you think are important for this issue.

Attachments (Optional)

Attachments like images, videos, etc. (drag and drop in the text box)


PR Post Submission Checklist for internal contributors (Optional)

  • Wire's Github Workflow has automatically linked the PR to a JIRA issue

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.

Copy link
Member

@vitorhugods vitorhugods left a comment

Choose a reason for hiding this comment

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

Would be nice to write a test for this serialiser.

@MohamadJaara MohamadJaara changed the title feat: harden ClientCapabilityDTO for api v7 feat: harden ClientCapabilityDTO for api v7 [WPB-14882] Dec 6, 2024
Copy link
Contributor

github-actions bot commented Dec 6, 2024

Test Results

3 386 tests  +5   3 278 ✅ +5   5m 59s ⏱️ +46s
  581 suites +1     108 💤 ±0 
  581 files   +1       0 ❌ ±0 

Results for commit 0470f0d. ± Comparison against base commit e3639ec.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Dec 6, 2024

@datadog-wireapp
Copy link

datadog-wireapp bot commented Dec 6, 2024

Datadog Report

Branch report: feat/harden-ClientCapabilityDTO-for-api-v7
Commit report: 243d4b9
Test service: kalium-jvm

✅ 0 Failed, 3278 Passed, 108 Skipped, 1m 2.7s Total Time

@yamilmedina yamilmedina enabled auto-merge December 6, 2024 22:49
@yamilmedina yamilmedina changed the base branch from develop to release/candidate December 9, 2024 10:20
@yamilmedina yamilmedina self-requested a review December 12, 2024 14:51
Copy link
Contributor

@yamilmedina yamilmedina left a comment

Choose a reason for hiding this comment

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

The tests are failing, and sounds a good idea to have for v8.
The code freeze v7 is more clear now and new types will show up only in v8+

Then we can do the usual new API response support we do. @vitorhugods @MohamadJaara what do you think?

Created a PR in the meantime, with tests for retro compat endpoint.
#3173

@MohamadJaara MohamadJaara changed the base branch from release/candidate to develop December 16, 2024 09:38
@MohamadJaara
Copy link
Member Author

@yamilmedina @vitorhugods i fixed the tests the issue was in how the row json string are generated

@codecov-commenter
Copy link

codecov-commenter commented Jan 9, 2025

Codecov Report

Attention: Patch coverage is 66.66667% with 7 lines in your changes missing coverage. Please review.

Project coverage is 54.14%. Comparing base (e3639ec) to head (0470f0d).
Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
...n/com/wire/kalium/logic/data/client/ClientModel.kt 0.00% 2 Missing ⚠️
.../com/wire/kalium/logic/data/client/ClientMapper.kt 0.00% 2 Missing ⚠️
.../wire/kalium/mocks/responses/ClientResponseJson.kt 0.00% 2 Missing ⚠️
.../network/api/authenticated/client/ClientRequest.kt 93.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3151      +/-   ##
===========================================
+ Coverage    54.13%   54.14%   +0.01%     
===========================================
  Files         1264     1264              
  Lines        36833    36852      +19     
  Branches      3738     3738              
===========================================
+ Hits         19938    19955      +17     
- Misses       15453    15457       +4     
+ Partials      1442     1440       -2     
Files with missing lines Coverage Δ
.../network/api/authenticated/client/ClientRequest.kt 21.42% <93.33%> (+21.42%) ⬆️
...n/com/wire/kalium/logic/data/client/ClientModel.kt 0.00% <0.00%> (ø)
.../com/wire/kalium/logic/data/client/ClientMapper.kt 45.60% <0.00%> (-0.51%) ⬇️
.../wire/kalium/mocks/responses/ClientResponseJson.kt 0.00% <0.00%> (ø)

... and 3 files with indirect coverage changes


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 e3639ec...0470f0d. Read the comment docs.

Copy link

sonarqubecloud bot commented Jan 9, 2025

@yamilmedina yamilmedina added this pull request to the merge queue Jan 9, 2025
Merged via the queue into develop with commit 5788184 Jan 9, 2025
23 checks passed
@yamilmedina yamilmedina deleted the feat/harden-ClientCapabilityDTO-for-api-v7 branch January 9, 2025 11:43
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.

7 participants