Skip to content

fix: accept YAML udev discoveryDetails in validating webhook#802

Merged
gauravgahlot merged 1 commit into
project-akri:mainfrom
twz123:webhook-udev-yaml
Jun 3, 2026
Merged

fix: accept YAML udev discoveryDetails in validating webhook#802
gauravgahlot merged 1 commit into
project-akri:mainfrom
twz123:webhook-udev-yaml

Conversation

@twz123

@twz123 twz123 commented May 11, 2026

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

The udev discoveryDetails are YAML in the Helm templates, sample configurations, and runtime discovery parser, but the validating webhook was parsing them as JSON. That caused valid demo and chart-generated udev configurations to be rejected when the webhook was enabled.

Switch the webhook validation path to YAML parsing and restore the udev e2e fixtures to YAML so validation, tests, and shipped examples all use the same format.

Fixes:

Special notes for your reviewer:

If applicable:

  • this PR has an associated PR with documentation in akri-docs
  • this PR contains unit tests
  • added code adheres to standard Rust formatting (cargo fmt)
  • code builds properly (cargo build)
  • code is free of common mistakes (cargo clippy)
  • all Akri tests succeed (cargo test)
  • inline documentation builds (cargo doc)
  • all commits pass the DCO bot check by being signed off -- see the failing DCO check for instructions on how to retroactively sign commits

The udev discoveryDetails are YAML in the Helm templates, sample
configurations, and runtime discovery parser, but the validating webhook
was parsing them as JSON. That caused valid demo and chart-generated
udev configurations to be rejected when the webhook was enabled.

Switch the webhook validation path to YAML parsing and restore the udev
e2e fixtures to YAML so validation, tests, and shipped examples all use
the same format.

Fixes: 015c617 ("device mount permission check in webhook")
Signed-off-by: Tom Wieczorek <twieczorek@mirantis.com>
@lilustga

Copy link
Copy Markdown
Collaborator

/version patch

@github-actions github-actions Bot added the version/patch Patch version change is needed label May 22, 2026

@gauravgahlot gauravgahlot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you for your contribution. 💜

You should revert the version.sh file.

@twz123

twz123 commented May 29, 2026

Copy link
Copy Markdown
Contributor Author

You should revert the version.sh file.

That was modified automatically by GitHub Actions in 995bbcf, so I didn't touch that at all. What's the desired way to tackle this? Amend 995bbcf and revert the spurious version edits, or maybe squash the whole automatic commit directly into my commit, fixing this up altogether?

Comment thread version.sh Outdated
@twz123 twz123 force-pushed the webhook-udev-yaml branch from 995bbcf to 88abe96 Compare June 2, 2026 14:36
@gauravgahlot gauravgahlot added same version and removed version/patch Patch version change is needed labels Jun 3, 2026
@gauravgahlot gauravgahlot changed the title Accept YAML udev discoveryDetails in validating webhook fix: accept YAML udev discoveryDetails in validating webhook Jun 3, 2026
@gauravgahlot

Copy link
Copy Markdown
Member

Thank you @twz123!

Just 2 notes:

  1. In the PR description, the 'fixes' points to a PR. If that's not intentional, could you please add the right issue?
  2. Are you using Akri at Mirantis or something of your own? Just curious.

@twz123

twz123 commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

Thank you @twz123!

Just 2 notes:

  1. In the PR description, the 'fixes' points to a PR. If that's not intentional, could you please add the right issue?

Yes, I intentionally referenced the PR that introduced the regression.

  1. Are you using Akri at Mirantis or something of your own? Just curious.

@jnummelin has created a fun talk about Akri and k0s that he and I have been giving at various occasions. My PRs are mainly a result of our debugging attempts when preparing the demos 😅

@gauravgahlot gauravgahlot merged commit 0b89a0b into project-akri:main Jun 3, 2026
45 of 47 checks passed
@twz123 twz123 deleted the webhook-udev-yaml branch June 4, 2026 01:04
@gauravgahlot gauravgahlot mentioned this pull request Jun 10, 2026
25 tasks
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.

3 participants