Skip to content

Improve URL/realm handling for ESPProvisionProvider#32

Merged
MartinaeyNL merged 5 commits into
mainfrom
enhancement/provision-provider
May 28, 2026
Merged

Improve URL/realm handling for ESPProvisionProvider#32
MartinaeyNL merged 5 commits into
mainfrom
enhancement/provision-provider

Conversation

@ebariaux
Copy link
Copy Markdown
Contributor

No description provided.

@ebariaux ebariaux added the Enhancement Improvement of an existing feature label May 27, 2026
@ebariaux ebariaux linked an issue May 27, 2026 that may be closed by this pull request
Comment thread ORLib/ConsoleProviders/ESPProvision/DeviceConnection.swift Fixed
Comment thread ORLib/ConsoleProviders/ESPProvision/DeviceProvision.swift Fixed
@sonarqubecloud
Copy link
Copy Markdown

@MartinaeyNL MartinaeyNL self-requested a review May 28, 2026 08:57
@wborn wborn requested a review from Copilot May 28, 2026 08:57
@wborn
Copy link
Copy Markdown
Member

wborn commented May 28, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR centralizes ESP provisioning URL and realm resolution so device provisioning can use the active console realm/API URL instead of the previous hardcoded /api/master default.

Changes:

  • Adds ESPProvisionURLResolver with tests for deriving realm and API URL from current, target, base, and stored values.
  • Passes apiURL and realm through the ESP provisioning flow to backend registration and device config.
  • Updates mocks, provider tests, and Xcode project references for the new resolver/signatures.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
ORLib/ConsoleProviders/ESPProvision/ESPProvisionURLResolver.swift Adds URL/realm derivation logic for ESP provisioning.
ORLib/UI/ORViewController.swift Resolves API URL/realm at provision time and reports API URL resolution failures.
ORLib/ConsoleProviders/ESPProvision/ESPProvisionProvider.swift Changes provisioning entry point to accept explicit API URL and realm.
ORLib/ConsoleProviders/ESPProvision/DeviceProvision.swift Propagates API URL/realm into REST provisioning and device config.
ORLib/ConsoleProviders/ESPProvision/DeviceProvisionAPI.swift Accepts API URL per provisioning request instead of storing it.
ORLib/ConsoleProviders/ESPProvision/DeviceConnection.swift Forwards realm into OpenRemote config messages.
Tests/ESPProvisionURLResolverTest.swift Adds resolver coverage for realm precedence, API URL construction, and encoding.
Tests/ESPProvisionProviderTest.swift Updates provider tests for explicit API URL/realm propagation.
Tests/DeviceProvisionAPIMock.swift Records the API URL passed to provisioning.
ORLib.xcodeproj/project.pbxproj Registers the new resolver and test files in Xcode targets.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ORLib/ConsoleProviders/ESPProvision/ESPProvisionURLResolver.swift
@MartinaeyNL MartinaeyNL merged commit b8407b5 into main May 28, 2026
5 checks passed
@MartinaeyNL MartinaeyNL deleted the enhancement/provision-provider branch May 28, 2026 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement Improvement of an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improvements on URL/realm handling for ESPProvisionProvider

5 participants