Skip to content

add integration for noble and resolute stemcells#455

Open
KauzClay wants to merge 8 commits into
mainfrom
resolute-integ-test
Open

add integration for noble and resolute stemcells#455
KauzClay wants to merge 8 commits into
mainfrom
resolute-integ-test

Conversation

@KauzClay

@KauzClay KauzClay commented Jul 21, 2026

Copy link
Copy Markdown

What is this change about?

Adding an integration test specifically to use the agent on resolute stemcell (and soon the noble stemcell as well)

In the past, only testing one stemcell line in this pipeline hid some issues from us till they caused breakages further down the line. This is to help us catch issues earlier.

example of new job: https://ci.bosh-ecosystem.cf-app.com/teams/main/pipelines/bosh-agent-main/jobs/test-integration-resolute

What tests have you run against this PR?

iterating here: https://ci.bosh-ecosystem.cf-app.com/teams/main/pipelines/test-delete-when-finished-integration-resolute

How should this change be described in bosh-agent release notes?

N/A

Does this PR introduce a breaking change?

NO

Tag your pair, your PM, and/or team!

@mkocher

AI Review Feedback

All AI review comments (CodeRabbit, and Copilot when assigned) must be resolved before human reviewers will look at the PR. For each comment, either:

  • Make the suggested change, or
  • Reply to the comment explaining why it does not apply, then resolve the thread.

ai-assisted=yes
[TNZ-88995] [Europa] Bosh KTLO
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@KauzClay, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 14 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2fc2c20f-bfaa-4cda-88b4-34245a02ee4f

📥 Commits

Reviewing files that changed from the base of the PR and between c0a7c03 and 805883f.

📒 Files selected for processing (6)
  • ci/pipeline.yml
  • ci/test-delete-when-finished-resolute.yml
  • integration/assets/file-settings-agent-systemd.json
  • integration/integration_suite_test.go
  • integration/test_environment.go
  • integration/update_settings_test.go

Walkthrough

The CI pipeline adds separate Azure integration resources and jobs for Ubuntu resolute and noble, while switching the existing Azure integration job to the jammy deployment. Cleanup now targets variant-specific CredHub entries, resurrection configurations, and deployments. Integration service control supports systemd or sv, readiness checks recognize both init systems, and successful agent startup emits additional log diagnostics.

Suggested reviewers: selzoc

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change by describing new integration coverage for Noble and Resolute stemcells.
Description check ✅ Passed The description is mostly complete and includes the required change, tests, release notes, breaking change, and tagging sections.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch resolute-integ-test

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@ci/pipeline.yml`:
- Line 332: Update the tags value in the pipeline YAML to comply with the
configured bracket-spacing rule by removing the spaces inside the flow-style
list brackets, while preserving the existing broadcom tag.
- Around line 324-325: Update the test-integration-resolute and test-integration
job definitions to share the same serial_groups value for their
integration-vm-deployment resource, ensuring Azure integration deployments run
one at a time; retain each job’s existing serial setting and configuration.
- Around line 364-369: Update the stemcell_os value in the deployment
configuration alongside the azure-stemcell-resolute artifact to use the Resolute
OS name, ensuring it matches the uploaded stemcell and preserves the existing
deployment_name and az settings.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8d7686e4-c8eb-475d-9d18-cde6f74efca2

📥 Commits

Reviewing files that changed from the base of the PR and between 1575fba and bd2537b.

📒 Files selected for processing (1)
  • ci/pipeline.yml

Comment thread ci/pipeline.yml Outdated
Comment on lines +324 to +325
- name: test-integration-resolute
serial: true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/sh
set -eu

fly validate-pipeline --config ci/pipeline.yml
sed -n '320,570p' ci/pipeline.yml

Repository: cloudfoundry/bosh-agent

Length of output: 202


🏁 Script executed:

#!/bin/sh
set -eu

echo '--- ci/pipeline.yml: around the two integration jobs ---'
sed -n '300,590p' ci/pipeline.yml

echo
echo '--- serial / serial_groups usage in ci/pipeline.yml ---'
rg -n 'serial_groups|serial:' ci/pipeline.yml

echo
echo '--- references to bosh-agent-integration-main and integration-vm-deployment ---'
rg -n 'bosh-agent-integration-main|integration-vm-deployment|test-integration-resolute|test-integration' ci/pipeline.yml

Repository: cloudfoundry/bosh-agent

Length of output: 16420


Serialize the Azure integration jobs together.

serial: true only serializes builds within each job. test-integration-resolute and test-integration both deploy to and delete bosh-agent-integration-main through integration-vm-deployment, so they can still run at the same time and tear down each other’s environment. Add the same serial_groups value to both jobs, or isolate Resolute’s deployment/resource.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@ci/pipeline.yml` around lines 324 - 325, Update the test-integration-resolute
and test-integration job definitions to share the same serial_groups value for
their integration-vm-deployment resource, ensuring Azure integration deployments
run one at a time; retain each job’s existing serial setting and configuration.

Comment thread ci/pipeline.yml
trigger: true
- get: bosh-agent-ci
- get: bosh-ecosystem-concourse
tags: [ broadcom ]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Fix the YAMLlint failure.

[ broadcom ] violates the configured bracket-spacing rule.

Proposed fix
-            tags: [ broadcom ]
+            tags: [broadcom]
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
tags: [ broadcom ]
tags: [broadcom]
🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 332-332: too many spaces inside brackets

(brackets)


[error] 332-332: too many spaces inside brackets

(brackets)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@ci/pipeline.yml` at line 332, Update the tags value in the pipeline YAML to
comply with the configured bracket-spacing rule by removing the spaces inside
the flow-style list brackets, while preserving the existing broadcom tag.

Source: Linters/SAST tools

Comment thread ci/pipeline.yml
ai-assisted=yes
[TNZ-106038] Refactor bosh-agent CI pipeline to run integration tests on all supported stemcell lines (Jammy, Noble, Resolute)

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
ci/pipeline.yml (1)

324-336: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Gate bosh-integration-tests on test-integration-resolute. In ci/pipeline.yml:716-739, add test-integration-resolute to the passed lists for both bosh-agent and bosh-agent-registry-image; otherwise those versions can advance even when the Resolute job fails.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@ci/pipeline.yml` around lines 324 - 336, Update the `passed` lists for both
`bosh-agent` and `bosh-agent-registry-image` in the `bosh-integration-tests` job
to include `test-integration-resolute`, ensuring those resources cannot advance
until the Resolute integration job succeeds.
♻️ Duplicate comments (1)
ci/pipeline.yml (1)

324-325: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Serialize the Azure integration jobs together.

serial: true only queues builds within one job. Since test-integration-resolute and test-integration both modify and delete bosh-agent-integration-main through integration-vm-deployment, they can still overlap and tear down each other’s environment. Add the same serial_groups value to both jobs, or isolate their deployment/resource. (concourse-ci.org)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@ci/pipeline.yml` around lines 324 - 325, Update the test-integration-resolute
and test-integration job definitions to share the same serial_groups value,
ensuring their integration-vm-deployment operations cannot overlap; retain each
job’s existing serial setting and use a consistent group name for both.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@ci/pipeline.yml`:
- Around line 324-336: Update the `passed` lists for both `bosh-agent` and
`bosh-agent-registry-image` in the `bosh-integration-tests` job to include
`test-integration-resolute`, ensuring those resources cannot advance until the
Resolute integration job succeeds.

---

Duplicate comments:
In `@ci/pipeline.yml`:
- Around line 324-325: Update the test-integration-resolute and test-integration
job definitions to share the same serial_groups value, ensuring their
integration-vm-deployment operations cannot overlap; retain each job’s existing
serial setting and use a consistent group name for both.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8c41e904-71d4-4cc9-96bb-e3485bea5e47

📥 Commits

Reviewing files that changed from the base of the PR and between bd2537b and 11ade49.

📒 Files selected for processing (1)
  • ci/pipeline.yml

@KauzClay KauzClay changed the title add integration for resolute stemcell add integration for noble and resolute stemcells Jul 22, 2026
KauzClay added 4 commits July 22, 2026 10:40
ai-assisted=yes
[TNZ-106038] Refactor bosh-agent CI pipeline to run integration tests on all supported stemcell lines (Jammy, Noble, Resolute)
resolute stemcells use systemctl instead of runit for managing agent process

ai-assisted=yes
[TNZ-106038] Refactor bosh-agent CI pipeline to run integration tests on all supported stemcell lines (Jammy, Noble, Resolute)
* the tooling already existed to change the name, it was just using bosh-agent-integration-main hardcoded everywhere since there was only one job

ai-assisted=yes
[TNZ-106038] Refactor bosh-agent CI pipeline to run integration tests on all supported stemcell lines (Jammy, Noble, Resolute)
ai-assisted=yes
[TNZ-106038] Refactor bosh-agent CI pipeline to run integration tests on all supported stemcell lines (Jammy, Noble, Resolute)

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
ci/pipeline.yml (1)

353-364: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Gate releases on the new stemcell jobs.

Adding these jobs alone does not make them release-blocking: bosh-integration-tests still lists only Jammy and Windows jobs in both bosh-agent and bosh-agent-registry-image passed constraints. A Noble or Resolute failure can therefore be bypassed by promotion. Add test-integration-resolute and test-integration-noble to both lists.

Proposed fix
             passed:
               - test-unit
+              - test-integration-resolute
+              - test-integration-noble
               - test-integration
               - test-unit-windows
               - test-integration-windows

