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

Relay configuration interface #6721

Merged
merged 5 commits into from
Dec 14, 2023
Merged

Relay configuration interface #6721

merged 5 commits into from
Dec 14, 2023

Conversation

adriansmares
Copy link
Contributor

@adriansmares adriansmares commented Nov 24, 2023

Summary

References #6728

Changes

  • Decouple relay parameters (i.e. what is inside the MAC state current/desired parameters) from relay settings (i.e. what sits inside the MAC settings) in the API.
    • This makes concepts such as MAC profiles and defaults easier to execute upon - the parameters are always fully instantiated, while MAC settings can still be partial to a small extent. It also serves as a very trivial space saving measure when defaults are used.
  • Add the relay configuration service. It allows both configuring the relay (to serve other devices, or to be served by a relay), and configuring the uplink forwarding rules (i.e. which devices are attached to the relay).
    • It allows basic CRUD operations for the relay configuration of an end device.
    • It does automagic functionality for the caller, such as automatically retrieving the session key ID for the served end devices, retroactively affecting existing sessions and pending sessions.
    • Updates are guaranteed to be atomic by the server, which is not achievable for the uplink forwarding rules otherwise.
    • The validation follows the proposed format from Refactor Network Server end device registry Set method validation #6732 , as a preview of how this would work in practice.
    • The CRUD is actually separating Create from Update, as opposed to our usual Set methods, in order to create semantic clarity.

Testing

Local testing with Postman. A subsequent PR will add the associated CLI for this new service, along with extra unit testing.

No manual testing will be required for this PR - the CLI will be the good way to test this manually.

Regressions

The new settings message is binary compatible with the old parameter message, although two fields (the backoff and the default channel index) have had their format change (from uint32 to UInt32Value) - this is fine as this API and functionality were never released officially nor are the two fields extremely important for already registered relay-enabled devices.

Checklist

  • Scope: The referenced issue is addressed, there are no unrelated changes.
  • Compatibility: The changes are backwards compatible with existing API, storage, configuration and CLI, according to the compatibility commitments in README.md for the chosen target branch.
  • Documentation: Relevant documentation is added or updated.
  • The steps/process to test this feature are clearly explained including testing for regressions.
  • Changelog: Significant features, behavior changes, deprecations and fixes are added to CHANGELOG.md.
  • Commits: Commit messages follow guidelines in CONTRIBUTING.md, there are no fixup commits left.

@adriansmares adriansmares added this to the v3.28.2 milestone Nov 24, 2023
@adriansmares adriansmares self-assigned this Nov 24, 2023
@github-actions github-actions bot added c/network server This is related to the Network Server compat/db This could affect Database compatibility labels Nov 24, 2023
@github-actions github-actions bot added the ui/web This is related to a web interface label Nov 24, 2023
@adriansmares adriansmares force-pushed the feature/relay-interface branch 3 times, most recently from 8da04c3 to a844491 Compare November 30, 2023 09:08
@adriansmares adriansmares force-pushed the feature/relay-interface branch 8 times, most recently from 2d9a83a to 2def70c Compare December 8, 2023 11:36
@adriansmares adriansmares force-pushed the feature/relay-interface branch 4 times, most recently from 590bb2f to 7cfd7d8 Compare December 8, 2023 18:57
@github-actions github-actions bot removed the compat/db This could affect Database compatibility label Dec 11, 2023
@adriansmares adriansmares modified the milestones: v3.28.2, v3.29.0 Dec 11, 2023
@adriansmares adriansmares marked this pull request as ready for review December 11, 2023 11:48
@adriansmares adriansmares requested a review from a team as a code owner December 11, 2023 11:48
@adriansmares adriansmares changed the base branch from v3.28 to v3.29 December 12, 2023 13:31
Copy link
Member

@johanstokking johanstokking left a comment

Choose a reason for hiding this comment

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

LGTM but can we expand the scope of #6728 at least to include a client, i.e. CLI? And file an issue for Console support?

@adriansmares adriansmares merged commit df10f46 into v3.29 Dec 14, 2023
14 of 16 checks passed
@adriansmares adriansmares deleted the feature/relay-interface branch December 14, 2023 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/network server This is related to the Network Server ui/web This is related to a web interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants