add integration for noble and resolute stemcells#455
Conversation
ai-assisted=yes [TNZ-88995] [Europa] Bosh KTLO
|
Warning Review limit reached
Next review available in: 14 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (6)
WalkthroughThe 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 Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (1)
ci/pipeline.yml
| - name: test-integration-resolute | ||
| serial: true |
There was a problem hiding this comment.
🩺 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.ymlRepository: 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.ymlRepository: 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.
| trigger: true | ||
| - get: bosh-agent-ci | ||
| - get: bosh-ecosystem-concourse | ||
| tags: [ broadcom ] |
There was a problem hiding this comment.
📐 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.
| 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
ai-assisted=yes [TNZ-106038] Refactor bosh-agent CI pipeline to run integration tests on all supported stemcell lines (Jammy, Noble, Resolute)
There was a problem hiding this comment.
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 winGate
bosh-integration-testsontest-integration-resolute. Inci/pipeline.yml:716-739, addtest-integration-resoluteto thepassedlists for bothbosh-agentandbosh-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 winSerialize the Azure integration jobs together.
serial: trueonly queues builds within one job. Sincetest-integration-resoluteandtest-integrationboth modify and deletebosh-agent-integration-mainthroughintegration-vm-deployment, they can still overlap and tear down each other’s environment. Add the sameserial_groupsvalue 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
📒 Files selected for processing (1)
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)
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)
There was a problem hiding this comment.
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 winGate releases on the new stemcell jobs.
Adding these jobs alone does not make them release-blocking:
bosh-integration-testsstill lists only Jammy and Windows jobs in bothbosh-agentandbosh-agent-registry-imagepassedconstraints. A Noble or Resolute failure can therefore be bypassed by promotion. Addtest-integration-resoluteandtest-integration-nobleto both lists.Proposed fix
passed: - test-unit + - test-integration-resolute + - test-integration-noble - test-integration - test-unit-windows - test-integration-windowsAlso 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 winMove diagnostics before the successful return.
The
return nilat 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
📒 Files selected for processing (4)
ci/pipeline.ymlci/tasks/test-integration.shintegration/system_mounts_test.gointegration/test_environment.go
| 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) |
There was a problem hiding this comment.
🩺 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.goRepository: 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())
PYRepository: 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
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)
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: