Skip to content

Commit

Permalink
Merge branch 'master' into 708-rename-defaultpublicregistry-to-defaul…
Browse files Browse the repository at this point in the history
…tcommunityregistry
  • Loading branch information
munishchouhan authored Oct 23, 2024
2 parents 043194e + a958a06 commit 673b004
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 17 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/security-submit-dependecy-graph.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Generate and submit dependency graph for wave
on:
push:
branches: ['master']

permissions:
contents: write

jobs:
dependency-submission:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17

- name: Generate and submit dependency graph for wave
uses: gradle/actions/dependency-submission@v4
with:
dependency-resolution-task: "dependencies"
additional-arguments: "--configuration runtimeClasspath"
dependency-graph: generate-and-submit
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.13.4
1.13.5
8 changes: 8 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
# Wave changelog
1.13.5 - 23 Oct 2024
- Fix Do not render inspect url on fail [d96275a1]
- Fix inspect view empty nodes (#706) [b3473b7e]
- Fix prevent scan on cached failed builds [4473fe8c]
- Use JedisPool in place of generic connection pool (#711) [cd16cfd1]
- Minor page title change [c3be9304]
- GHA to submit dependency graph to Github (#715) [09c86627]

1.13.4 - 20 Oct 2024
- Add scan failure duration setting (#705) [372d6dec]
- Change scan config log to info [f382c51a]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ class ViewController {
binding.scan_url = result.scanId && result.succeeded() ? "$serverUrl/view/scans/${result.scanId}" : null
binding.scan_id = result.scanId
// inspect uri
binding.inspect_url = "$serverUrl/view/inspect?image=${result.targetImage}&platform=${result.platform}"
binding.inspect_url = result.succeeded() ? "$serverUrl/view/inspect?image=${result.targetImage}&platform=${result.platform}" : null
// configure build logs when available
if( buildLogService ) {
final buildLog = buildLogService.fetchLogString(result.buildId)
Expand Down
6 changes: 2 additions & 4 deletions src/main/groovy/io/seqera/wave/redis/RedisFactory.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,14 @@

package io.seqera.wave.redis


import groovy.transform.CompileStatic
import groovy.util.logging.Slf4j
import io.micronaut.context.annotation.Factory
import io.micronaut.context.annotation.Requires
import io.micronaut.context.annotation.Value
import jakarta.inject.Singleton
import org.apache.commons.pool2.impl.GenericObjectPoolConfig
import redis.clients.jedis.JedisPool

import redis.clients.jedis.JedisPoolConfig
/**
* Redis connection pool factory
*
Expand All @@ -47,7 +45,7 @@ class RedisFactory {
@Value('${redis.pool.maxTotal:50}') int maxTotal
) {
log.info "Using redis $uri as storage for rate limit - pool minIdle: ${minIdle}; maxIdle: ${maxIdle}; maxTotal: ${maxTotal}"
final config = new GenericObjectPoolConfig()
final config = new JedisPoolConfig()
config.setMinIdle(minIdle)
config.setMaxIdle(maxIdle)
config.setMaxTotal(maxTotal)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,12 @@ class ContainerScanServiceImpl implements ContainerScanService, JobHandler<ScanE
log.debug "Container scan required by scanOnRequest=$request"
scan(fromContainer(request))
}
else if( request.scanId && !request.isContainer() && request.buildNew==false && !request.dryRun && !existsScan(request.scanId) ) {
else if( request.scanId && !request.isContainer() && request.buildNew==false && request.succeeded && !request.dryRun && !existsScan(request.scanId) ) {
log.debug "Container scan required by cached request=$request"
scan(fromContainer(request))
}
else {
log.debug "Container scan NOT required by scanOnRequest=$request"
log.debug "Container scan NOT required by request=$request"
}
}
catch (Exception e) {
Expand Down
4 changes: 3 additions & 1 deletion src/main/resources/io/seqera/wave/build-view.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,10 @@
<td>Container image</td>
{{#if build_in_progress}}
<td>{{build_image}}</td>
{{else}}
{{else if inspect_url}}
<td><a href="{{inspect_url}}">{{build_image}}</a></td>
{{else}}
<td>{{build_image}}</td>
{{/if}}
</tr>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ class ContainerScanServiceImplTest extends Specification {
request.buildId >> BUILD_ID
request.buildNew >> BUILD_NEW
request.dryRun >> DRY_RUN
request.succeeded >> SUCCEEDED
and:
def scan = Mock(ScanRequest)

Expand All @@ -412,15 +413,16 @@ class ContainerScanServiceImplTest extends Specification {
RUN_TIMES * scanService.scan(scan) >> null

where:
SCAN_ID | BUILD_ID | BUILD_NEW | DRY_RUN | EXISTS_SCAN | RUN_TIMES
null | null | null | null | false | 0
'sc-123'| null | null | null | false | 0
SCAN_ID | BUILD_ID | BUILD_NEW | SUCCEEDED | DRY_RUN | EXISTS_SCAN | RUN_TIMES
null | null | null | null | null | false | 0
'sc-123'| null | null | null | null | false | 0
and:
'sc-123'| 'bd-123' | null | null | false | 0
'sc-123'| 'bd-123' | true | null | false | 0
'sc-123'| 'bd-123' | false | null | false | 1
'sc-123'| 'bd-123' | false | null | true | 0
'sc-123'| 'bd-123' | false | true | false | 0
'sc-123'| 'bd-123' | null | null | null | false | 0
'sc-123'| 'bd-123' | true | null | null | false | 0
'sc-123'| 'bd-123' | false | true | null | false | 1
'sc-123'| 'bd-123' | false | false | null | false | 0
'sc-123'| 'bd-123' | false | null | null | true | 0
'sc-123'| 'bd-123' | false | null | true | false | 0
}

def 'should store scan entry' () {
Expand Down

0 comments on commit 673b004

Please sign in to comment.