Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions .github/workflows/upgrade-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Upgrade Repository Version

on:
repository_dispatch:
types: [upgrade-version]

jobs:
upgrade-version:
runs-on: ubuntu-24.04

permissions:
pull-requests: write
contents: write

steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.13'

- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip
pip install -r scripts/requirements.txt

- name: Set Variables
run: |
echo "REPOSITORY=${{ github.event.client_payload.repository }}" >> $GITHUB_ENV
echo "VERSION=${{ github.event.client_payload.version }}" >> $GITHUB_ENV

- name: Upgrade Version in TOML
run: |
python scripts/upgrade-version.py ${{ env.REPOSITORY }} ${{ env.VERSION }}

- name: Get Token from Github App
uses: tibdex/github-app-token@v2
id: generate-token
with:
app_id: ${{ secrets.GH_CI_APP_ID }}
private_key: ${{ secrets.GH_CI_APP_PRIVATE_KEY }}
repositories: >-
["hypertrace-bom"]

- name: Create Pull Request
id: create_pr
uses: peter-evans/create-pull-request@v6
with:
token: ${{ steps.generate-token.outputs.token }}
base: main
title: "chore(${{ env.REPOSITORY }}): Upgrade ${{ env.VERSION }}"
commit-message: "chore(${{ env.REPOSITORY }}): Upgrade ${{ env.VERSION }}"
body: "Upgrading (${{ env.REPOSITORY }}) to ${{ env.VERSION }}"
branch: update-version-${{ env.REPOSITORY }}-${{ env.VERSION }}
add-paths: |
gradle/libs.versions.toml

- name: Enable Auto Merge Pull Request
uses: peter-evans/enable-pull-request-automerge@v3
with:
token: ${{ steps.generate-token.outputs.token }}
pull-request-number: ${{ steps.create_pr.outputs.pull-request-number }}
merge-method: squash

- name: Auto Approve Pull Request
uses: hmarr/auto-approve-action@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
pull-request-number: ${{ steps.create_pr.outputs.pull-request-number }}
13 changes: 12 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[versions]
protoc = "3.25.5"
protoc = "3.25.8"
grpc = "1.68.3"
hypertrace-framework = "0.1.89"
hypertrace-grpcutils = "0.13.14"
Expand All @@ -16,11 +16,14 @@ junit = "5.10.0"
mockito = "5.8.0"

[libraries]
apache-httpcomponents-httpclient = { module = "org.apache.httpcomponents:httpclient", version = "4.5.13" }
awaitility = { module = "org.awaitility:awaitility", version = "4.0.3" }
guava = { module = "com.google.guava:guava", version = "32.1.2-jre" }
rholder-guava-retrying = { module = "com.github.rholder:guava-retrying", version = "2.0.0" }
gson = { module = "com.google.code.gson:gson", version = "2.13.1" }
guice = { module = "com.google.inject:guice", version = "6.0.0" }
guice7 = { module = "com.google.inject:guice", version = "7.0.0" }
guice-servlet = { module = "com.google.inject.extensions:guice-servlet", version = "7.0.0" }
google-re2j = { module = "com.google.re2j:re2j", version = "1.7" }
typesafe-config = { module = "com.typesafe:config", version = "1.4.2" }
lombok = { module = "org.projectlombok:lombok", version = "1.18.30" }
Expand All @@ -32,11 +35,17 @@ grpc-api = { module = "io.grpc:grpc-api" }
grpc-netty = { module = "io.grpc:grpc-netty" }
grpc-context = { module = "io.grpc:grpc-context" }
grpc-inprocess = { module = "io.grpc:grpc-inprocess" }
grpc-services = { module = "io.grpc:grpc-services" }
jackson-bom = { module = "com.fasterxml.jackson:jackson-bom", version = "2.16.1" }
jackson-databind = { module = "com.fasterxml.jackson.core:jackson-databind" }
jackson-datatype-jsr310 = { module = "com.fasterxml.jackson.datatype:jackson-datatype-jsr310" }
jackson-datatype-jdk8 = { module = "com.fasterxml.jackson.datatype:jackson-datatype-jdk8" }
jakarta-inject-api = { module = "jakarta.inject:jakarta.inject-api", version = "2.0.1" }
jakarta-servlet-api = { module = "jakarta.servlet:jakarta.servlet-api", version = "6.0.0" }
jetty-bom = { module = "org.eclipse.jetty:jetty-bom", version.ref = "jetty" }
jetty-servlet = { module = "org.eclipse.jetty:jetty-servlet" }
jetty-server = { module = "org.eclipse.jetty:jetty-server" }
jetty-servlets = { module = "org.eclipse.jetty:jetty-servlets" }
netty-bom = { module = "io.netty:netty-bom", version.ref = "netty" }
protobuf-java = { module = "com.google.protobuf:protobuf-java", version.ref = "protoc" }
protobuf-javautil = { module = "com.google.protobuf:protobuf-java-util", version.ref = "protoc" }
Expand All @@ -54,6 +63,7 @@ kafka-clients = { module = "org.apache.kafka:kafka-clients" }

