Skip to content

Conversation

@kasturinarra
Copy link

@kasturinarra kasturinarra commented Dec 29, 2025

Resolves #173

Summary by CodeRabbit

  • Tests
    • Added a pre-conformance hostname-resolution step that ensures cluster node hostnames resolve before running conformance tests; the test run will fail if resolution cannot be verified.
  • Chores
    • No automated cleanup step was added.
  • No user-facing functionality changed; this improves reliability of automated conformance testing.

✏️ Tip: You can customize this high-level summary in your review settings.

@kasturinarra kasturinarra requested a review from a team as a code owner December 29, 2025 07:51
@coderabbitai
Copy link

coderabbitai bot commented Dec 29, 2025

📝 Walkthrough

Walkthrough

Adds a pre-test GitHub Actions workflow step that enumerates microshift-okd-* containers via podman, extracts each node IP, appends IP hostname entries to /etc/hosts, and verifies hostname resolution before running CNCF conformance (Sonobuoy) tests.

Changes

Cohort / File(s) Summary
Workflow hostname configuration
​.github/workflows/cncf-conformance.yaml
Adds a pre-test step "Configure hostname resolution for cluster nodes": lists microshift-okd-* containers with podman, inspects each to get node IP, appends IP hostname entries to /etc/hosts, fails if IP missing, and verifies resolution for microshift-okd-1/microshift-okd-2 before Sonobuoy tests.

Sequence Diagram(s)

