Skip to content

feat: add experimental support for Podman Quadlet network files to fix errors (Resolves #421)#422

Merged
SJrX merged 1 commit into242.xfrom
issue-421
Mar 30, 2026
Merged

feat: add experimental support for Podman Quadlet network files to fix errors (Resolves #421)#422
SJrX merged 1 commit into242.xfrom
issue-421

Conversation

@SJrX
Copy link
Copy Markdown
Owner

@SJrX SJrX commented Mar 29, 2026

Summary

Adds opt-in support for Podman Quadlet .network files, which share the .network extension with systemd-networkd but have a completely different schema.

When enabled, the plugin auto-detects whether a .network file is a Podman Quadlet or systemd-networkd file based on content (e.g., presence of Subnet=, NetworkName= keys vs [Match], [Route] sections), and provides appropriate completions,
inspections, and documentation.

Key changes:

  • New PODMAN_NETWORK FileClass with ~18 Podman network keys (Subnet, Gateway, Driver, DisableDNS, etc.) merged at build time with standard [Unit]/[Install]/[Service] sections from systemd
  • Auto-detection heuristic in PsiFile.fileClass() that distinguishes Podman Quadlet from systemd-networkd .network files based on section names and keys
  • Editor notification banner that appears when a .network file looks like a Podman Quadlet but support is disabled, offering to enable it
  • Quick fixes on both "unknown key" warnings and "section not allowed" errors that offer to enable Podman Quadlet support when auto-detection matches
  • Settings page at Settings > Tools > systemd Unit Files with an opt-in toggle
  • Podman-specific documentation for [Network] section linking to Podman docs instead of systemd-networkd/nspawn docs
  • Build pipeline additions: generatePodmanNetworkGperf merges systemd unit gperf data with manually-maintained Podman keys; mergePodmanDocumentation merges Podman JSON docs into the generated documentation JSON

Files added:

  • src/main/resources/.../semanticdata/podman/podman-network.gperf — Podman network key definitions
  • src/main/resources/.../semanticdata/podman/podman-sectionToKeywordMapFromDoc.json — Podman key documentation
  • src/main/kotlin/.../settings/PodmanQuadletSettings.kt — persistent project-level settings
  • src/main/kotlin/.../settings/PodmanQuadletConfigurable.kt — settings UI
  • src/main/kotlin/.../settings/PodmanNetworkEditorNotificationProvider.kt — editor banner
  • src/main/kotlin/.../settings/PodmanQuadletUtil.kt — shared detection helper
  • src/main/kotlin/.../intentions/EnablePodmanQuadletSupportQuickFix.kt — quick fix
  • 4 test files covering completion, inspections, auto-detection, and quick fixes

Test plan

  • ./gradlew test passes (908 tests, 1 pre-existing failure in SemanticDataDocumentationCompletionTest)
  • Open a Podman Quadlet .network file with support disabled — blue notification banner appears
  • Click "Enable" on the banner — errors/warnings disappear, completions switch to Podman keys
  • Hover over [Network] section with CTRL+Q — shows Podman documentation, links to podman.io
  • Open a systemd-networkd .network file — no banner, behaves as before
  • Disable setting in Settings > Tools > systemd Unit Files — reverts to systemd-networkd behavior

@SJrX SJrX force-pushed the issue-421 branch 2 times, most recently from dd70247 to 5f0e7a8 Compare March 29, 2026 16:51
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 29, 2026

Test Results

908 tests   908 ✅  41s ⏱️
212 suites    0 💤
212 files      0 ❌

Results for commit 22c2e52.

♻️ This comment has been updated with latest results.

@SJrX SJrX force-pushed the issue-421 branch 3 times, most recently from 8bda269 to 0c0ec44 Compare March 29, 2026 22:46
…x errors (Resolves #421)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@SJrX SJrX merged commit d305f3b into 242.x Mar 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant