Skip to content

fix(tests): update log generator to Azure Linux 3.0 and fix Ruby CI - #1838

Open
zanejohnson-azure wants to merge 3 commits into
ci_prodfrom
zane/fix-log-generator-base-image
Open

zanejohnson-azure wants to merge 3 commits into
ci_prodfrom
zane/fix-log-generator-base-image

Conversation

@zanejohnson-azure

@zanejohnson-azure zanejohnson-azure commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Replace mcr.microsoft.com/cbl-mariner/busybox:2.0 with mcr.microsoft.com/azurelinux/base/core:3.0 in the Linux all-nodes log-generator DaemonSet to move away from the image reported as vulnerable.
  • Preserve the existing logging command, resource settings, and Windows DaemonSet.
  • Explicitly install jwt 3.2.0 in the Ruby unit-test workflow, matching the Linux image's dependency instead of relying on runner-provided gems.
  • Match expected node-test exceptions by type, method, and receiver instead of Ruby-version-dependent error-message text; unexpected exceptions are re-raised with their original details.

Why the Ruby CI changes are needed

These are test-environment fixes, independent of the log-generator image replacement. Recent passing Ruby jobs used Ubuntu 24.04, while the failing jobs resolved ubuntu-latest to Ubuntu 26.04. This runner transition coincided with the failures; we have not performed a controlled same-commit comparison to establish its exact causal role.

Explicitly install jwt

source/plugins/ruby/KubernetesApiClient.rb requires jwt, but the unit-test workflow only installed Fluentd, ipaddress, and tomlrb. Both node tests failed with LoadError: cannot load such file -- jwt on the newer runner, and the same error was observed on ci_prod. Installing jwt explicitly makes this required test dependency independent of the runner's preinstalled environment. Version 3.2.0 matches kubernetes/linux/setup.sh. We have not established why the gem was available in earlier passing jobs.

Avoid exact Ruby exception-message matching

After installing jwt, CI progressed past the load errors and exposed a failure in InKubeNodesTests#test_malformed_node_spec. The telemetry stub accepted only the exact string undefined method \[]' for nil:NilClass, coupling the test to Ruby's exception-message formatting. Both node-test stubs now check the semantic properties instead: the exception must be a NoMethodError, its method name must be :[], and its receiver must be nil`. This preserves the expected-error check across Ruby versions without changing production code or suppressing unexpected exceptions; unexpected exceptions are re-raised with their original details.

Validation

  • git diff --check passed.
  • Unit-test workflow passed: Ruby, Go, Linux Bash, and Windows PowerShell jobs all succeeded.
  • Ruby on Ubuntu 26.04: 122 runs, 6742 assertions, 0 failures, 0 errors, 4 skips.
  • Confirmed the published replacement image tag supports Linux amd64 and arm64.
  • Inspected the published amd64 image layer and confirmed sh, bash, date, and sleep are present.
  • Container execution was not performed because the local Docker daemon is unavailable.
  • A vulnerability rescan is still required to confirm remediation of the reported finding; no specific CVE or scan result was supplied.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@zanejohnson-azure
zanejohnson-azure requested a review from a team as a code owner November 12, 2026 23:37
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

suyadav1
suyadav1 previously approved these changes Nov 13, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@zanejohnson-azure zanejohnson-azure changed the title fix(tests): use Azure Linux 3.0 for log generator fix(tests): update log generator to Azure Linux 3.0 and fix Ruby CI Nov 13, 2026

This branch has not been deployed

No deployments
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.

2 participants