Skip to content

GROOVY-12270: JmxBuilder - Map connector authentication properties onto the keys a connector consumes #2434

GROOVY-12270: JmxBuilder - Map connector authentication properties onto the keys a connector consumes

GROOVY-12270: JmxBuilder - Map connector authentication properties onto the keys a connector consumes #2434

# 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.
name: Performance check
on:
push:
branches:
- master
- GROOVY_*
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
contents: read
pull-requests: write # dispatch-metrics regression comments
issues: write
jobs:
test:
if: >-
contains(github.event.head_commit.message || '', 'GROOVY-') ||
contains(github.event.pull_request.title || '', 'GROOVY-')
strategy:
fail-fast: false
runs-on: ubuntu-latest
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
steps:
- uses: actions/checkout@v7.0.1
- uses: actions/setup-java@v5.7.0
with:
distribution: 'zulu'
java-version: 21
check-latest: true
# Cache downloaded dependency jars/poms + wrapper dists, keyed per
# branch; see groovy-build-test.yml (lts job) for the full rationale.
# The `perf` key segment keeps a cache lineage for the perf/JMH
# workflow family, whose dependency set differs from the main build.
- name: "🗄 Cache Gradle dependencies (~/.gradle/caches/modules-2 + wrapper)"
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
~/.gradle/caches/modules-2
~/.gradle/wrapper
key: gradle-deps-${{ runner.os }}-perf-${{ github.base_ref || github.ref_name }}-${{ hashFiles('versions.properties', 'gradle/wrapper/gradle-wrapper.properties', 'settings.gradle', 'build-logic/build.gradle') }}
restore-keys: |
gradle-deps-${{ runner.os }}-perf-${{ github.base_ref || github.ref_name }}-
- uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
# The action's own caching is disabled: dependency jars and wrapper
# dists are cached by the explicit branch-keyed step above instead.
with:
cache-disabled: true
- name: Compiler performance comparison
run: ./gradlew perf:performanceTests
timeout-minutes: 60
# Deterministic dispatch metrics (class-loading and bytecode-size
# counters). Unlike the timing benchmarks these are exact for a given
# JDK + Groovy build, so comparing against history published from
# *different* runner hardware is sound and the threshold can be tight.
- name: Dispatch metrics
run: ./gradlew perf:dispatchMetrics
timeout-minutes: 20
- name: Fetch dispatch metrics baseline
id: dispatch-baseline
run: |
URL="https://apache.github.io/groovy/dev/bench/perf/dispatch/data.js"
# --proto / --proto-redir pin HTTPS so a redirect cannot downgrade to HTTP (githubactions:S6506)
if curl -fsSL --proto '=https' --proto-redir '=https' "$URL" -o dispatch-data.js; then
sed -e 's/^window\.BENCHMARK_DATA = //' -e 's/;[[:space:]]*$//' dispatch-data.js > dispatch-prev.json
echo 'found=true' >> "$GITHUB_OUTPUT"
else
# perf-daily has not published dispatch metrics yet; the action
# cannot handle an empty external data file, so skip the compare.
echo 'No dispatch metrics baseline on gh-pages yet; skipping comparison.'
echo 'found=false' >> "$GITHUB_OUTPUT"
fi
- name: Compare dispatch metrics against history
if: steps.dispatch-baseline.outputs.found == 'true'
uses: benchmark-action/github-action-benchmark@52576c92bccf6ac60c8223ec7eb2565637cae9ba # v1.22.1
with:
name: 'Dispatch Metrics'
tool: 'customSmallerIsBetter'
output-file-path: subprojects/performance/build/dispatch-metrics.json
external-data-json-path: ./dispatch-prev.json
save-data-file: false
summary-always: true
# fork PRs get a read-only token; commenting there would 403 and fail the step
comment-on-alert: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
alert-threshold: '110%'
fail-on-alert: false
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload perf report
uses: actions/upload-artifact@v7
with:
name: perf-reports
path: |
subprojects/performance/build/*.csv
subprojects/performance/build/dispatch-metrics.json