Skip to content

fix(sunbeam-python): skip endpoint prompt when manifest omits optional endpoints field - #908

Open
RaphaSilva470 wants to merge 5 commits into
canonical:mainfrom
RaphaSilva470:fix/endpoints-prompt-with-manifest
Open

RaphaSilva470 wants to merge 5 commits into
canonical:mainfrom
RaphaSilva470:fix/endpoints-prompt-with-manifest

Conversation

@RaphaSilva470

@RaphaSilva470 RaphaSilva470 commented Aug 26, 2026 •

Copy link
Copy Markdown

During a manifest install where you don't provide core.config.endpoints (as its optional as per https://canonical-openstack.readthedocs-hosted.com/en/latest/reference/manifest-file-reference/) it prompts for y/n, when it should use the default configuration.
This PR fixes the behavior by only firing the prompt when the manifest is not supplied and --accept-defaults is not passed. In case there is a manifest it uses the value passed by the manifest or use the default value (in case core.config.endpoints is not specified).

Assisted-By: Gemini Flash

Closes-bug: 2156599

The tests can be found in tests/unit/sunbeam/steps/test_openstack.py. There are 4 tests that cover all cases:
No manifest provided, prompts. (unchanged behaviour).
Manifest provided with no core.config.endpoints, does not prompt.
Manifest provided with core.config.endpoints, does not prompt.
--accept-defaults passed, does not prompt.

pytest tests/unit/sunbeam/steps/test_openstack.py::TestEndpointsConfigurationStepPrompt -v

For manual reproduction:
sunbeam cluster bootstrap --role compute,control,storage -m ./manifest.yaml

@RaphaSilva470
RaphaSilva470 force-pushed the fix/endpoints-prompt-with-manifest branch from c636f37 to ec8dd17 Compare August 26, 2026 20:32
@hmlanigan

Copy link
Copy Markdown

Resolving a question on the bug as to whether --accept-defaults flag works before reviewing further.

Comment thread sunbeam-python/tests/unit/sunbeam/steps/test_openstack.py Outdated
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