-
Notifications
You must be signed in to change notification settings - Fork 1
fix(e2e): serialization errors and scanner readiness #491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
ae7d60d
7ddcda5
2a1abe8
c1c43c1
3caf479
363556b
7f1a43b
84568c2
a6c3aeb
cc2d1d3
5333e80
63ab148
d7252d5
97ae07d
913072f
a1542af
296d95a
ea99245
23b4a51
966ea90
ed215d8
2f1f874
ff64aa0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,7 +29,7 @@ repositories { | |
| } | ||
|
|
||
| dependencies { | ||
| implementation 'org.jenkins-ci.plugins:stackrox-container-image-scanner:1.4.4' | ||
| implementation files('../stackrox-container-image-scanner/target/classes') | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
ast-grep outline functionaltest-jenkins-plugin/build.gradle --lang groovy --items all || true
printf '%s\n' '--- local scanner dependency ---'
rg -n -C 4 "stackrox-container-image-scanner/target/classes|builtBy|dependsOn" \
functionaltest-jenkins-plugin/build.gradle
printf '%s\n' '--- CI ordering for scanner Maven and functional Gradle builds ---'
rg -n -C 5 "(mvnw?|gradlew|stackrox-container-image-scanner|functionaltest-jenkins-plugin)" \
.github/workflows functionaltest-jenkins-plugin stackrox-container-image-scanner \
-g '*.yaml' -g '*.yml' -g '*.gradle' -g 'pom.xml' || trueRepository: stackrox/jenkins-plugin Length of output: 9141 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- repository conventions and learnings ---'
find /tmp/coderabbit-repo-knowledge/stackrox-jenkins-plugin-eb7623ab \
-maxdepth 2 -type f -name '*.md' -print
head -5 /tmp/coderabbit-repo-knowledge/stackrox-jenkins-plugin-eb7623ab/*/*.md 2>/dev/null || true
printf '%s\n' '--- functional test build entry points ---'
fd -a -t f . functionaltest-jenkins-plugin
rg -n -C 8 "(^|[[:space:]])(test|style|build|compile|gradle|gradlew|mvn|make)(:|[[:space:]]|$)|target/classes|functionaltest-jenkins-plugin" \
functionaltest-jenkins-plugin Makefile .github/workflows \
-g 'Makefile' -g '*.gradle' -g '*.yml' -g '*.yaml' -g '*.sh' 2>/dev/null || true
printf '%s\n' '--- build.gradle context ---'
cat -n functionaltest-jenkins-plugin/build.gradle | sed -n '1,120p'Repository: stackrox/jenkins-plugin Length of output: 11371 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- scanner classes consumed by the functional tests ---'
rg -n -C 5 "(import |stackrox|Scanner|Image)" \
functionaltest-jenkins-plugin/src \
-g '*.groovy' -g '*.java' || true
printf '%s\n' '--- exact build diff for the dependency and build entry points ---'
git diff -- functionaltest-jenkins-plugin/build.gradle functionaltest-jenkins-plugin/Makefile
printf '%s\n' '--- scanner Maven output configuration ---'
cat -n stackrox-container-image-scanner/pom.xml | sed -n '1,180p'Repository: stackrox/jenkins-plugin Length of output: 16502 Declare the scanner build prerequisite.
🤖 Prompt for AI Agents |
||
| implementation 'org.codehaus.groovy:groovy-all:3.0.8' | ||
| implementation 'org.spockframework:spock-core:2.0-groovy-3.0' | ||
| implementation 'com.offbytwo.jenkins:jenkins-client:0.3.8' | ||
|
|
||
There was a problem hiding this comment.
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
🔎 Supported by static analysis
🏁 Script executed:
Repository: stackrox/jenkins-plugin
Length of output: 1669
🏁 Script executed:
Repository: stackrox/jenkins-plugin
Length of output: 2564
🌐 Web query:
stackrox/stackrox deploy/k8s/deploy-local.sh app=scanner kubectl wait💡 Result:
The script
deploy-local.shprovided in thestackrox/stackroxrepository is a utility for deploying the StackRox Kubernetes Security Platform to a local Kubernetes environment (such as Docker Desktop, Colima, or minikube) [1][2]. There is no native or standard command incorporatingapp=scannerandkubectl waitdirectly into thedeploy-local.shexecution flow [1][3]. Thedeploy-local.shscript is intended to be run as an automated deployment command [1][2]. However, if you are attempting to wait for the Scanner component to become ready following a deployment or pod restart, you can use thekubectl waitcommand manually [4]. Given that the StackRox scanner typically uses the labelapp=scannerwithin thestackroxnamespace, you can use the following command structure: kubectl wait --for=condition=ready pod -n stackrox -l app=scanner --timeout=300s Explanation of the components: 1. --for=condition=ready: This instructs kubectl to wait until the pod reaches the 'Ready' condition [4]. 2. -n stackrox: Specifies the namespace where StackRox components are typically deployed [1][3]. 3. -l app=scanner: Selects the pods associated with the Scanner service using the common label selector [5][6]. 4. --timeout=300s: Sets an optional timeout (e.g., 5 minutes) to prevent the command from hanging indefinitely if the pods fail to start [4]. If you are following specific development or troubleshooting procedures that require verifying component status, ensure your current kube context is set correctly to the target cluster usingroxkubectxorkubectl config current-contextbefore running wait commands [1][3].Citations:
🏁 Script executed:
Repository: stackrox/jenkins-plugin
Length of output: 317
🏁 Script executed:
Repository: stackrox/jenkins-plugin
Length of output: 566
🏁 Script executed:
Repository: stackrox/jenkins-plugin
Length of output: 161
🏁 Script executed:
Repository: stackrox/jenkins-plugin
Length of output: 943
🏁 Script executed:
Repository: stackrox/jenkins-plugin
Length of output: 1599
🏁 Script executed:
Repository: stackrox/jenkins-plugin
Length of output: 20011
🏁 Script executed:
Repository: stackrox/jenkins-plugin
Length of output: 12223
🏁 Script executed:
Repository: stackrox/jenkins-plugin
Length of output: 15570
🏁 Script executed:
Repository: stackrox/jenkins-plugin
Length of output: 2126
🏁 Script executed:
Repository: stackrox/jenkins-plugin
Length of output: 12199
Make the readiness wait creation-aware.
The deployment installs the scanner resource but does not wait for its Pod to exist. If no
app=scannerPod exists whenkubectl waitevaluates the selector, it returnsno matching resources foundinstead of waiting for creation. Wait for creation beforeReady, or wait on the scanner Deployment.🧰 Tools
🪛 zizmor (1.29.0)
[warning] 14-96: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block
(excessive-permissions)
🤖 Prompt for AI Agents