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 Jan 29, 2025
2 parents f96d0b9 + d3dfee9 commit 4b9c9f5
Show file tree
Hide file tree
Showing 99 changed files with 2,538 additions and 476 deletions.
19 changes: 18 additions & 1 deletion .github/workflows/typespec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ on:
- '**'
paths :
- 'typespec/**'
- VERSION
pull_request:
types: [opened, reopened, synchronize]
paths:
- 'typespec/**'
- VERSION

permissions:
contents: read
Expand All @@ -30,11 +32,26 @@ jobs:
node-version : '20.9.0'

- name : Install tsp
run : npm install -g @typespec/compiler
run : npm install -g @typespec/compiler@0.64.0

- name : Validate tsp files
run : |
cd typespec
tsp install
tsp compile .
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{secrets.TOWER_CI_AWS_ACCESS}}
aws-secret-access-key: ${{secrets.TOWER_CI_AWS_SECRET}}
aws-region: eu-west-1

- name : Login to Amazon ECR
id : login-ecr
uses : aws-actions/amazon-ecr-login@v1

- name: Release OpenAPI docs
if: "contains(github.event.head_commit.message, '[release]')"
run: |
bash typespec/tag-and-push-openapi.sh
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.15.5
1.16.8
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ repositories {
mavenCentral()
maven { url = 'https://s3-eu-west-1.amazonaws.com/maven.seqera.io/releases' }
maven { url = 'https://s3-eu-west-1.amazonaws.com/maven.seqera.io/snapshots' }
maven { url = 'https://jitpack.io' }
}

dependencies {
Expand All @@ -35,9 +34,10 @@ dependencies {
compileOnly 'io.micronaut:micronaut-inject-groovy'
compileOnly 'io.micronaut:micronaut-http-validation'
implementation 'jakarta.persistence:jakarta.persistence-api:3.0.0'
api 'io.seqera:lib-mail:1.2.1'
api 'io.seqera:wave-api:0.14.0'
api 'io.seqera:wave-utils:0.15.0'
implementation 'io.seqera:lib-mail:1.2.1'
implementation 'io.seqera:lib-pool:1.0.0'
implementation 'io.seqera:wave-api:0.14.0'
implementation 'io.seqera:wave-utils:0.15.0'
implementation 'io.seqera:lib-crypto:1.0.0'
implementation 'io.micronaut:micronaut-http-client'
implementation 'io.micronaut:micronaut-jackson-databind'
Expand Down Expand Up @@ -88,7 +88,7 @@ dependencies {
testImplementation 'org.testcontainers:mysql:1.17.3'

// --
implementation 'ch.qos.logback:logback-classic:1.5.12'
implementation 'ch.qos.logback:logback-classic:1.5.13'

// rate limit
implementation 'com.coveo:spillway:3.0.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,12 @@ repositories {
}

java {
// these settings apply to all jvm tooling, including groovy
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}

compileJava {
options.release.set(17)
}

tasks.withType(GroovyCompile).configureEach {
sourceCompatibility = '17'
targetCompatibility = '17'
sourceCompatibility = 17
targetCompatibility = 17
}

group = 'io.seqera'
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,12 @@ repositories {
}

java {
// these settings apply to all jvm tooling, including groovy
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}

compileJava {
options.release.set(17)
}

tasks.withType(GroovyCompile).configureEach {
sourceCompatibility = '17'
targetCompatibility = '17'
sourceCompatibility = 17
targetCompatibility = 17
}

test {
Expand All @@ -43,8 +37,8 @@ dependencies {
implementation 'org.slf4j:slf4j-api:2.0.16'
implementation 'org.slf4j:slf4j-jdk-platform-logging:2.0.16'

testImplementation 'ch.qos.logback:logback-core:1.5.12'
testImplementation 'ch.qos.logback:logback-classic:1.5.12'
testImplementation 'ch.qos.logback:logback-core:1.5.13'
testImplementation 'ch.qos.logback:logback-classic:1.5.13'
testImplementation 'org.apache.groovy:groovy:4.0.15'
testImplementation 'org.apache.groovy:groovy-nio:4.0.15'
testImplementation 'org.apache.groovy:groovy-test:4.0.15'
Expand Down
56 changes: 56 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,60 @@
# Wave changelog
1.16.8 - 20 Jab 2025
- Add TraceContextFilter logging context propagation [396c10c2]
- Improve Proxy cache configuration [163e605f]
- Improve logging pattern [0ab87164]
- Improve request caching logic [a95153be]
- Bump MN 4.7.4 [4ce2a139]

1.16.7 - 10 Jan 2025
- Improve logging on pairing websocket error [21861dbe]

1.16.6 - 7 Jan 2025
- Fix Use caffeine for tiered cache lock cache (#785) [bb5f4dd0]
- Tune trace timeouts [d6bf2236]

1.16.5 - 30 Dec 2024
- Fix Missing legacy classes deserialization [7687cd24]

1.16.4 - 30 Dec 2024
- Add custom toString method DelegateResponse class [6feb386a]
- Add isTraceEnable if guard to log traces [166ca37f]
- Add trace execution elapsed time logic (#497) [9e25687f]
- Fix duplicate add-opens option in launch script [a2722115]
- Fix invalid expiresAt time in L1 tiered cache [38737127]
- Fix missing workspaceId in launch API (#780) [c0d41336]
- Use look pool for cache sync [29db0360]
- Use blocking executor with PullMetricsRequestsFilter class [e10f3275]
- Use lib-pool library [33d9d4d3]
- Use platform thread to read target request body [053ba8d9]
- Refactor container request service [955d9894]
- Refactor platform client model [8c7a9825]
- Remove unneeded user async api (#781) [814c35ee]
- Bump MN 4.7.2 [702658b2]

1.16.3 - 22 Dec 2024
- Improve tiered cache (#779) [01d5f183]
- Bump logback 1.5.13 [1466c276]

1.16.2 - 20 Dec 2024
- Fix JWT token refresh [52a5ebd7]

1.16.1 - 20 Dec 2024
- Add tiered cache for HTTP proxied responses (#778) [00b6add7]
- Improve bootstrap info [d5c086da]
- Remove jitpack [67f91c8b]

1.16.0 - 17 Dec 2024
- Add support for mills resolution future store [252e0985]
- Fix Condalock fetching for cached build layers (#727) [13a59373]
- Fix NPE while creating PairingOutboundQueue (#770) [215f6da8]
- Improve Tower client caching via Tiered cache (#772) [f0ca0f62]
- Improve logging for connect response events [f94eb6fa]
- Improving pairing tracing [b743c136]
- Replace volatile with final (#771) [df2ddb96]
- Strengthen conda naming strategy [d72b69c3]
- User email as rate limiter key [eddc9ee9]

1.15.5 - 9 Dec 2024
- Add Jedis pool metrics binder (#756) [a6b2833d]
- Add jul-to-slf4j dependency [2874187b]
Expand Down
6 changes: 3 additions & 3 deletions configuration.md → docs/configuration.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Wave Application Configuration

Set Wave configuration values using environment variables or in [`config.yml`](./config.yml) configuration file
Set Wave configuration values using environment variables or in [`config.yml`](https://github.com/seqeralabs/wave/blob/master/config.yml) configuration file

### config.yml configuration

Declare YAML configuration values in [`config.yml`](./config.yml)
Declare YAML configuration values in [`config.yml`](https://github.com/seqeralabs/wave/blob/master/config.yml)
```
wave:
mail:
Expand Down Expand Up @@ -39,7 +39,7 @@ The generic format for the attributes is `wave.registries.<registry_name>.userna
You need to specify all the repositories you will use in the respective wave installation.
Below are the standard format for known registries, but you can change registry name `(azurecr.io)` to specific one like `seqeralabs.azurecr.io `.

**Note**: Container registry credentials can be defined in [`config.yml`](./config.yml) too. These configurations are important for the wave authentication to the repositories used to push or pull artifacts.
**Note**: Container registry credentials can be defined in [`config.yml`](https://github.com/seqeralabs/wave/blob/master/config.yml) too. These configurations are important for the wave authentication to the repositories used to push or pull artifacts.

- **`wave.registries.default`**: the default Docker registry for Wave. The default is `docker.io`, and it represents the Docker Hub. *Optional*.

Expand Down
4 changes: 1 addition & 3 deletions docs/metrics.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
---
title: Usage metrics
---
# Usage metrics

Wave uses Redis to store its usage metrics for a specific date and/or a specific organization.

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#

micronautVersion=4.7.1
micronautVersion=4.7.4
micronautEnvs=dev,h2,mail,aws-ses
41 changes: 41 additions & 0 deletions src/main/groovy/io/seqera/util/trace/TraceElapsedTime.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* Wave, containers provisioning service
* Copyright (c) 2023-2024, Seqera Labs
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

package io.seqera.util.trace

import java.lang.annotation.Documented
import java.lang.annotation.Retention
import java.lang.annotation.Target

import io.micronaut.aop.Around
import static java.lang.annotation.ElementType.METHOD
import static java.lang.annotation.ElementType.TYPE
import static java.lang.annotation.RetentionPolicy.RUNTIME
/**
* When applied to a method or a class the elapsed time to carry out the method execution
* is reported in the application log file
*
* @author Paolo Di Tommaso <[email protected]>
*/
@Documented
@Retention(RUNTIME)
@Target([TYPE, METHOD])
@Around
@interface TraceElapsedTime {
String thresholdMillis() default '0'
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
/*
* Wave, containers provisioning service
* Copyright (c) 2023-2024, Seqera Labs
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

package io.seqera.util.trace

import java.time.Duration

import groovy.transform.CompileStatic
import groovy.util.logging.Slf4j
import io.micronaut.aop.InterceptorBean
import io.micronaut.aop.MethodInterceptor
import io.micronaut.aop.MethodInvocationContext
import jakarta.inject.Singleton
/**
* Implements an method interceptor that logs the elapsed time to carry out the execution
* of method invocation.
*
* This interceptor is applied to classes or methods marked in the {@link TraceElapsedTime} annotation
*
* @author Paolo Di Tommaso <[email protected]>
*/
@CompileStatic
@Slf4j
@Singleton
@InterceptorBean(TraceElapsedTime)
class TraceElapsedTimeInterceptor implements MethodInterceptor<Object,Object> {

@Override
Object intercept(MethodInvocationContext<Object, Object> context) {
// get the threshold value from the TraceElapsedTime annotation
final annot = context.getAnnotation(TraceElapsedTime)
final threshold = annot.intValue('thresholdMillis').orElse(0)

// apply it
Object result=null
final begin = System.currentTimeMillis()
try {
return result = context.proceed()
}
finally {
final delta = System.currentTimeMillis() - begin
if( delta>=threshold ) {
log.warn(msg(delta,context,result))
}
}
}

static private String msg(long delta,MethodInvocationContext<Object, Object> context, Object result) {
final method = context.getDeclaringType().getSimpleName() + '.' + context.getMethodName()
def msg = "Slow method detected - elapsed time: ${Duration.ofMillis(delta)}"
msg += "\n - name : ${method}"
for( Map.Entry entry : context.getParameterValueMap() ) {
msg += "\n - parameter: ${entry.key}=${entry.value}"
}
if( !context.getReturnType().isVoid() )
msg += "\n - result : ${result}"
return msg
}
}
2 changes: 1 addition & 1 deletion src/main/groovy/io/seqera/wave/Application.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import io.seqera.wave.util.RuntimeInfo
class Application {

static void main(String[] args) {
log.info( "Starting ${BuildInfo.name} - version: ${BuildInfo.fullVersion} - ${RuntimeInfo.info('; ')} - CPUs ${Runtime.runtime.availableProcessors()}" )
log.info( "Starting ${BuildInfo.name} - version: ${BuildInfo.fullVersion} - ${RuntimeInfo.info('; ')}" )
setupConfig()
Micronaut.build(args)
.banner(false)
Expand Down
Loading

0 comments on commit 4b9c9f5

Please sign in to comment.