Skip to content

fix: Pin docutils<=0.21.2 to fix rst2ansi incompatibility #3914

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

Merged
merged 4 commits into from
Aug 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/feature_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Set up uv
uses: SFDO-Tooling/setup-uv@main
with:
version: "0.5.0"
version: "0.8.4"
enable-cache: true
- name: Install dependencies
run: uv sync --group docs
Expand All @@ -56,7 +56,7 @@ jobs:
- name: Set up uv
uses: SFDO-Tooling/setup-uv@main
with:
version: "0.5.0"
version: "0.8.4"
enable-cache: true
- name: Install dependencies
run: uv sync -p ${{ matrix.python-version }}
Expand All @@ -80,7 +80,7 @@ jobs:
- name: Set up uv
uses: SFDO-Tooling/setup-uv@main
with:
version: "0.5.0"
version: "0.8.4"
enable-cache: true
- name: Install dependencies
run: uv sync --all-extras -p ${{ matrix.python-version }}
Expand All @@ -99,7 +99,7 @@ jobs:
- name: Set up uv
uses: SFDO-Tooling/setup-uv@main
with:
version: "0.5.0"
version: "0.8.4"
enable-cache: true
- name: Install dependencies
run: uv sync -p 3.11
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_test_sfdx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- name: Set up uv
uses: SFDO-Tooling/setup-uv@main
with:
version: "0.5.0"
version: "0.8.4"
enable-cache: true
- name: Install Python dependencies
run: uv sync
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/slow_integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Set up uv
uses: SFDO-Tooling/setup-uv@main
with:
version: "0.5.0"
version: "0.8.4"
enable-cache: true
- name: Install dependencies
run: uv sync -p 3.11
Expand Down
20 changes: 20 additions & 0 deletions cumulusci/cli/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,25 @@ def list_commands(self, ctx):
services = self._get_services_config(runtime)
return sorted(services.keys())

def invoke(self, ctx):
"""Override to show available services instead of 'Missing command' error"""
try:
return super().invoke(ctx)
except click.UsageError as e:
if "Missing command" in str(e):
# No subcommand provided - list available services
services = self.list_commands(ctx)
if services:
click.echo("Available services:")
for service in services:
click.echo(f" {service}")
else:
click.echo("No services available to configure.")
return
else:
# Re-raise other usage errors
raise

def _build_param(self, attribute: str, details: dict) -> click.Option:
required = details.get("required", False)
default_factory: Optional[Callable] = self._get_callable_default(
Expand Down Expand Up @@ -267,6 +286,7 @@ def callback(*args, **kwargs):
cls=ConnectServiceCommand,
name="connect",
help="Connect an external service to CumulusCI",
no_args_is_help=False,
)
def service_connect():
pass
Expand Down
27 changes: 15 additions & 12 deletions cumulusci/cli/tests/test_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,10 @@ def test_service_connect__attr_with_default_value():
# but input of an empty line accepts the default.
assert "attr (example) [PRESET]: " in result.output
service_config = runtime.keychain.get_service("test", "test-alias")
with mock.patch(
"cumulusci.core.config.base_config.STRICT_GETATTR", False
), pytest.warns(DeprecationWarning, match="attr"):
with (
mock.patch("cumulusci.core.config.base_config.STRICT_GETATTR", False),
pytest.warns(DeprecationWarning, match="attr"),
):
assert service_config.lookup("attr") == "PRESET"
assert service_config.attr == "PRESET"

Expand All @@ -132,9 +133,10 @@ def test_service_connect__attr_with_default_factory():

# The service should have the attribute value returned by the default factory.
service_config = runtime.keychain.get_service("test", "test-alias")
with mock.patch(
"cumulusci.core.config.base_config.STRICT_GETATTR", False
), pytest.warns(DeprecationWarning, match="attr"):
with (
mock.patch("cumulusci.core.config.base_config.STRICT_GETATTR", False),
pytest.warns(DeprecationWarning, match="attr"),
):
assert service_config.lookup("attr") == "CALCULATED"
assert service_config.attr == "CALCULATED"

Expand All @@ -155,13 +157,14 @@ def test_service_connect__alias_already_exists():
"test-type",
"already-exists",
runtime=runtime,
input="new\ny\n",
input="new\ny\nn\n",
)

service_config = runtime.keychain.get_service("test-type", "already-exists")
with mock.patch(
"cumulusci.core.config.base_config.STRICT_GETATTR", False
), pytest.warns(DeprecationWarning, match="attr"):
with (
mock.patch("cumulusci.core.config.base_config.STRICT_GETATTR", False),
pytest.warns(DeprecationWarning, match="attr"),
):
assert service_config.lookup("attr") == "new"
assert service_config.attr == "new"

Expand Down Expand Up @@ -536,7 +539,7 @@ def test_service_connect__connected_app():
"connect",
"connected_app",
"new",
input="\n\nID\nSECRET\n",
input="\n\nID\nSECRET\nn\n",
runtime=runtime,
)

Expand All @@ -559,7 +562,7 @@ def test_service_connect__connected_app__with_cli_options():
"new",
"--login_url",
"https://custom",
input="\nID\nSECRET\n", # not prompted for login_url
input="\nID\nSECRET\nn\n", # not prompted for login_url
runtime=runtime,
)

Expand Down
2 changes: 1 addition & 1 deletion cumulusci/cli/tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def run_click_command(cmd, *args, **kw):

def run_cli_command(*args, runtime=None, input=None, **kw):
"""Run a click command with arg parsing and injected CCI runtime object."""
runner = CliRunner(mix_stderr=False)
runner = CliRunner()
result = runner.invoke(
cli,
args,
Expand Down
4 changes: 3 additions & 1 deletion cumulusci/tests/test_integration_infrastructure.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,15 @@ def _capture_orgid_using_task():

class TestIntegrationInfrastructure:
"Test our two plugins for doing integration testing"

remembered_cli_specified_org_id = None

@pytest.mark.vcr()
def test_prepare_for__test_integration_tests(
self, create_task, run_code_without_recording
):
"Delete a VCR Cassette to ensure next test creates it."

# only delete the cassette if we can replace it
def delete_cassette():
if first_cassette.exists():
Expand Down Expand Up @@ -81,7 +83,7 @@ def setup():

run_code_without_recording(setup)

def test_file_was_not_created(self, capture_orgid_using_task):
def test_file_was_not_created(self):
filename = (
Path(__file__).parent
/ "cassettes/TestIntegrationInfrastructure.test_run_code_without_recording.yaml"
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ dependencies = [
"simple-salesforce==1.11.4",
"snowfakery>=4.0.0",
"xmltodict",
"docutils>=0.21.2",
"docutils<=0.21.2",
]

[dependency-groups]
Expand Down
Loading
Loading