Skip to content
Open
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
6 changes: 3 additions & 3 deletions .github/workflows/build-and-push-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ jobs:
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 11
java-version: 17

- name: Setup sbt launcher
uses: sbt/setup-sbt@508b753e53cb6095967669e0911487d2b9bc9f41 # v1.1.22
Expand Down Expand Up @@ -325,7 +325,7 @@ jobs:
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 11
java-version: 17

- name: Setup sbt launcher
uses: sbt/setup-sbt@508b753e53cb6095967669e0911487d2b9bc9f41 # v1.1.22
Expand Down Expand Up @@ -405,7 +405,7 @@ jobs:
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 11
java-version: 17

- name: Setup sbt launcher
uses: sbt/setup-sbt@508b753e53cb6095967669e0911487d2b9bc9f41 # v1.1.22
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-22.04]
java-version: [11]
java-version: [17]
runs-on: ${{ matrix.os }}
env:
JAVA_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
Expand Down Expand Up @@ -175,7 +175,7 @@ jobs:
uses: actions/setup-java@v5
with:
distribution: "temurin"
java-version: 11
java-version: 17
- name: Create Databases
# Must run before any sbt compile step: the build's JOOQ source
# generators connect to texera_db while compiling.
Expand Down Expand Up @@ -262,7 +262,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-22.04]
java-version: [11]
java-version: [17]
runs-on: ${{ matrix.os }}
env:
JAVA_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
Expand Down Expand Up @@ -293,7 +293,7 @@ jobs:
uses: actions/setup-java@v5
with:
distribution: "temurin"
java-version: 11
java-version: 17
- name: Setup Python for Scala-Python integration tests
uses: actions/setup-python@v6
with:
Expand Down Expand Up @@ -405,7 +405,7 @@ jobs:
uses: actions/setup-java@v5
with:
distribution: "temurin"
java-version: 11
java-version: 17
- name: Setup sbt launcher
uses: sbt/setup-sbt@508b753e53cb6095967669e0911487d2b9bc9f41 # v1.1.22
- uses: coursier/cache-action@90c37294538be80a558fd665531fcdc2b467b475 # v8.1.0
Expand Down
167 changes: 167 additions & 0 deletions .github/workflows/comment-commands.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
# 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.

# /take, /untake, /request-review, and /unrequest-review comment commands.
#
# Triage state is no longer materialized as a label — it is the search
# filter `is:issue is:open no:assignee`. Anyone can self-claim an issue
# by commenting `/take` (and self-release with `/untake`); PR-driven
# assignee sync is handled by `pr-assignment.yml`.
#
# On pull requests, the author can request or cancel reviewer requests
# via `/request-review @user [@user ...]` and `/unrequest-review @user
# [@user ...]`. We avoid the `/review` namespace so it stays free for
# future use (e.g. self-review).
name: Comment commands
on:
issue_comment:
types: [created]

permissions:
issues: write
pull-requests: write

jobs:
take:
# The startsWith filter at the job level keeps unrelated comments
# from allocating a runner; the regex inside the script enforces an
# exact `/take` or `/untake` so suffixes like `/take this` do not
# silently match.
if: >-
github.event_name == 'issue_comment'
&& github.event.action == 'created'
&& github.event.issue.pull_request == null
&& github.event.comment.user.type != 'Bot'
&& (startsWith(github.event.comment.body, '/take')
|| startsWith(github.event.comment.body, '/untake'))
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v8
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const body = (context.payload.comment.body || '').trim();
const issue_number = context.payload.issue.number;
const login = context.payload.comment.user.login;
const { owner, repo } = context.repo;
core.info(
`take/untake candidate: ${login} on issue #${issue_number}; ` +
`body=${JSON.stringify(body)}`,
);

if (/^\/take\s*$/.test(body)) {
try {
await github.rest.issues.addAssignees({
owner, repo, issue_number, assignees: [login],
});
core.info(`Assigned ${login} to issue #${issue_number}`);
} catch (e) {
core.warning(
`addAssignees on #${issue_number} failed: ${e.message}`,
);
}
} else if (/^\/untake\s*$/.test(body)) {
try {
await github.rest.issues.removeAssignees({
owner, repo, issue_number, assignees: [login],
});
core.info(`Unassigned ${login} from issue #${issue_number}`);
} catch (e) {
core.warning(
`removeAssignees on #${issue_number} failed: ${e.message}`,
);
}
} else {
core.info(
`Comment does not match exact '/take' or '/untake'; skipping.`,
);
}

request-review:
# Job-level startsWith gate avoids spinning up a runner for every
# PR comment; the regex inside the script enforces the exact shape.
if: >-
github.event_name == 'issue_comment'
&& github.event.action == 'created'
&& github.event.issue.pull_request != null
&& github.event.comment.user.type != 'Bot'
&& (startsWith(github.event.comment.body, '/request-review')
|| startsWith(github.event.comment.body, '/unrequest-review'))
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v8
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const body = (context.payload.comment.body || '').trim();
const pull_number = context.payload.issue.number;
const commenter = context.payload.comment.user.login;
const author = context.payload.issue.user.login;
const { owner, repo } = context.repo;

