Fix provider setup flows#5072
Conversation
…flows # Conflicts: # tests/models/test_provider.py
Merging this PR will not alter performance
Comparing Footnotes
|
There was a problem hiding this comment.
Pull request overview
This PR improves provider setup reliability by moving “identity/target” choices (e.g., target player and advertised device name) into interactive setup flows for several receiver/connect-style providers, while keeping runtime tuning options in normal config entries and ensuring legacy configs migrate cleanly.
Changes:
- Added guided setup flows for AirPlay Receiver, Spotify Connect, AriaCast Receiver, VBAN Receiver, and FastMCP Server (Connect Wizard flow).
- Updated providers to read setup-flow-owned fields from
setup_data(viaget_setup_value) and adjusted migrations to move legacyvaluesintosetup_data. - Extended test coverage for the new flows, legacy-prefill behavior, AirPlay receiver self-detection, and multi-instance default naming.
Reviewed changes
Copilot reviewed 34 out of 34 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/providers/yandex_ynison/test_setup_flow.py | Updates setup-flow tests to submit and assert player/device identity fields. |
| tests/providers/yandex_ynison/test_config_entries.py | Adjusts expectations: identity fields are setup-flow-only, not runtime config entries. |
| tests/providers/receiver_setup_flows/test_receiver_setup_flows.py | New parametrized tests for receiver setup flows and VBAN endpoint/format collection. |
| tests/providers/receiver_setup_flows/init.py | Adds package init/docstring for new receiver flow tests. |
| tests/providers/fastmcp_server/test_setup_flow.py | Adds test ensuring MCP Connect Wizard flow finishes after callback route is hit. |
| tests/providers/fastmcp_server/test_connect_wizard.py | Adds tests for ingress-aware setup callback fragment and direct base_url URL generation; asserts wizard HTML signals completion. |
| tests/providers/airplay/test_provider.py | Extends AirPlay self-receiver filtering tests to use setup-flow-stored receiver name. |
| tests/models/test_provider.py | Adds regression test for numeric multi-instance default naming fallback. |
| tests/controllers/config/test_setup_flows.py | Asserts SetupSession.callback_path matches the expected callback route. |
| tests/controllers/config/test_migrations.py | Adds migration tests for moving new setup-flow fields into setup_data and AirPlay-specific cases. |
| music_assistant/translations/en.json | Adds/updates translation keys for the new setup flows and updated Yandex Ynison wording. |
| music_assistant/providers/yandex_ynison/strings.json | Updates setup-flow description to mention player + device naming. |
| music_assistant/providers/yandex_ynison/setup_flow.py | Adds player selector + publish name to the Ynison setup step and persists them via finish. |
| music_assistant/providers/yandex_ynison/provider.py | Reads player/device identity from setup data; removes those fields from runtime config entries. |
| music_assistant/providers/vban_receiver/strings.json | Adds setup-flow title/description keys. |
| music_assistant/providers/vban_receiver/setup_flow.py | New VBAN setup flow collecting sender/stream/format and local bind endpoint. |
| music_assistant/providers/vban_receiver/provider.py | Switches VBAN “setup” fields to setup_data reads and trims runtime config entries accordingly. |
| music_assistant/providers/spotify_connect/strings.json | Adds setup-flow title/description keys. |
| music_assistant/providers/spotify_connect/setup_flow.py | New setup flow collecting target player and advertised device name. |
| music_assistant/providers/spotify_connect/init.py | Moves identity fields to setup data, adds instance postfix based on publish name, and narrows runtime config entries. |
| music_assistant/providers/fastmcp_server/strings.json | Adds setup-flow translation keys for Connect Wizard step. |
| music_assistant/providers/fastmcp_server/setup_flow.py | New setup flow that opens wizard and completes setup via callback signaling. |
| music_assistant/providers/fastmcp_server/connect/page.py | Adds setup-callback parsing and automatic completion signaling after config/token generation. |
| music_assistant/providers/fastmcp_server/connect/actions.py | Adds setup_callback_path fragment support (ingress-aware) and validation. |
| music_assistant/providers/fastmcp_server/_init_helpers.py | Dispatch now forwards setup callback path and can use server base_url as an additional URL source. |
| music_assistant/providers/ariacast_receiver/strings.json | Adds setup-flow title/description keys. |
| music_assistant/providers/ariacast_receiver/setup_flow.py | New setup flow collecting target player. |
| music_assistant/providers/ariacast_receiver/init.py | Reads target player from setup data and trims runtime config entries accordingly. |
| music_assistant/providers/airplay/provider.py | Uses stored setup-flow receiver name when filtering own receiver adverts. |
| music_assistant/providers/airplay_receiver/strings.json | Adds setup-flow title/description keys. |
| music_assistant/providers/airplay_receiver/setup_flow.py | New setup flow collecting target player and advertised receiver name. |
| music_assistant/providers/airplay_receiver/init.py | Moves identity fields to setup data, adds instance postfix based on receiver name, and narrows runtime config entries. |
| music_assistant/models/setup_flow.py | Exposes callback_path and refactors callback_url to derive from it. |
| music_assistant/models/provider.py | Fixes default_name to use computed postfix (numeric fallback) rather than the property directly. |
| music_assistant/helpers/config_entries.py | Adds shared create_player_selector helper for consistent player dropdown creation/prefill. |
| music_assistant/controllers/config/migrations.py | Migrates newly setup-owned keys into setup_data, persists default AirPlay receiver name once, and avoids ghost cleanup for setup-flow instances. |
What does this implement/fix?
Several plugins skipped required choices during setup, leaving target players unset and multiple instances ambiguously named.
Related issue (if applicable):
Types of changes
bugfixnew-featureenhancementnew-providerbreaking-changerefactordocumentationmaintenancecidependenciesChecklist
pre-commit run --all-filespasses.pytestpasses, and tests have been added/updated undertests/where applicable.music-assistant/modelsis linked.music-assistant/frontendis linked.