Skip to content

[logic] Preserve single-line expressions in az logic workflow show -o yaml#10033

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/issue-31982-fix-unexpected-line-break
Draft

[logic] Preserve single-line expressions in az logic workflow show -o yaml#10033
Copilot wants to merge 2 commits into
mainfrom
copilot/issue-31982-fix-unexpected-line-break

Conversation

Copilot AI commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

az logic workflow show --resource-group <rg> --name <workflow> --output yaml

  • Problem

    • logic workflow show -o yaml was folding long workflow expression strings, introducing line breaks inside values such as definition.actions.*.inputs.
  • Change

    • Command override: register a custom logic workflow show implementation in azext_logic.custom instead of using the generated default output path.
    • YAML serialization: for --output yaml only, serialize with wrapping disabled and return raw text so long Logic Apps expressions stay on one line.
    • Scope control: leave non-YAML output unchanged.
    • Regression coverage: add a focused unit test for long expression rendering and non-YAML pass-through.
def _format_workflow_show_output(cli_ctx, result):
    if cli_ctx.invocation.data.get("output") != "yaml":
        return result
    cli_ctx.invocation.data["output"] = "tsv"
    return yaml.safe_dump(
        result,
        default_flow_style=False,
        allow_unicode=True,
        sort_keys=False,
        width=2147483647,
    ).rstrip()

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (azdev required; see .azure-pipelines/templates/azdev_setup.yml for the install command until azdev==0.2.11b1 is on PyPI)
  • My extension version conforms to the Extension version schema

For new extensions:

About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update src/index.json automatically.
You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify src/index.json.

@azure-client-tools-bot-prd

azure-client-tools-bot-prd Bot commented Jun 23, 2026

Copy link
Copy Markdown
️✔️Azure CLI Extensions Breaking Change Test
️✔️Non Breaking Changes

@azure-client-tools-bot-prd

Copy link
Copy Markdown

Hi @copilot,
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in setup.py as well.

Copilot AI changed the title [WIP] Fix unexpected line break in az logic workflow output [logic] Preserve single-line expressions in az logic workflow show -o yaml Jun 23, 2026
Copilot AI requested a review from a0x1ab June 23, 2026 04:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Auto-Assign Auto assign by bot Logic App

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants