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

[BWA-86] Debug Menu #1 - network layer #272

Merged
merged 8 commits into from
Nov 18, 2024

Conversation

andrebispo5
Copy link
Contributor

🎟️ Tracking

https://bitwarden.atlassian.net/browse/BWA-86

📔 Objective

In order to have the debug menu we first need to bring over the network layer from the main app to be able to fetch server config that contain remote feature flags.

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

Copy link

codecov bot commented Nov 4, 2024

Codecov Report

Attention: Patch coverage is 79.87013% with 31 lines in your changes missing coverage. Please review.

Project coverage is 39.00%. Comparing base (abbf656) to head (e7bb0dc).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ata/platform/datasource/network/core/ResultCall.kt 45.45% 17 Missing and 1 partial ⚠️
...epository/util/EnvironmentUrlDataJsonExtensions.kt 79.41% 1 Missing and 6 partials ⚠️
...atasource/network/core/ResultCallAdapterFactory.kt 44.44% 1 Missing and 4 partials ⚠️
...tasource/network/interceptor/BaseUrlInterceptor.kt 95.45% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #272      +/-   ##
==========================================
+ Coverage   37.77%   39.00%   +1.22%     
==========================================
  Files          99      108       +9     
  Lines        5294     5448     +154     
  Branches      606      633      +27     
==========================================
+ Hits         2000     2125     +125     
- Misses       3151     3168      +17     
- Partials      143      155      +12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@andrebispo5 andrebispo5 marked this pull request as ready for review November 4, 2024 15:23
* Default [EnvironmentUrlDataJson] for the US region as written to disk by the legacy
* Xamarin app.
*/
val DEFAULT_LEGACY_US: EnvironmentUrlDataJson = EnvironmentUrlDataJson(
Copy link
Contributor

Choose a reason for hiding this comment

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

DEFAULT_LEGACY_US and DEFAULT_LEGACY_EU shouldn't be needed since we're not migrating legacy urls from anywhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yap you are right

* A [Call] for wrapping a network request into a [Result].
*/
@Suppress("TooManyFunctions")
class ResultCall<T>(
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we annotate with OmitFromCoverage? I don't see tests for this in the PM app either.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ye for sure maybe we should do it the main app as well

Copy link
Contributor

github-actions bot commented Nov 12, 2024

Logo
Checkmarx One – Scan Summary & Details6cf4499e-831b-4604-bd60-cf55e609cc5e

No New Or Fixed Issues Found

SaintPatrck
SaintPatrck previously approved these changes Nov 15, 2024
Copy link
Contributor

@SaintPatrck SaintPatrck left a comment

Choose a reason for hiding this comment

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

I see some members we're probably not going to use. Since this is more or less copied from the main app and we plan to consolidate things later, I'll leave it up to if you want to remove them or not.

Comment on lines 26 to 34
/**
* An interceptor for "/identity" calls.
*/
val identityInterceptor: BaseUrlInterceptor = BaseUrlInterceptor()

/**
* An interceptor for "/events" calls.
*/
val eventsInterceptor: BaseUrlInterceptor = BaseUrlInterceptor()
Copy link
Contributor

Choose a reason for hiding this comment

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

⛏️ These will not be used since we're only communicating with the config endpoint.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ye I'll remove them doesn't make sense for them to be here at this point

@andrebispo5 andrebispo5 merged commit 5b53b50 into main Nov 18, 2024
9 checks passed
@andrebispo5 andrebispo5 deleted the bwa-86/network-layer-retrofit branch November 18, 2024 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants