Skip to content

Enabling pre-submit by addressing the comments received from DevOps team - #119

Open
sandeeplocharla wants to merge 14 commits into
mainfrom
feature/CSTACKEX-340
Open

sandeeplocharla wants to merge 14 commits into
mainfrom
feature/CSTACKEX-340

Conversation

@sandeeplocharla

@sandeeplocharla sandeeplocharla commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Description

This PR has code to enable presubmits for NetApp ONTAP storage plugin with Multi-branch Jenkins pipeline

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

Screenshot 2026-11-05 at 9 43 06 AM Screenshot 2026-11-05 at 9 43 26 AM Screenshot 2026-11-05 at 9 43 41 AM Screenshot 2026-11-05 at 9 44 11 AM Screenshot 2026-11-05 at 9 44 38 AM Screenshot 2026-11-05 at 9 44 52 AM Screenshot 2026-11-05 at 9 45 03 AM

@github-actions

Copy link
Copy Markdown

🔴 Test Coverage Grade: D — Marginal

Metric Value
Line coverage 24.84%
Branch coverage 19.00%

Grade Scale

Grade Line Coverage Meaning
🟢 A ≥ 80% Excellent - this code sleeps well at night 😴
🟡 B 60-79% Good - almost there, don't stop now 😉
🟠 C 40-59% Acceptable - your code is wearing a seatbelt, but no airbags 😬
🔴 D 20-39% Marginal - boldly shipping where no test has gone before 🖖
⛔ F < 20% Failing - tests? what tests? 🔥

Branch coverage is shown as a secondary signal. Grade is determined by line coverage.
View full Actions run

@github-actions

Copy link
Copy Markdown

🔴 Test Coverage Grade: D — Marginal

Metric Value
Line coverage 24.84%
Branch coverage 19.00%

Grade Scale

Grade Line Coverage Meaning
🟢 A ≥ 80% Excellent - this code sleeps well at night 😴
🟡 B 60-79% Good - almost there, don't stop now 😉
🟠 C 40-59% Acceptable - your code is wearing a seatbelt, but no airbags 😬
🔴 D 20-39% Marginal - boldly shipping where no test has gone before 🖖
⛔ F < 20% Failing - tests? what tests? 🔥

Branch coverage is shown as a secondary signal. Grade is determined by line coverage.
View full Actions run

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

🔴 Test Coverage Grade: D — Marginal

Metric Value
Line coverage 25.82%
Branch coverage 20.11%

Grade Scale

Grade Line Coverage Meaning
🟢 A ≥ 80% Excellent - this code sleeps well at night 😴
🟡 B 60-79% Good - almost there, don't stop now 😉
🟠 C 40-59% Acceptable - your code is wearing a seatbelt, but no airbags 😬
🔴 D 20-39% Marginal - boldly shipping where no test has gone before 🖖
⛔ F < 20% Failing - tests? what tests? 🔥

Branch coverage is shown as a secondary signal. Grade is determined by line coverage.
View full Actions run

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

sandeeplocharla and others added 11 commits November 5, 2026 07:53
The new pull-request script is not on main yet, so the PR-119 trial has to load it from feature/CSTACKEX-340. Change this back to main before the folder builds every pull request.
Jenkins warns that approving RunWrapper.getRawBuild lets a pipeline step outside the script sandbox. The existing job lookup already used for older builds can read the same revision.
A manual build does not copy the scan revision onto the build, so the prepare stage treated a real PR as unindexed.
The multibranch job never attaches a pull request revision, so refusing the build there skipped the GitHub eligibility check.
The environment block declared RESOLVED_SOURCE_ID and RESOLVED_SOURCE_SHA
from build parameters. A multibranch pull request has no such parameters,
and the block wraps every stage, so it shadowed the values set in
prepareMultibranchPullRequest(). They read back empty, which caused a
NullPointerException in presubmitSubjectBase and an empty SHA in the
Maven and deploy shell steps. Set them in resolveSourceIdentity() instead.

Also name the trusted CI branch in one place, trustedCiBranch(), and
describe the multibranch folder configuration for the pilot.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Build 8 of PR-119 failed on the upstream, timing-sensitive
ConfigKeyScheduledExecutionWrapperTest, which counts scheduled ticks in a
fixed window and jitters in the CPU-limited agent pod. Add an opt-in
RERUN_FAILING_TESTS setting to mvn-full.sh that passes
-Dsurefire.rerunFailingTestsCount, and set it to 2 in the Jenkinsfile. The
default stays 0 for local runs.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…out.

The multibranch CI checkout fetched only private-cicd, so Phase 2 stopped with
"Trusted ONTAP prerequisite checker is missing" right after the snapshot
revert. run-phase2-remote.sh runs the trusted copy of
test/integration/plugins/ontap/check_ontap_prereqs.py from the CI checkout, so
add that single file to the sparse paths.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The HTML log link of a failed ONTAP test opened the suite stdout log, which
only holds the pass/fail summary, so the reason for the failure was not
visible. Parse the ERROR and FAIL blocks of the suite's results.txt, put them
in a "Failure details" section above the suite log, and link a failed test
straight to its block. Add an Error column to the mail table with a one-line
reason, leading with the CloudStack job error text when there is one, and link
the archived management and agent logs from the failure section.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
test_06_start_vm_lun_remapped failed once with "Unable to apply dhcp entry on
router": the guest network's router had reported failed health checks about a
minute earlier, and the test started the VM with no check and no retry.

Add to OntapTestBase a bounded router readiness gate, a deploy wrapper that
waits before and after the deploy (the first deploy creates the router), and a
start wrapper that retries a VM that rolled back to Stopped, at most three
attempts, and raises every attempt's error if they all fail. A single wait
timeout makes the class stop waiting, so a permanently flagged router cannot
slow every VM operation. Use the wrappers in the iSCSI and NFS3 VM tests.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The stage table, the report's Started and Finished rows and the start mail
showed UTC. Display them in IST (UTC+5:30). The stored timestamps and the
stage durations stay UTC, so the arithmetic is unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
sandeeplocharla and others added 3 commits November 5, 2026 10:14
Resolving the merge conflicts brought back a local _start_vm in the iSCSI and
NFS3 VM volume tests. It used startVirtualMachineAPI, whose import had been
removed, so test_08 and test_09 failed with a NameError and the snapshot tests
were skipped. Remove the local copies and make the shared _start_vm in
ontap_test_base.py skip a VM that is already running and wait for Running, as
the local copies did.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
When ONTAP rejects a createVMSnapshot that runs while a revert's clones exist,
CloudStack keeps the snapshot record in Error. The retry in test_23 then
succeeds, but the record has no id the test saw, so it was never deleted. Any
Instance Snapshot blocks detach, resize and destroy, so test_24, test_25 and
test_27 failed. Sweep Error-state VM snapshots of both test VMs in tearDown.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
trustedCiBranch() named feature/CSTACKEX-340 for the PR-119 pilot. Return main
so the presubmit uses the merged CI scripts for every pull request, and update
the job guide to match. The Jenkins folder still has to switch its Remote
Jenkinsfile Provider branch to main and its filter to PR-* after this merges.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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