Skip to content

Conversation

@jullianm
Copy link
Contributor

@jullianm jullianm commented Dec 23, 2025

TaskWPB-22364 [iOS] Support backend url configuration from feature flag settings

Issue

This PR introduces API v14 which is required to fetch wire cells backend URL from a newly introduced feature config.

A key change in this PR is to resolve the cells server URL dynamically since we now get its value after pulling all the resources during initial sync.

To avoid dealing with optionals in many parts of the codebase and keep the structure as close as it is currently, the solution was to inject a URL resolver closure in the factory which will be invoked at runtime by the RestAPI and the AWSClient.

Note: at the time of this PR, API v14 is still under development

Testing

  • on dev env (IMAI), fresh launch the app with API v13 or below, cells related features should be hidden to the user.
  • open dev tool, set preferred API version to 14, open the app again, cells features should now be visible.

Checklist

  • Title contains a reference JIRA issue number like [WPB-XXX].
  • Description is filled and free of optional paragraphs.
  • Adds/updates automated tests.

UI accessibility checklist

If your PR includes UI changes, please utilize this checklist:

  • Make sure you use the API for UI elements that support large fonts.
  • All colors are taken from WireDesign.ColorTheme or constructed using WireDesign.BaseColorPalette.
  • New UI elements have Accessibility strings for VoiceOver.

@jullianm jullianm marked this pull request as ready for review December 29, 2025 13:23
@github-actions
Copy link
Contributor

github-actions bot commented Dec 29, 2025

Test Results

    5 files    757 suites   7m 25s ⏱️
5 288 tests 5 261 ✅ 27 💤 0 ❌
5 289 runs  5 262 ✅ 27 💤 0 ❌

Results for commit 3f877eb.

♻️ This comment has been updated with latest results.

@jullianm jullianm requested review from a team, KaterinaWire and samwyndham and removed request for a team December 30, 2025 13:36
Copy link
Contributor

@samwyndham samwyndham left a comment

Choose a reason for hiding this comment

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

Nice work. I've added a comment for a small change to do in the AWS client. Feel free to discuss.

return signed.absoluteString
}

private func makeS3Client() async throws -> any S3ClientProtocol {
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion / issue: I'm not sure it's safe to have multiple S3 clients. Luckily I think the AWS SDK already provides a way to lazily provide the endpoint. See that the config can optionally take an EndpointResolver instead of an endpoint. We are doing something similar to lazily provide the access token using CredentialIdentityResolver. If you haven't already done so, please give that a try instead of creating a new S3 client each time


public extension Feature {

struct CellsInternal: Codable {
Copy link
Contributor

Choose a reason for hiding this comment

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

question: What does internal mean here ?

public struct Config: Codable {
public let backend: Backend

public init(backend: Backend = .init(url: nil)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Question: Why is the default needed here?

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.

3 participants