hypertrace-grpcutils-context = { module = "org.hypertrace.core.grpcutils:grpc-context-utils", version.ref = "hypertrace-grpcutils" }
hypertrace-grpcutils-client = { module = "org.hypertrace.core.grpcutils:grpc-client-utils", version.ref = "hypertrace-grpcutils" }
hypertrace-grpcutils-server = { module = "org.hypertrace.core.grpcutils:grpc-server-utils", version.ref = "hypertrace-grpcutils" }
hypertrace-grpcutils-rx-client = { module = "org.hypertrace.core.grpcutils:grpc-client-rx-utils", version.ref = "hypertrace-grpcutils" }
hypertrace-grpcutils-rx-server = { module = "org.hypertrace.core.grpcutils:grpc-server-rx-utils", version.ref = "hypertrace-grpcutils" }

Expand Down Expand Up @@ -98,6 +108,7 @@ hypertrace-repository = { id = "org.hypertrace.repository-plugin", version = "0.
hypertrace-ciutils = { id = "org.hypertrace.ci-utils-plugin", version = "0.4.0" }
hypertrace-publish = { id = "org.hypertrace.publish-plugin", version = "1.1.1" }
hypertrace-jacoco = { id = "org.hypertrace.jacoco-report-plugin", version = "0.3.0" }
hypertrace-java-convention = { id = "org.hypertrace.java-convention", version = "0.4.0" }
hypertrace-integrationtest = { id = "org.hypertrace.integration-test-plugin", version = "0.3.0" }
hypertrace-codestyle = { id = "org.hypertrace.code-style-plugin", version = "2.2.0" }
hypertrace-docker-publish = { id = "org.hypertrace.docker-publish-plugin", version = "0.11.3" }
Expand Down
6 changes: 6 additions & 0 deletions hypertrace-bom/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ dependencies {
constraints {
api(libs.hypertrace.grpcutils.context)
api(libs.hypertrace.grpcutils.client)
api(libs.hypertrace.grpcutils.server)
api(libs.hypertrace.grpcutils.rx.client)
api(libs.hypertrace.grpcutils.rx.server)
api(libs.hypertrace.framework.grpc)
Expand Down Expand Up @@ -53,5 +54,10 @@ dependencies {
api(libs.commons.text)
api(libs.graphql.java)
api(libs.jsr305)
api(libs.apache.httpcomponents.httpclient)
api(libs.awaitility)
api(libs.guice.servlet)
api(libs.jakarta.inject.api)
api(libs.jakarta.servlet.api)
}
}
1 change: 1 addition & 0 deletions scripts/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tomlkit
25 changes: 25 additions & 0 deletions scripts/upgrade-version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import sys
import tomlkit

# key: github repository in the format org/repository
# value: version.ref for the corresponding repository in gradle/libs.versions.toml
REPOSITORY_TOML_KEYS = {
"hypertrace/java-grpc-utils": "hypertrace-grpcutils",
"hypertrace/service-framework": "hypertrace-framework",
"hypertrace/kafka-streams-framework": "hypertrace-kafka",
"hypertrace/config-service": "hypertrace-configservice",
}

repository = sys.argv[1]
version = sys.argv[2]

toml_file = 'gradle/libs.versions.toml'

with open(toml_file, 'r') as f:
toml_data = tomlkit.load(f)

toml_key = REPOSITORY_TOML_KEYS[repository]
toml_data['versions'][toml_key] = version

with open(toml_file, 'w') as f:
tomlkit.dump(toml_data, f)
10 changes: 10 additions & 0 deletions test-consumer/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ dependencies {
api(platform(projects.hypertraceBom))
api(libs.hypertrace.grpcutils.context)
api(libs.hypertrace.grpcutils.client)
api(libs.hypertrace.grpcutils.server)
api(libs.hypertrace.grpcutils.rx.client)
api(libs.hypertrace.grpcutils.rx.server)
api(libs.hypertrace.framework.grpc)
Expand All @@ -30,6 +31,7 @@ dependencies {
api(libs.gson)
api(libs.google.re2j)
api(libs.guice7)
api(libs.guice.servlet)
api(libs.typesafe.config)
api(libs.lombok)
api(libs.protobuf.java)
Expand All @@ -44,6 +46,7 @@ dependencies {
api(libs.grpc.context)
api(libs.grpc.inprocess)
api(libs.grpc.netty)
api(libs.grpc.services)
api(libs.slf4j2.api)
api(libs.log4j.slf4j2.impl)
api(libs.javax.annotation)
Expand All @@ -59,6 +62,13 @@ dependencies {
api(libs.hypertrace.framework.spi.jakarta)
api(libs.hypertrace.integrationtest.framework.jakarta)
api(libs.hypertrace.framework.documentstore.metrics.jakarta)
api(libs.apache.httpcomponents.httpclient)
api(libs.awaitility)
api(libs.jakarta.inject.api)
api(libs.jakarta.servlet.api)
api(libs.jetty.server)
api(libs.jetty.servlet)
api(libs.jetty.servlets)
}

tasks.register("verifyResolution") {
Expand Down