[PR #3645] [MERGED] [PM-9875] Server configurations #4308

Closed
opened 2025-11-26 23:42:43 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/3645
Author: @andrebispo5
Created: 7/29/2024
Status: Merged
Merged: 7/30/2024
Merged by: @andrebispo5

Base: mainHead: pm-9875/server-configs


📝 Commits (10+)

  • 8b0549d [PM-9875] Add ConfigDiskSource to save server configurations to disk
  • e02bf0d [PM-9875] Add tests for ConfigDiskSource
  • 03296b7 [PM-9875] Refactor ConfigDisk to store a ServerConfig class
  • af4183d [PM-9875] Add ServerConfigRepository
  • 4f242dd [PM-9875] Fix ConfigDiskSourceTests mock data
  • d1367d0 [PM-9875] Add Server config disk source and repository to direct injection.
  • aa8337b [PM-9875] On environment change and active account change, reload server configurations
  • 37cd1f4 [PM-9875] Add ServerConfigRepository tests.
  • dd21b10 [PM-9875] Update EnvironmentRepository tests
  • 5d22e48 [PM-9875] Fix code formatting

📊 Changes

12 files changed (+536 additions, -1 deletions)

View changed files

📝 app/src/main/java/com/x8bit/bitwarden/BitwardenApplication.kt (+4 -0)
app/src/main/java/com/x8bit/bitwarden/data/platform/datasource/disk/ConfigDiskSource.kt (+21 -0)
app/src/main/java/com/x8bit/bitwarden/data/platform/datasource/disk/ConfigDiskSourceImpl.kt (+37 -0)
📝 app/src/main/java/com/x8bit/bitwarden/data/platform/datasource/disk/EnvironmentDiskSourceImpl.kt (+1 -1)
📝 app/src/main/java/com/x8bit/bitwarden/data/platform/datasource/disk/di/PlatformDiskModule.kt (+13 -0)
app/src/main/java/com/x8bit/bitwarden/data/platform/datasource/disk/model/ServerConfig.kt (+18 -0)
app/src/main/java/com/x8bit/bitwarden/data/platform/repository/ServerConfigRepository.kt (+21 -0)
app/src/main/java/com/x8bit/bitwarden/data/platform/repository/ServerConfigRepositoryImpl.kt (+77 -0)
📝 app/src/main/java/com/x8bit/bitwarden/data/platform/repository/di/PlatformRepositoryModule.kt (+22 -0)
app/src/test/java/com/x8bit/bitwarden/data/platform/datasource/disk/ConfigDiskSourceTest.kt (+111 -0)
app/src/test/java/com/x8bit/bitwarden/data/platform/datasource/disk/util/FakeConfigDiskSource.kt (+25 -0)
app/src/test/java/com/x8bit/bitwarden/data/platform/repository/ServerConfigRepositoryTest.kt (+186 -0)

📄 Description

🎟️ Tracking

PM-9875 - Implement fetching the /config endpoint

📔 Objective

Implement fetching and saving the server data retrieved from the /config endpoint, it will contain the server version and feature flags state.

This endpoint should be called:

  • On Account Switch
  • On Environment Switch

📸 Screenshots

https://github.com/user-attachments/assets/15011ab8-96ef-40d3-9a36-36206bf10302

Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation 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

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/3645 **Author:** [@andrebispo5](https://github.com/andrebispo5) **Created:** 7/29/2024 **Status:** ✅ Merged **Merged:** 7/30/2024 **Merged by:** [@andrebispo5](https://github.com/andrebispo5) **Base:** `main` ← **Head:** `pm-9875/server-configs` --- ### 📝 Commits (10+) - [`8b0549d`](https://github.com/bitwarden/android/commit/8b0549d5f88a095e12a8bb6fc7166cddbc2b464f) [PM-9875] Add ConfigDiskSource to save server configurations to disk - [`e02bf0d`](https://github.com/bitwarden/android/commit/e02bf0d9cbd67bcdaf934bd6b17cfdf4a54fd59c) [PM-9875] Add tests for ConfigDiskSource - [`03296b7`](https://github.com/bitwarden/android/commit/03296b7d40f48e821d74634f2aa2d80818fe03d6) [PM-9875] Refactor ConfigDisk to store a ServerConfig class - [`af4183d`](https://github.com/bitwarden/android/commit/af4183d16d2d630d396efb17e5cc0db1b0afe606) [PM-9875] Add ServerConfigRepository - [`4f242dd`](https://github.com/bitwarden/android/commit/4f242ddfc7f5fa4ae12fa9eb187ad24e8b4d3cec) [PM-9875] Fix ConfigDiskSourceTests mock data - [`d1367d0`](https://github.com/bitwarden/android/commit/d1367d0ea6380b548a3d95e358227d25dd75969e) [PM-9875] Add Server config disk source and repository to direct injection. - [`aa8337b`](https://github.com/bitwarden/android/commit/aa8337be6491c0aa9b8120b87d2d527e154bf763) [PM-9875] On environment change and active account change, reload server configurations - [`37cd1f4`](https://github.com/bitwarden/android/commit/37cd1f4eeb5583740927ea72bb4644db37c8c19c) [PM-9875] Add ServerConfigRepository tests. - [`dd21b10`](https://github.com/bitwarden/android/commit/dd21b10e75b5e9ba39e49c77ee6d489033bcd535) [PM-9875] Update EnvironmentRepository tests - [`5d22e48`](https://github.com/bitwarden/android/commit/5d22e48e9ef345bbd5ce0611433d8e9db9f80d01) [PM-9875] Fix code formatting ### 📊 Changes **12 files changed** (+536 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `app/src/main/java/com/x8bit/bitwarden/BitwardenApplication.kt` (+4 -0) ➕ `app/src/main/java/com/x8bit/bitwarden/data/platform/datasource/disk/ConfigDiskSource.kt` (+21 -0) ➕ `app/src/main/java/com/x8bit/bitwarden/data/platform/datasource/disk/ConfigDiskSourceImpl.kt` (+37 -0) 📝 `app/src/main/java/com/x8bit/bitwarden/data/platform/datasource/disk/EnvironmentDiskSourceImpl.kt` (+1 -1) 📝 `app/src/main/java/com/x8bit/bitwarden/data/platform/datasource/disk/di/PlatformDiskModule.kt` (+13 -0) ➕ `app/src/main/java/com/x8bit/bitwarden/data/platform/datasource/disk/model/ServerConfig.kt` (+18 -0) ➕ `app/src/main/java/com/x8bit/bitwarden/data/platform/repository/ServerConfigRepository.kt` (+21 -0) ➕ `app/src/main/java/com/x8bit/bitwarden/data/platform/repository/ServerConfigRepositoryImpl.kt` (+77 -0) 📝 `app/src/main/java/com/x8bit/bitwarden/data/platform/repository/di/PlatformRepositoryModule.kt` (+22 -0) ➕ `app/src/test/java/com/x8bit/bitwarden/data/platform/datasource/disk/ConfigDiskSourceTest.kt` (+111 -0) ➕ `app/src/test/java/com/x8bit/bitwarden/data/platform/datasource/disk/util/FakeConfigDiskSource.kt` (+25 -0) ➕ `app/src/test/java/com/x8bit/bitwarden/data/platform/repository/ServerConfigRepositoryTest.kt` (+186 -0) </details> ### 📄 Description ## 🎟️ Tracking <!-- Paste the link to the Jira or GitHub issue or otherwise describe / point to where this change is coming from. --> [PM-9875 - Implement fetching the /config endpoint](https://bitwarden.atlassian.net/browse/PM-9875) ## 📔 Objective <!-- Describe what the purpose of this PR is, for example what bug you're fixing or new feature you're adding. --> Implement fetching and saving the server data retrieved from the /config endpoint, it will contain the server version and feature flags state. This endpoint should be called: - On Account Switch - On Environment Switch ## 📸 Screenshots https://github.com/user-attachments/assets/15011ab8-96ef-40d3-9a36-36206bf10302 ## ⏰ Reminders before review - Contributor guidelines followed - All formatters and local linters executed and passed - Written new unit and / or integration tests where applicable - Used internationalization (i18n) for all UI strings - CI builds passed - Communicated to DevOps any deployment requirements - Updated any necessary documentation or informed the documentation team ## 🦮 Reviewer guidelines <!-- Suggested interactions but feel free to use (or not) as you desire! --> - 👍 (`:+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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-26 23:42:43 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#4308