Also applies to: 484-495

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@ci/pipeline.yml` around lines 353 - 364, Update the bosh-integration-tests
passed constraints for both bosh-agent and bosh-agent-registry-image to include
test-integration-resolute and test-integration-noble alongside the existing
Jammy and Windows jobs, making Noble or Resolute failures block promotion.
integration/test_environment.go (1)

665-675: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Move diagnostics before the successful return.

The return nil at Line 667 bypasses the new log and journal output whenever the agent becomes reachable. The diagnostics currently run only after all ping attempts fail, so the stated successful-startup diagnostic behavior is not implemented.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@integration/test_environment.go` around lines 665 - 675, Update the agent
startup retry flow around t.AgentClient.Ping so the logs and journal diagnostics
execute before returning success when the agent becomes reachable. Preserve the
existing retry behavior, but move the return nil after the diagnostic output so
successful startup also emits both t.GetFileContents and t.RunCommand results.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@integration/test_environment.go`:
- Line 670: Run goimports on the changed section in
integration/test_environment.go and apply its formatting/import adjustments,
preserving the existing behavior and ensuring the file passes the goimports lint
check.
- Around line 671-675: Update the diagnostic collection around t.GetFileContents
and t.RunCommand to capture and handle their errors instead of discarding them.
Gate the journalctl diagnostic to systemctl environments, and ensure failures
from journalctl are not masked by the tail pipeline; preserve the existing log
and journal output formatting for successful commands.
- Around line 614-619: Update StartAgent to return the error produced by
t.RunCommand, matching the existing StopAgent behavior and satisfying the
method’s error return contract.

---

Outside diff comments:
In `@ci/pipeline.yml`:
- Around line 353-364: Update the bosh-integration-tests passed constraints for
both bosh-agent and bosh-agent-registry-image to include
test-integration-resolute and test-integration-noble alongside the existing
Jammy and Windows jobs, making Noble or Resolute failures block promotion.

In `@integration/test_environment.go`:
- Around line 665-675: Update the agent startup retry flow around
t.AgentClient.Ping so the logs and journal diagnostics execute before returning
success when the agent becomes reachable. Preserve the existing retry behavior,
but move the return nil after the diagnostic output so successful startup also
emits both t.GetFileContents and t.RunCommand results.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8ca8329a-c6d9-4aa3-bb30-b827a0c15978

📥 Commits

Reviewing files that changed from the base of the PR and between 11ade49 and c0a7c03.

📒 Files selected for processing (4)
  • ci/pipeline.yml
  • ci/tasks/test-integration.sh
  • integration/system_mounts_test.go
  • integration/test_environment.go

Comment thread integration/test_environment.go Outdated
Comment thread integration/test_environment.go Outdated
Comment on lines +671 to +675
logs, _ := t.GetFileContents("/var/vcap/bosh/log/current")
t.writerPrinter.Printf("\n--- AGENT LOGS ---\n%s\n------------------\n", logs)

journal, _ := t.RunCommand("sudo journalctl -u agent --no-pager | tail -n 100")
t.writerPrinter.Printf("\n--- SYSTEMD JOURNAL ---\n%s\n-----------------------\n", journal)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== file size and relevant lines =="
wc -l integration/test_environment.go
sed -n '620,700p' integration/test_environment.go

echo
echo "== diagnostic-related references =="
rg -n "AGENTS|AGENT LOG|SYSTEMD JOURNAL|journalctl|sv environment|journal|GetFileContents|RunCommand" integration/test_environment.go

echo
echo "== surrounding test_environment methods outline/context =="
sed -n '1,220p' integration/test_environment.go
sed -n '220,420p' integration/test_environment.go
sed -n '420,640p' integration/test_environment.go

Repository: cloudfoundry/bosh-agent

Length of output: 26881


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Behavioral/static probe: parse the two diagnostic snippets around lines 666-680 and determine
# whether errors are assigned to blank identifiers and whether journalctl has any env guard.
python3 - <<'PY'
from pathlib import Path
p = Path("integration/test_environment.go")
text = p.read_text()
lines = text.splitlines()
for i,l in enumerate(lines,1):
    if i in range(666,681):
        print(f"{i:4d}: {l}")
print("assignments_with_diagnostics:")
for pat in [
    'logs, _ := t.GetFileContents("/var/vcap/bosh/log/current")',
    'journal, _ := t.RunCommand("sudo journalctl -u agent --no-pager | tail -n 100")',
]:
    print(pat, "==>", pat in text)
print("journalctl occurrences:")
for i,l in enumerate(lines,1):
    if "journalctl" in l:
        print(i, l.strip())
PY

Repository: cloudfoundry/bosh-agent

Length of output: 979


Handle diagnostic errors and gate systemd-only commands.

Both diagnostics discard errors, and journalctl runs even on sv environments while the tail pipe can mask journalctl failures with empty output. Capture these errors and only collect the systemd journal from systemctl environments.

🧰 Tools
🪛 GitHub Check: lint (ubuntu-latest)

[failure] 674-674:
Error return value of t.RunCommand is not checked (errcheck)


[failure] 671-671:
Error return value of t.GetFileContents is not checked (errcheck)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@integration/test_environment.go` around lines 671 - 675, Update the
diagnostic collection around t.GetFileContents and t.RunCommand to capture and
handle their errors instead of discarding them. Gate the journalctl diagnostic
to systemctl environments, and ensure failures from journalctl are not masked by
the tail pipeline; preserve the existing log and journal output formatting for
successful commands.

Source: Linters/SAST tools

KauzClay added 2 commits July 22, 2026 17:32
all the tests are failing bc the agent config the tests use doesn't set a serivce manager, so it tries using sv instead of systemd

not sure the best way to thread this all through, since the agent settings file is used in lots of tests

ai-assisted=yes
[TNZ-106038] Refactor bosh-agent CI pipeline to run integration tests on all supported stemcell lines (Jammy, Noble, Resolute)
including test pipeline, should delete before merge

ai-assisted=yes
[TNZ-106038] Refactor bosh-agent CI pipeline to run integration tests on all supported stemcell lines (Jammy, Noble, Resolute)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Waiting for Changes | Open for Contribution

Development

Successfully merging this pull request may close these issues.

1 participant