Skip to content

Commit

Permalink
Merge branch 'deephaven:main' into docs-ci-condition-on-latest-link
Browse files Browse the repository at this point in the history
  • Loading branch information
stanbrub authored Jan 24, 2025
2 parents 4244e72 + 5f62c5b commit 57b0f95
Show file tree
Hide file tree
Showing 576 changed files with 14,418 additions and 6,696 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ concurrency:

jobs:
server:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -125,7 +125,7 @@ jobs:
push: false

web-plugin-packager:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ concurrency:

jobs:
checks:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:

jobs:
CLAssistant:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
if: ${{ github.repository_owner == 'deephaven' }}
steps:
- name: "CLA Assistant"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/conventional-pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
pr-check:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: amannn/action-semantic-pull-request@v5
id: lint_pr_title
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/create-docs-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
create-docs-ticket:
# Only on merged PRs that contain the DocumentationNeeded flag
if: github.event.pull_request.merged && contains(github.event.pull_request.labels.*.name, 'DocumentationNeeded')
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4

Expand All @@ -26,12 +26,13 @@ jobs:
await script({github, context});
- name: Slack Failure Message
uses: slackapi/slack-github-action@v1.27.0
uses: slackapi/slack-github-action@v2.0.0
id: slack-failure-message
if: failure() && github.ref == 'refs/heads/main' && github.repository_owner == 'deephaven'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_DEVREL }}
with:
webhook-type: webhook-trigger
payload: |
{
"repository": "${{ github.repository }}",
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependency-submission.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ permissions:

jobs:
dependency-submission:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/docs-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
makedirs:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Make Directories
run: |
Expand All @@ -32,7 +32,7 @@ jobs:
symlink:
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release/v') }}
needs: [javadoc, typedoc, pydoc, cppdoc, rdoc, protodoc]
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Setup Git
uses: actions/checkout@v4
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
remote_key: ${{ secrets.DEEPHAVEN_CORE_SSH_KEY }}
javadoc:
needs: [makedirs]
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
concurrency:
group: javadoc-${{ github.workflow }}-${{ github.ref }}
# We don't want to cancel in-progress jobs against main because that might leave the upload in a bad state.
Expand Down Expand Up @@ -123,7 +123,7 @@ jobs:

typedoc:
needs: [makedirs]
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
concurrency:
group: typedoc-${{ github.workflow }}-${{ github.ref }}
# We don't want to cancel in-progress jobs against main because that might leave the upload in a bad state.
Expand Down Expand Up @@ -185,7 +185,7 @@ jobs:

pydoc:
needs: [makedirs]
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
concurrency:
group: pydoc-${{ github.workflow }}-${{ github.ref }}
# We don't want to cancel in-progress jobs against main because that might leave the upload in a bad state.
Expand Down Expand Up @@ -274,7 +274,7 @@ jobs:

cppdoc:
needs: [makedirs]
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
concurrency:
group: cppdoc-${{ github.workflow }}-${{ github.ref }}
# We don't want to cancel in-progress jobs against main because that might leave the upload in a bad state.
Expand Down Expand Up @@ -348,7 +348,7 @@ jobs:

rdoc:
needs: [makedirs]
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
concurrency:
group: rdoc-${{ github.workflow }}-${{ github.ref }}
# We don't want to cancel in-progress jobs against main because that might leave the upload in a bad state.
Expand Down Expand Up @@ -407,7 +407,7 @@ jobs:

protodoc:
needs: [makedirs]
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
concurrency:
group: protodoc-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/label-check-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:

jobs:
doc-labels:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -26,7 +26,7 @@ jobs:
run: .github/scripts/check-doc-labels.sh

releasenotes-labels:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
linkChecker:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
issues: write
if: ${{ github.repository_owner == 'deephaven' }}
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/nightly-check-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
gradle-task: ['check', 'testSerial', 'testParallel', 'testOutOfBand']
test-jvm-version: ['11', '17', '21', '23']
if: ${{ github.repository_owner == 'deephaven' || github.event_name != 'schedule' }}
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
concurrency:
group: ${{ matrix.gradle-task }}-${{ matrix.test-jvm-version }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand Down Expand Up @@ -100,13 +100,14 @@ jobs:
report_paths: '**/build/test-results/*/TEST-*.xml'

- name: Slack Nightly Failure
uses: slackapi/slack-github-action@v1.27.0
uses: slackapi/slack-github-action@v2.0.0
id: slack-nightly-failure
if: ${{ failure() && github.repository_owner == 'deephaven' && github.ref == 'refs/heads/main' }}
with:
webhook-type: webhook-trigger
payload: |
{
"slack_message": "Nightly build failure in ${{ matrix.gradle-task }} on Java ${{ matrix.test-jvm-version }} @ ${{ github.head_ref }} ${{ github.sha }}"
"slack_message": "Nightly build failure in ${{ matrix.gradle-task }} on Java ${{ matrix.test-jvm-version }} @ ${{ github.head_ref }} ${{ github.sha }}" ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_NIGHTLY_FAILURE }}
5 changes: 3 additions & 2 deletions .github/workflows/nightly-image-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
compare:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
if: ${{ github.repository_owner == 'deephaven' }}
steps:
- name: Checkout
Expand Down Expand Up @@ -35,10 +35,11 @@ jobs:
run: ./gradlew --continue pullImage compareImage

- name: Notify Slack
uses: slackapi/slack-github-action@v1.27.0
uses: slackapi/slack-github-action@v2.0.0
id: notify-slack
if: ${{ failure() }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_DHC_NOTIFY }}
with:
webhook-type: webhook-trigger
payload: '{"repository": "${{ github.repository }}", "message": "${{ github.workflow }}/${{ github.job }} failure, some image is out of date", "link": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"}'
5 changes: 3 additions & 2 deletions .github/workflows/nightly-publish-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,14 @@ jobs:
ORG_GRADLE_PROJECT_signingRequired: true

- name: Slack Nightly Failure
uses: slackapi/slack-github-action@v1.27.0
uses: slackapi/slack-github-action@v2.0.0
id: slack-nightly-failure
if: failure()
with:
webhook-type: webhook-trigger
payload: |
{
"slack_message": "Nightly publish failure @ ${{ github.head_ref }} ${{ github.sha }}"
"slack_message": "Nightly publish failure @ ${{ github.head_ref }} ${{ github.sha }} ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_NIGHTLY_FAILURE }}
2 changes: 1 addition & 1 deletion .github/workflows/publish-check-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
jobs:
# Job based on https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
publish-check-ci:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
# Unfortunately, the official actions/download-artifact action is very limited in scope.
# Can't use it yet in this context, https://github.com/actions/download-artifact/issues/60
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ concurrency:

jobs:
publish:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
permissions:
id-token: write
steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/quick-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ concurrency:

jobs:
quick:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
if-no-files-found: ignore

verify-python-min-version:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tag-base-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ concurrency:

jobs:
tag-base-images:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Update web version
on: workflow_dispatch
jobs:
update-web:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checkout latest
uses: actions/checkout@v4
Expand Down
41 changes: 41 additions & 0 deletions Base/src/main/java/io/deephaven/base/AtomicUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.atomic.AtomicLongFieldUpdater;

public abstract class AtomicUtil {

Expand Down Expand Up @@ -267,4 +268,44 @@ public static int atomicAndNot(AtomicInteger i, int mask) {
} while (!i.compareAndSet(expect, update));
return update;
}

/**
* Sets the field to the minimum of the current value and the passed in value
*
* @param o the object to update
* @param fu the field updater
* @param value the value that is a candidate for the minumum
* @return true if the minimum was set
* @param <T> the type of o
*/
public static <T> boolean setMin(final T o, final AtomicLongFieldUpdater<T> fu, final long value) {
long current = fu.get(o);
while (current > value) {
if (fu.compareAndSet(o, current, value)) {
return true;
}
current = fu.get(o);
}
return false;
}

/**
* Sets the field to the maximum of the current value and the passed in value
*
* @param o the object to update
* @param fu the field updater
* @param value the value that is a candidate for the maximum
* @return true if the maximum was set
* @param <T> the type of o
*/
public static <T> boolean setMax(final T o, final AtomicLongFieldUpdater<T> fu, final long value) {
long current = fu.get(o);
while (value > current) {
if (fu.compareAndSet(o, current, value)) {
return true;
}
current = fu.get(o);
}
return false;
}
}
30 changes: 30 additions & 0 deletions Base/src/main/java/io/deephaven/base/stats/ThreadSafeCounter.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
//
// Copyright (c) 2016-2024 Deephaven Data Labs and Patent Pending
//
package io.deephaven.base.stats;

import java.util.function.LongFunction;

// --------------------------------------------------------------------

/**
* A statistic where each value represents an additive quantity, and thus the sum of the values <U>does</U> have
* meaning. Examples include event counts and processing duration. If the sum of the values <I>does not</I> have a
* useful interpretation, use {@link State} instead.
* <UL>
* <LI>{@link #increment} updates the counter, recording a single value. This is the most common usage. ({@link #sample}
* does exactly the same thing but is a poor verb to use with a Counter.)
* </UL>
*/
public class ThreadSafeCounter extends ThreadSafeValue {

public ThreadSafeCounter(final long now) {
super(now);
}

public char getTypeTag() {
return Counter.TYPE_TAG;
}

public static final LongFunction<ThreadSafeCounter> FACTORY = ThreadSafeCounter::new;
}
Loading

0 comments on commit 57b0f95

Please sign in to comment.