Skip to content

tentacle: python-common: multi-line for yaml - #68579

Merged
batrick merged 1 commit into
ceph:tentaclefrom
timqn22:tentacle-backport
Jul 11, 2026
Merged

batrick merged 1 commit into
ceph:tentaclefrom
timqn22:tentacle-backport

Conversation

@timqn22

@timqn22 timqn22 commented Apr 23, 2026 •

Copy link
Copy Markdown
Contributor

Backport of #68034

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

Currently when running the command ceph orch ls --export
multi-line strings are processed using default interpretation
meaning they could be printed with quotations instead of
the expected | . This causes a hassle for users who want to
copy their specifications to new yaml files as they have to
manually modify the yaml to remove the quotes and add | .
My code fixes this by modifying the yaml representer to
check for multi-line strings and wrapping them in a
YamlLiteralString class which will mark the multi-line string
to be processed with | . I've also added unit tests.

Signed-off-by: Timothy Q Nguyen <[email protected]>
(cherry picked from commit 0a73f68)
@timqn22
timqn22 requested a review from a team as a code owner April 23, 2026 21:54
@github-actions github-actions Bot added this to the tentacle milestone Apr 23, 2026
@rkachach

Copy link
Copy Markdown
Contributor

jenkins test api

@batrick batrick modified the milestones: tentacle, v20.2.2 Apr 28, 2026
@batrick batrick added releng-audit-queue Release engineering: queued for backport verification audit. releng-audit-fail Release engineering: failed backport verification audit. releng-audit-pass Release engineering: passed backport verification audit. and removed pdonnell-tentacle-RFA releng-audit-queue Release engineering: queued for backport verification audit. releng-audit-fail Release engineering: failed backport verification audit. labels Apr 28, 2026
@batrick batrick removed the releng-audit-pass Release engineering: passed backport verification audit. label May 15, 2026
@batrick batrick modified the milestones: v20.2.2, v20.2.3 May 15, 2026
github-actions[bot]

This comment was marked as outdated.

@github-actions github-actions Bot added the releng-audit-fail Release engineering: failed backport verification audit. label May 15, 2026
@yuriw

yuriw commented May 19, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to wip-yuri2-testing-2026-04-27-1438-tentacle.

@yuriw

yuriw commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to wip-yuri10-testing-20260622.213727-tentacle.

@lee-j-sanders

Copy link
Copy Markdown
Member

@batrick batrick removed the releng-audit-fail Release engineering: failed backport verification audit. label Jul 11, 2026
github-actions[bot]

This comment was marked as outdated.

@github-actions github-actions Bot added the releng-audit-fail Release engineering: failed backport verification audit. label Jul 11, 2026
@batrick batrick removed the releng-audit-fail Release engineering: failed backport verification audit. label Jul 11, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Automated Backport Parity Review - Backport Deviation Alert

A conflict or unapproved deviation was detected during the simulation of this backport. The code in this PR does not match a clean cherry-pick of the upstream commits.

Deviation in Backport 8cb5269 (cherry-pick of 0a73f68)

Affected File(s)

Range Diff

Click to expand
--- Original (0a73f686)
+++ Backport (8cb52696)
@@ -12,3 +12,4 @@
 to be processed with | . I've also added unit tests.
 
 Signed-off-by: Timothy Q Nguyen <[email protected]>
+(cherry picked from commit 0a73f686c8734e6545fef48275af56502300a4e7)

================================================================================
RANGE DIFF
================================================================================

1:  0a73f686c87 ! 1:  8cb526961c0 python-common: multi-line for yaml
    @@ Commit message
         to be processed with | . I've also added unit tests.
     
         Signed-off-by: Timothy Q Nguyen <[email protected]>
    +    (cherry picked from commit 0a73f686c8734e6545fef48275af56502300a4e7)
     
      ## src/python-common/ceph/deployment/service_spec.py ##
     @@ src/python-common/ceph/deployment/service_spec.py: def handle_type_error(method: FuncT) -> FuncT:
    @@ src/python-common/ceph/tests/test_service_spec.py: from ceph.deployment.service_
      )
      from ceph.deployment.drive_group import DriveGroupSpec
      from ceph.deployment.hostspec import SpecValidationError
    -@@ src/python-common/ceph/tests/test_service_spec.py: def test_non_osd_services_do_not_get_default_termination_if_not_provided(spec_da
    - 
    -     spec_section = j.get('spec', {})
    -     assert 'termination_grace_period_seconds' not in spec_section
    +@@ src/python-common/ceph/tests/test_service_spec.py: def test_extra_args_handling(y, ec_args, ee_args, ec_final_args, ee_final_args):
    +         for args in spec_obj.extra_entrypoint_args:
    +             ee_res.extend(args.to_args())
    +         assert ee_res == ee_final_args
    ++
     +
     +def test_yaml_literal_string_class_represents_multiline_strings_as_literal():
     +    multiline_string = "test1\ntest2\n"
    @@ src/python-common/ceph/tests/test_service_spec.py: def test_non_osd_services_do_
     +
     +    assert dumped.startswith('|')
     +
    ++
     +def test_yaml_representer_can_handle_multiline_strings_for_export():
     +    spec_data = """
     +service_type: iscsi

How to proceed:

  • Authors (Genuine Conflicts): If this is a genuine conflict requiring manual resolution, ensure your resolution is correct. You must explain the conflict resolution in the commit message (e.g., leave the standard Git Conflicts: block intact) and include an explanation for changes.
  • Authors (Need Help?): Reach out to the Component Lead for technical guidance on complex code conflicts.
  • Component Leads (Review): Please review the Range Diff(s) above to verify the author's manual conflict resolution is correct for this release branch. If the deviation is intentional, documented, and approved then the component lead or @ceph/ceph-release-manager can bypass this check by commenting /audit override.

Be familiar with the rules and guidelines for writing backports.


Commit Parity Visualizer

BACKPORT PR #68579 SOURCE PR SOURCE STATUS
8cb5269 python-common: multi-line for yaml PR #68034 0a73f68 python-common: multi-line for yaml

🛟 Need Help?

If you need technical help resolving these issues, please consult with the Component Lead. If you need administrative overrides, please see the #ceph-upstream-releases channel on Slack and request a review from the @ceph/ceph-release-manager.

📋 Component Lead / Release Manager

To override the audit failure, apply releng-audit-override label or comment /audit override.


⚠️ Note: Automated audit checks will be suspended on future pushes to prevent comment spam while you work.

When you are ready for a new audit, please remove the releng-audit-fail label or comment /audit retest.

CI Run Log: View Workflow Details

@github-actions github-actions Bot added the releng-audit-fail Release engineering: failed backport verification audit. label Jul 11, 2026
@github-actions github-actions Bot removed the releng-audit-fail Release engineering: failed backport verification audit. label Jul 11, 2026
@batrick
batrick merged commit d1fc748 into ceph:tentacle Jul 11, 2026
17 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants