Skip to content

Commit

Permalink
Merge pull request #92 from RADAR-base/release-0.6.0
Browse files Browse the repository at this point in the history
Release 0.6.0
  • Loading branch information
blootsvoets authored Mar 29, 2023
2 parents 8af51f3 + 632bc56 commit 5039e14
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
KAFKA_CONFLUENT_VERSION=7.3.0
KAFKA_CONFLUENT_VERSION=7.3.2
23 changes: 13 additions & 10 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ plugins {

description = "RADAR Gateway to handle secured data flow to backend."
group = "org.radarbase"
version = "0.5.16"
version = "0.6.0"

repositories {
mavenCentral()
mavenLocal()
maven(url = "https://packages.confluent.io/maven/")
maven(url = "https://oss.sonatype.org/content/repositories/snapshots")
}
Expand Down Expand Up @@ -112,6 +113,7 @@ val integrationTest by tasks.registering(Test::class) {
testClassesDirs = integrationTestSourceSet.output.classesDirs
classpath = integrationTestSourceSet.runtimeClasspath
shouldRunAfter("test")
outputs.upToDateWhen { false }
}

tasks.withType<Test> {
Expand Down Expand Up @@ -182,19 +184,20 @@ tasks.register<Copy>("copyDependencies") {
}
}

fun isNonStable(version: String): Boolean {
val stableKeyword = listOf("RELEASE", "FINAL", "GA", "-CE").any { version.toUpperCase().contains(it) }
val regex = "^[0-9,.v-]+(-r)?$".toRegex()
val isStable = stableKeyword || regex.matches(version)
return isStable.not()
}

tasks.withType<DependencyUpdatesTask> {
doFirst {
allprojects {
repositories.removeAll {
it is MavenArtifactRepository && it.url.toString().contains("snapshot")
}
}
}
val isStable = "(^[0-9,.v-]+(-r)?|RELEASE|FINAL|GA|-CE)$".toRegex(RegexOption.IGNORE_CASE)
rejectVersionIf {
isNonStable(candidate.version)
!isStable.containsMatchIn(candidate.version)
}
}

tasks.wrapper {
gradleVersion = "8.0.1"
gradleVersion = "8.0.2"
}
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ services:
# Management Portal #
#---------------------------------------------------------------------------#
managementportal-app:
image: radarbase/management-portal:0.8.1
image: radarbase/management-portal:2.0.0
ports:
- "127.0.0.1:8080:8080"
environment:
Expand Down
18 changes: 9 additions & 9 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ dockerComposeStopContainers=true

kotlinVersion=1.8.10
ktlintVersion=0.48.2
ktlintPluginVersion=11.2.0
dockerComposeVersion=0.16.11
dependencyUpdatesVersion=0.45.0
ktlintPluginVersion=11.3.1
dockerComposeVersion=0.16.12
dependencyUpdatesVersion=0.46.0

okhttp3Version=4.10.0
radarJerseyVersion=0.9.2
radarJerseyVersion=0.10.0
radarCommonsVersion=0.15.0
radarSchemasVersion=0.8.2
jacksonVersion=2.14.2
slf4jVersion=2.0.6
log4j2Version=2.19.0
slf4jVersion=2.0.7
log4j2Version=2.20.0
lzfseVersion=0.1.1
radarAuthVersion=0.8.1
radarAuthVersion=2.0.0
avroVersion=1.11.1
kafkaVersion=7.3.1-ce
confluentVersion=7.3.1
kafkaVersion=7.3.2-ce
confluentVersion=7.3.2

mockitoKotlinVersion=4.1.0
junitVersion=5.9.2
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion src/integrationTest/docker/.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
KAFKA_CONFLUENT_VERSION=7.3.0
KAFKA_CONFLUENT_VERSION=7.3.2
RADAR_GATEWAY_TAG=SNAPSHOT
6 changes: 5 additions & 1 deletion src/integrationTest/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ services:
# Management Portal #
#---------------------------------------------------------------------------#
managementportal-app:
image: radarbase/management-portal:0.8.0
image: radarbase/management-portal:2.0.0
ports:
- "127.0.0.1:8080:8080"
environment:
Expand All @@ -95,5 +95,9 @@ services:
- managementportal-app
ports:
- "127.0.0.1:8092:8092"
command:
- sh
- -c
- "sleep 30; exec radar-gateway"
volumes:
- ./etc/gateway.yml:/etc/radar-gateway/gateway.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@ class GatewayResourceEnhancer(private val config: GatewayConfig) : JerseyResourc

/** Project service without validation of the project's existence. */
class UnverifiedProjectService : ProjectService {
override fun ensureOrganization(organizationId: String) = Unit

override fun ensureProject(projectId: String) = Unit

override fun ensureSubject(projectId: String, userId: String) = Unit

override fun listProjects(organizationId: String): List<String> = emptyList()

override fun projectOrganization(projectId: String): String = "main"
}
}
7 changes: 3 additions & 4 deletions src/main/kotlin/org/radarbase/gateway/resource/KafkaTopics.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import jakarta.inject.Singleton
import jakarta.ws.rs.*
import jakarta.ws.rs.core.Context
import jakarta.ws.rs.core.Response
import org.radarbase.auth.authorization.Permission.Entity.MEASUREMENT
import org.radarbase.auth.authorization.Permission.Operation.CREATE
import org.radarbase.auth.authorization.Permission.MEASUREMENT_CREATE
import org.radarbase.gateway.inject.ProcessAvro
import org.radarbase.gateway.io.AvroProcessor
import org.radarbase.gateway.io.BinaryToAvroConverter
Expand Down Expand Up @@ -62,7 +61,7 @@ class KafkaTopics(
@Path("/{topic_name}")
@POST
@Consumes(ACCEPT_JSON, ACCEPT_AVRO_V1_JSON, ACCEPT_AVRO_V2_JSON, ACCEPT_AVRO_V3_JSON, ACCEPT_AVRO_NON_SPECIFIC)
@NeedsPermission(MEASUREMENT, CREATE)
@NeedsPermission(MEASUREMENT_CREATE)
@ProcessAvro
fun postToTopic(
tree: JsonNode,
Expand All @@ -79,7 +78,7 @@ class KafkaTopics(
@POST
@ProcessAvro
@Consumes(ACCEPT_BINARY_NON_SPECIFIC, ACCEPT_BINARY_V1)
@NeedsPermission(MEASUREMENT, CREATE)
@NeedsPermission(MEASUREMENT_CREATE)
fun postToTopicBinary(
input: InputStream,
@Context binaryToAvroConverter: BinaryToAvroConverter,
Expand Down

0 comments on commit 5039e14

Please sign in to comment.