sequenceDiagram
    participant Runner as GitHub Actions Runner
    participant Podman as Podman
    participant Containers as microshift-okd-*
    participant Hosts as /etc/hosts
    participant Sonobuoy as Sonobuoy (CNCF tests)

    rect rgb(240,248,255)
      Runner->>Podman: podman ps --filter microshift-okd-*
      Podman->>Containers: inspect each container (get IP)
      Containers-->>Podman: return IPs
      Podman-->>Runner: IPs per node
      Runner->>Hosts: append "IP hostname" lines (echo >> /etc/hosts)
      Hosts-->>Runner: write confirmation
      Runner->>Runner: verify with getent hosts microshift-okd-1/2
      alt resolution fails
        Runner-->>Runner: exit with error
      end
    end

    rect rgb(245,255,240)
      Runner->>Sonobuoy: run Sonobuoy/Conformance tests
      Sonobuoy-->>Runner: test results
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: fixing DNS tests for CNCF conformance.
Linked Issues check ✅ Passed The PR implements hostname resolution configuration for cluster nodes to address DNS resolution failures in CNCF conformance tests [#173], matching the reported issue requirements.
Out of Scope Changes check ✅ Passed All changes are scoped to adding hostname resolution configuration in the CNCF conformance workflow, directly addressing the DNS test failures.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4d78a0e and 5eae144.

📒 Files selected for processing (1)
  • .github/workflows/cncf-conformance.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/cncf-conformance.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
  • GitHub Check: isolated-network (kindnet, ubuntu-24.04, 0)
  • GitHub Check: quick-start-and-clean (ubuntu-24.04-arm)
  • GitHub Check: quick-rpm-and-clean (ubuntu-24.04)
  • GitHub Check: fedora-bootc (ubuntu-24.04)
  • GitHub Check: isolated-network (ovnk, ubuntu-24.04, 1)
  • GitHub Check: centos10-bootc
  • GitHub Check: quick-rpm-and-clean (ubuntu-24.04-arm)
  • GitHub Check: quick-start-and-clean (ubuntu-24.04)
  • GitHub Check: fedora-bootc (ubuntu-24.04-arm)
  • GitHub Check: ubuntu-rpm2deb
  • GitHub Check: centos9-bootc

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/workflows/cncf-conformance.yaml (1)

107-115: Consider handling multiple network IPs.

If a container has multiple networks, the jq query returns multiple IPs. Taking the first ensures predictable behavior.

🔎 Proposed fix
          for node in $(sudo podman ps --filter name=microshift-okd- --format '{{.Names}}'); do
-           ip=$(sudo podman inspect "$node" | jq -r '.[].NetworkSettings.Networks[].IPAddress')
+           ip=$(sudo podman inspect "$node" | jq -r '.[].NetworkSettings.Networks[].IPAddress' | head -1)
            if [ -n "$ip" ] && [ "$ip" != "null" ]; then
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 723ee4e and b19b6e9.

📒 Files selected for processing (1)
  • .github/workflows/cncf-conformance.yaml
🧰 Additional context used
📓 Path-based instructions (1)
.github/workflows/*.yaml

📄 CodeRabbit inference engine (CLAUDE.md)

CI/CD workflows should validate builds with builders.yaml, test quickstart scripts with installers.yaml, support manual release workflow via release.yaml, and run daily OKD ARM builds via release-okd.yaml

Files:

  • .github/workflows/cncf-conformance.yaml
🧠 Learnings (2)
📚 Learning: 2025-12-13T11:22:03.985Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-13T11:22:03.985Z
Learning: Applies to .github/workflows/*.yaml : CI/CD workflows should validate builds with `builders.yaml`, test quickstart scripts with `installers.yaml`, support manual release workflow via `release.yaml`, and run daily OKD ARM builds via `release-okd.yaml`

Applied to files:

  • .github/workflows/cncf-conformance.yaml
📚 Learning: 2025-12-22T06:35:50.684Z
Learnt from: kasturinarra
Repo: microshift-io/microshift PR: 162
File: src/cncf/run_sonobuoy_tests.sh:43-45
Timestamp: 2025-12-22T06:35:50.684Z
Learning: In src/cncf/run_sonobuoy_tests.sh, architecture detection via `uname -m` is not needed because all container images (docker.io/sonobuoy/sonobuoy, docker.io/sonobuoy/systemd-logs, registry.k8s.io/conformance) are multi-arch manifests that automatically pull the correct architecture variant for the host platform.

Applied to files:

  • .github/workflows/cncf-conformance.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
  • GitHub Check: quick-rpm-and-clean (ubuntu-24.04)
  • GitHub Check: fedora-bootc (ubuntu-24.04-arm)
  • GitHub Check: isolated-network (ovnk, ubuntu-24.04, 1)
  • GitHub Check: fedora-bootc (ubuntu-24.04)
  • GitHub Check: centos9-bootc
  • GitHub Check: centos10-bootc
  • GitHub Check: isolated-network (kindnet, ubuntu-24.04, 0)
  • GitHub Check: ubuntu-rpm2deb
  • GitHub Check: quick-start-and-clean (ubuntu-24.04-arm)
  • GitHub Check: quick-rpm-and-clean (ubuntu-24.04-arm)
  • GitHub Check: quick-start-and-clean (ubuntu-24.04)
🔇 Additional comments (1)
.github/workflows/cncf-conformance.yaml (1)

159-166: LGTM!

Cleanup step correctly uses if: always() and the sed pattern properly matches entries added earlier.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b19b6e9 and 488b98d.

📒 Files selected for processing (1)
  • .github/workflows/cncf-conformance.yaml
🧰 Additional context used
📓 Path-based instructions (1)
.github/workflows/*.yaml

📄 CodeRabbit inference engine (CLAUDE.md)

CI/CD workflows should validate builds with builders.yaml, test quickstart scripts with installers.yaml, support manual release workflow via release.yaml, and run daily OKD ARM builds via release-okd.yaml

Files:

  • .github/workflows/cncf-conformance.yaml
🧠 Learnings (2)
📚 Learning: 2025-12-13T11:22:03.985Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-13T11:22:03.985Z
Learning: Applies to .github/workflows/*.yaml : CI/CD workflows should validate builds with `builders.yaml`, test quickstart scripts with `installers.yaml`, support manual release workflow via `release.yaml`, and run daily OKD ARM builds via `release-okd.yaml`

Applied to files:

  • .github/workflows/cncf-conformance.yaml
📚 Learning: 2025-12-22T06:35:50.684Z
Learnt from: kasturinarra
Repo: microshift-io/microshift PR: 162
File: src/cncf/run_sonobuoy_tests.sh:43-45
Timestamp: 2025-12-22T06:35:50.684Z
Learning: In src/cncf/run_sonobuoy_tests.sh, architecture detection via `uname -m` is not needed because all container images (docker.io/sonobuoy/sonobuoy, docker.io/sonobuoy/systemd-logs, registry.k8s.io/conformance) are multi-arch manifests that automatically pull the correct architecture variant for the host platform.

Applied to files:

  • .github/workflows/cncf-conformance.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: isolated-network (kindnet, ubuntu-24.04, 0)
  • GitHub Check: quick-start-and-clean (ubuntu-24.04-arm)
  • GitHub Check: quick-start-and-clean (ubuntu-24.04)
  • GitHub Check: centos10-bootc
  • GitHub Check: fedora-bootc (ubuntu-24.04)
  • GitHub Check: centos9-bootc
  • GitHub Check: isolated-network (ovnk, ubuntu-24.04, 1)
  • GitHub Check: ubuntu-rpm2deb
  • GitHub Check: fedora-bootc (ubuntu-24.04-arm)
🔇 Additional comments (1)
.github/workflows/cncf-conformance.yaml (1)

159-167: LGTM!

Cleanup step correctly uses if: always() and a robust sed pattern to remove all microshift-okd-* entries. The || true ensures cleanup failures don't break the workflow.

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.

CNCF tests related to DNS are failing on microshift upstream builds

2 participants