const match = body.match(
/^\/(request-review|unrequest-review)\b(.*)$/s,
);
if (!match) {
core.info(`Comment does not match exact command; skipping.`);
return;
}
const action = match[1];

if (commenter !== author) {
core.info(
`${commenter} is not the author of #${pull_number}; skipping.`,
);
return;
}

// Parse @user and @org/team mentions; route teams to the
// team_reviewers bucket. Strip self so the API doesn't
// reject the whole atomic call over one bad name. Copilot
// is a bot reviewer that the REST API expects as the exact
// slug "Copilot", so normalize any casing of @copilot.
const reviewers = [];
const team_reviewers = [];
for (const [, h] of match[2].matchAll(
/@([\w-]+(?:\/[\w.-]+)?)/g,
)) {
if (h.includes('/')) team_reviewers.push(h.split('/')[1]);
else if (h.toLowerCase() === 'copilot') reviewers.push('Copilot');
else if (h.toLowerCase() !== author.toLowerCase())
reviewers.push(h);
}
if (!reviewers.length && !team_reviewers.length) {
core.warning(`No valid @mentions in '${action}'; skipping.`);
return;
}

const params = { owner, repo, pull_number, reviewers, team_reviewers };
try {
if (action === 'request-review') {
await github.rest.pulls.requestReviewers(params);
} else {
await github.rest.pulls.removeRequestedReviewers(params);
}
core.info(
`${action} on #${pull_number} by ${commenter}: ` +
`users=[${reviewers.join(', ')}] ` +
`teams=[${team_reviewers.join(', ')}]`,
);
} catch (e) {
core.warning(
`${action} on #${pull_number} failed: ${e.message}`,
);
}
85 changes: 0 additions & 85 deletions .github/workflows/take-commands.yml

This file was deleted.

28 changes: 28 additions & 0 deletions .jvmopts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 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.
#
# Required by Kryo: https://github.com/altoo-ag/pekko-kryo-serialization#using-kryo-on-jdk-17
--add-opens=java.base/java.lang=ALL-UNNAMED
--add-opens=java.base/java.lang.invoke=ALL-UNNAMED
--add-opens=java.base/java.util=ALL-UNNAMED
--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED
--add-opens=java.base/sun.nio.ch=ALL-UNNAMED

# Required by Apache Arrow: https://arrow.apache.org/java/main/install.html
--add-opens=java.base/java.nio=ALL-UNNAMED

# Required by Apache Pekko: https://pekko.apache.org/docs/pekko/snapshot/release-notes/releases-2.0.html
--add-opens=java.base/jdk.internal.misc=ALL-UNNAMED
1 change: 1 addition & 0 deletions .run/ComputingUnitMaster.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ under the License.
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="ComputingUnitMaster" type="Application" factoryName="Application">
<option name="MAIN_CLASS_NAME" value="org.apache.texera.web.ComputingUnitMaster" />
<option name="VM_PARAMETERS" value="@$PROJECT_DIR$/.jvmopts" />
<module name="texera.amber" />
<shortenClasspath name="ARGS_FILE" />
<extension name="coverage">
Expand Down
1 change: 1 addition & 0 deletions .run/ComputingUnitWorker.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ under the License.
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="ComputingUnitWorker" type="Application" factoryName="Application">
<option name="MAIN_CLASS_NAME" value="org.apache.texera.web.ComputingUnitWorker" />
<option name="VM_PARAMETERS" value="@$PROJECT_DIR$/.jvmopts" />
<module name="texera.amber" />
<shortenClasspath name="ARGS_FILE" />
<extension name="coverage">
Expand Down
12 changes: 11 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ merge.

| Component | Version |
| --- | --- |
| Java | JDK 11 |
| Java | JDK 17 |
| Scala | 2.13 |
| Python | 3.12 |
| Node | 24 |
Expand All @@ -90,6 +90,16 @@ in [`udf.conf`](common/config/src/main/resources/udf.conf) or
`export UDF_PYTHON_PATH="$(pwd)/../venv312/bin/python"` (env var overrides).
Without it, `sbt` Python-integration tests fail to launch a worker.

[`.jvmopts`](.jvmopts) holds every `--add-opens` flag Texera needs for
JDK 17+, with each group annotated by its upstream source (Kryo,
Apache Arrow, Apache Pekko). sbt's launcher and the [`.run/`](.run)
configs read it automatically; for raw `java` launches, pass it as an
argfile: `java @.jvmopts -jar …`. If a future library version or a new
code path triggers an `InaccessibleObjectException`, add the open to
`.jvmopts`. [`project/JdkOptions.scala`](project/JdkOptions.scala)
will propagates the changed options to forked test JVMs, sbt-native-packager dist launchers,
and IntelliJ.

### Branch and commit naming

Short, **Conventional Commits**, same shape for branch and commit subject.
Expand Down
Loading
Loading