Registry Mirror
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter
Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,39 @@
# permissions and limitations under the License.
#
# --------------------------------------------------------------------
# datalake gRPC contract
# datalake agent
#
# The proto files are the contract between datalake_fdw and
# datalake_agent, and nothing generated from them is committed: each
# side runs protoc when it builds. This checks, on every change to
# them, that both generators accept them -- the C++ one the extension
# will build with and the Java one the agent will -- so a contract that
# only one side can compile never lands.
# contrib/datalake_agent is a Java service with its own Maven build;
# the PostgreSQL build neither needs nor runs it. On every change to it
# or to the contract it compiles from, two jobs run side by side:
#
# - proto: the proto files are the contract between datalake_fdw and
# datalake_agent, and nothing generated from them is committed: each
# side runs protoc when it builds. This checks that both generators
# accept them -- the C++ one the extension builds with and the Java
# one the agent builds with -- so a contract that only one side can
# compile never lands.
#
# - verify: "mvn -B verify": the protos, the unit and gRPC tests
# (in-process, over a Unix socket, and over TCP with TLS), a cold
# start of the agent in its own JVM, and the module's RAT check.
# --------------------------------------------------------------------

name: datalake proto
name: datalake agent

on:
push:
branches: [main]
paths:
- 'contrib/datalake_agent/proto/**'
- 'contrib/datalake_agent/**'
- 'contrib/datalake_fdw/src/meta/*.proto'
- '.github/workflows/datalake-proto.yml'
- '.github/workflows/datalake-agent.yml'
pull_request:
branches: [main]
paths:
- 'contrib/datalake_agent/proto/**'
- 'contrib/datalake_agent/**'
- 'contrib/datalake_fdw/src/meta/*.proto'
- '.github/workflows/datalake-proto.yml'
- '.github/workflows/datalake-agent.yml'
workflow_dispatch:

permissions:
Expand All @@ -52,7 +60,7 @@ concurrency:
cancel-in-progress: true

jobs:
generate:
proto:
runs-on: ubuntu-24.04
timeout-minutes: 10
env:
Expand Down Expand Up @@ -136,3 +144,35 @@ jobs:
printf '%s\n' "${stray}"
exit 1
fi

verify:
runs-on: ubuntu-24.04
timeout-minutes: 20

steps:
- name: Check out repository
uses: actions/checkout@v7
with:
fetch-depth: 1

# The agent targets Java 17, the oldest JDK it supports.
- name: Set up Java and Maven
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '17'
cache: maven

- name: Build and test
working-directory: contrib/datalake_agent
run: mvn -B verify

- name: Upload test reports
if: failure()
uses: actions/upload-artifact@v7
with:
name: datalake-agent-test-reports
path: |
contrib/datalake_agent/target/surefire-reports/
contrib/datalake_agent/target/rat.txt
if-no-files-found: ignore
18 changes: 18 additions & 0 deletions contrib/datalake_agent/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

target/
Loading
Loading