Skip to content

doc: fix formatting in mirroring task #16547

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

msahihi
Copy link

@msahihi msahihi commented May 29, 2025

Description

Corrected improper formatting in bash code snippets within the Creating a default routing policy and Mirroring traffic to httpbin-v2 sections. Previously, copy-pasting these snippets would result in parsing errors like

error: error parsing STDIN: error converting YAML to JSON: yaml: line 6: did not find expected key. 

This prevents users from directly using the provided examples.

Screenshot 2025-05-29 at 19 52 01

This PR ensures the commands are directly usable.

Reviewers

  • Ambient
  • Docs
  • Installation
  • Networking
  • Performance and Scalability
  • Extensions and Telemetry
  • Security
  • Test and Release
  • User Experience
  • Developer Infrastructure
  • Localization/Translation

@msahihi msahihi requested a review from a team as a code owner May 29, 2025 18:03
@istio-policy-bot
Copy link

😊 Welcome! This is either your first contribution to the Istio documentation repo, or
it's been a while since you've been here. A few things you should know:

  • You can learn about how we write and maintain documentation, our style guidelines,
    and the available web site features by visiting Contributing to the Docs.

  • In the next few minutes, an automatic preview of your change will be built with
    a full copy of the istio.io website. You can find this preview by clicking on
    the Details link next to the deploy/netlify entry in the status section of this
    page.

  • We care about quality, so we've put in place a number of checks to ensure our documentation
    is top-notch. We do spell checking, sanitize the Markdown, ensure all hyperlinks point to a
    valid location, and more. If your PR doesn't pass one of these checks, you'll see a red X in the
    lint_istio.io entry in the status section. Click on the Details link to get a list of the
    problems with your PR. Fix those problems and push an update; this will automatically re-run the
    tests. Hopefully this time everything will be perfect!

  • Once your changes are accepted and merged into the repository, they will initially show up
    on https://preliminary.istio.io. The changes will be published to https://istio.io
    the next time we do a major release (which typically happens every 3 months or so).
    To publish them sooner, add a cherrypick/release-x.xx label, where x.xx is the current
    release of Istio.

Thanks for contributing!

Courtesy of your friendly welcome wagon.

@istio-testing istio-testing added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-ok-to-test labels May 29, 2025
@istio-testing
Copy link
Contributor

Hi @msahihi. Thanks for your PR.

I'm waiting for a istio member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@msahihi
Copy link
Author

msahihi commented May 29, 2025

Changes are validated in https://deploy-preview-16547--preliminary-istio.netlify.app

Screenshot 2025-05-29 at 20 29 09
Screenshot 2025-05-29 at 20 29 05

Copy link
Member

@Arhell Arhell left a comment

Choose a reason for hiding this comment

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

/ok-to-test

@istio-testing istio-testing added ok-to-test Set this label allow normal testing to take place for a PR not submitted by an Istio org member. and removed needs-ok-to-test labels May 30, 2025
Copy link
Member

@dhawton dhawton left a comment

Choose a reason for hiding this comment

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

This breaks the formatting of the page and does not actually change the copied text. I'm not sure how you're utilizing clipboard to get different text, but using both highlight + CTRL+C or the inline copy button added to the codeblock results in properly formatted scripts.

Look at how your changes break the style of the page between 3. Deploy the curl workload you’ll use to send requests to the httpbin service: and 3. Deploy the httpbin Kubernetes service: (your removal of the indents is also breaking the ordered numbering).

@msahihi
Copy link
Author

msahihi commented Jun 1, 2025

Thank you for the feedback.

This breaks the formatting of the page and does not actually change the copied text

I am checking https://deploy-preview-16547--preliminary-istio.netlify.app/latest/docs/tasks/traffic-management/mirroring/ and it is perfectly working. Code format for Creating a default routing policy &Mirroring traffic to httpbin-v2 is fixed.
Is your observation different ?

I'm not sure how you're utilizing clipboard to get different text, but using both highlight + CTRL+C or the inline copy button added to the codeblock results in properly formatted scripts.

On macOS, the Copy to clipboard button is not working as expected for me in either Safari or Chrome. It copies the rendered text with a broken format.

Look at how your changes break the style of the page between 3. Deploy the curl workload you’ll use to send requests to the httpbin service: and 3. Deploy the httpbin Kubernetes service: (your removal of the indents is also breaking the ordered numbering).

Not sure how I borked the format. This is the same format as the published one. Checking the published mirroring task I can see both 3. Deploy the httpbin Kubernetes service: and 3. Deploy the curl workload you’ll use to send requests to the httpbin service: . The first one is the third step of the 2. Start by deploying two versions of the httpbin service that have access logging enabled: and the second one is the 3rd step for Before you begin Here is also the screenshot from the published page
Screenshot 2025-06-01 at 14 05 17

but I will check failing lint test

@dhawton
Copy link
Member

dhawton commented Jun 1, 2025

Because you unindented code blocks, it moves the code blocks to not be "under" the number... for example (and in the prelim further down the page), this is what it is supposed to look like

expected

Versus what your change looks like

broken

We indent code blocks to be under the ordered list item to keep the numbering consistent and to visually reflect that code block belongs to that step.

@istio-testing
Copy link
Contributor

@msahihi: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
gencheck_istio.io 7fc93b9 link true /test gencheck

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@craigbox
Copy link
Contributor

craigbox commented Jun 4, 2025

As an aside: we don't expect this to be easy, or fixable in this file. It's probably a bug in the tabset implementation.

@kfaseela
Copy link
Member

kfaseela commented Jun 4, 2025

As an aside: we don't expect this to be easy, or fixable in this file. It's probably a bug in the tabset implementation.

Yes, see : #15700 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/docs ok-to-test Set this label allow normal testing to take place for a PR not submitted by an Istio org member. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants