Skip to content

Commit

Permalink
Merge branch 'rest_gateway' into rest_gateway
Browse files Browse the repository at this point in the history
Signed-off-by: Diego Tavares <[email protected]>
  • Loading branch information
DiegoTavares authored Aug 9, 2024
2 parents 6799415 + 5d49cfa commit 2d800d2
Show file tree
Hide file tree
Showing 248 changed files with 5,084 additions and 1,855 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/sonar-cloud-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ jobs:
runs-on: ubuntu-latest
container: aswf/ci-opencue:2020
name: Analyze Python Components
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -31,6 +33,8 @@ jobs:
runs-on: ubuntu-latest
container: aswf/ci-opencue:2020
name: Analyze Cuebot
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
30 changes: 24 additions & 6 deletions .github/workflows/testing-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
name: Run Python Unit Tests (CY2022)
runs-on: ubuntu-latest
container: aswf/ci-opencue:2022
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
steps:
- uses: actions/checkout@v3
- name: Run Python Tests
Expand All @@ -21,6 +23,8 @@ jobs:
runs-on: ubuntu-latest
container:
image: aswf/ci-opencue:2022
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
steps:
- uses: actions/checkout@v3
- name: Build with Gradle
Expand Down Expand Up @@ -49,28 +53,42 @@ jobs:
chown -R aswfuser:aswfgroup .
su -c "cd cuebot && ./gradlew build --stacktrace --info" aswfuser
test_python2:
name: Run Python Unit Tests using Python2
test_python_2024:
name: Run Python Unit Tests (CY2024)
runs-on: ubuntu-latest
container: aswf/ci-opencue:2019
container: aswf/ci-opencue:2024
steps:
- uses: actions/checkout@v3
- name: Run Python Tests
run: ci/run_python_tests.sh

test_cuebot_2024:
name: Build Cuebot and Run Unit Tests (CY2024)
runs-on: ubuntu-latest
container:
image: aswf/ci-opencue:2024
steps:
- uses: actions/checkout@v3
- name: Build with Gradle
run: |
chown -R aswfuser:aswfgroup .
su -c "cd cuebot && ./gradlew build --stacktrace --info" aswfuser
test_pyside6:
name: Run CueGUI Tests using PySide6
runs-on: ubuntu-latest
container: almalinux:9
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Run CueGUI Tests
run: ci/test_pyside6.sh

lint_python:
name: Lint Python Code
runs-on: ubuntu-latest
container: aswf/ci-opencue:2022
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
steps:
- uses: actions/checkout@v3
- name: Lint Python Code
Expand All @@ -93,7 +111,7 @@ jobs:
- uses: actions/checkout@v3
- name: Get Changed Files
id: get_changed_files
uses: tj-actions/changed-files@v35
uses: tj-actions/changed-files@v41
- name: Check for Version Change
run: ci/check_changed_files.py ${{ steps.get_changed_files.outputs.modified_files }} ${{ steps.get_changed_files.outputs.deleted_files }}

Expand All @@ -112,6 +130,6 @@ jobs:
- uses: actions/checkout@v3
- name: Get Changed Files
id: get_changed_files
uses: tj-actions/changed-files@v35
uses: tj-actions/changed-files@v41
- name: Check for Version Change
run: ci/check_version_bump.py ${{ steps.get_changed_files.outputs.all_changed_and_modified_files }}
29 changes: 5 additions & 24 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,9 @@ venv*/
.coverage
coverage.xml
htmlcov/
/.eggs/
*.iml
.venv/
*_pb2.py
*_pb2_grpc.py
svn/*
/dist/
cueweb/.next/*
cueweb/node_modules/*
.metals/*
rqd/.eggs/*
rqd/deploy/rpm/RPMS/x86_64/*
pycue/.metals/metals.h2.db
pycue/.metals/metals.lock.db
pycue/.metals/metals.log
pycue/.vscode/settings.json
rest_gateway/*.tar\.gz
/.env
.envrc
.vscode
.bloop
cuebot/gradle/wrapper/gradle-6.0.1-bin.zip
*.class
bin/
logs/
opencue.code-workspace
stack_test.yml
rest_gateway/*.tar\.gz
.venv/
.eggs/*
2 changes: 1 addition & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @bcipriano @gregdenton @jrray @smith1511 @larsbijl @DiegoTavares @IdrisMiles @splhack
* @bcipriano @DiegoTavares @ramonfigueiredo
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- [Introduction](#Introduction)
- [OpenCue features](#OpenCue-features)
- [Learn more](#Learn-more)
- [Meeting notes](#Meeting-notes)
- [Contact us](#Contact-us)

# Introduction
Expand Down Expand Up @@ -39,6 +40,12 @@ OpenCue provides the following features to help manage rendering jobs at scale:
For more information on installing, using, and administering OpenCue, visit
[www.opencue.io](https://www.opencue.io).

# Meeting notes

Starting from May 2024, all Opencue meeting notes are stored on the [Opencue Confluence page](http://wiki.aswf.io/display/OPENCUE/OpenCue+Home).

For meeting notes before May 2024, please refer to the Opencue repository in the [opencue/tsc/meetings](https://github.com/AcademySoftwareFoundation/OpenCue/tree/master/tsc/meetings) folder.

# Contact us

To join the OpenCue discussion forum for users and admins, join the
Expand Down
2 changes: 1 addition & 1 deletion VERSION.in
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.22
0.34
14 changes: 10 additions & 4 deletions ci/pylintrc_main
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ disable=c-extension-no-member,
too-many-public-methods,
too-many-return-statements,
too-many-statements,
useless-object-inheritance
useless-object-inheritance,
consider-using-f-string

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
Expand Down Expand Up @@ -202,7 +203,12 @@ ignored-classes=optparse.Values,thread._local,_thread._local
# (useful for modules/projects where namespaces are manipulated during runtime
# and thus existing member attributes cannot be deduced by static analysis). It
# supports qualified module names, as well as Unix pattern matching.
ignored-modules=
ignored-modules=opencue.compiled_proto,
opencue.compiled_proto.filter_pb2,
opencue.compiled_proto.host_pb2,
rqd.compiled_proto.rqd_pb2,
rqd.compiled_proto.host_pb2,
rqd.compiled_proto.report_pb2

# Show a hint with possible names when a member name was not found. The aspect
# of finding the hint is based on edit distance.
Expand Down Expand Up @@ -523,5 +529,5 @@ min-public-methods=2

# Exceptions that will emit a warning when being caught. Defaults to
# "BaseException, Exception".
overgeneral-exceptions=BaseException,
Exception
overgeneral-exceptions=builtins.BaseException,
builtins.Exception
14 changes: 10 additions & 4 deletions ci/pylintrc_test
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ disable=arguments-differ,
too-many-statements,
unused-argument,
unused-variable,
useless-object-inheritance
useless-object-inheritance,
consider-using-f-string

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
Expand Down Expand Up @@ -202,7 +203,12 @@ ignored-classes=optparse.Values,thread._local,_thread._local
# (useful for modules/projects where namespaces are manipulated during runtime
# and thus existing member attributes cannot be deduced by static analysis). It
# supports qualified module names, as well as Unix pattern matching.
ignored-modules=
ignored-modules=opencue.compiled_proto,
opencue.compiled_proto.filter_pb2,
opencue.compiled_proto.host_pb2,
rqd.compiled_proto.rqd_pb2,
rqd.compiled_proto.host_pb2,
rqd.compiled_proto.report_pb2

# Show a hint with possible names when a member name was not found. The aspect
# of finding the hint is based on edit distance.
Expand Down Expand Up @@ -523,5 +529,5 @@ min-public-methods=2

# Exceptions that will emit a warning when being caught. Defaults to
# "BaseException, Exception".
overgeneral-exceptions=BaseException,
Exception
overgeneral-exceptions=builtins.BaseException,
builtins.Exception
10 changes: 4 additions & 6 deletions ci/run_integration_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ wait_for_service_state() {
log ERROR "Timed out waiting for Docker compose to come up"
exit 1
fi
container=$(docker compose ps --all --format json | jq ".[] | select(.Service==\"$1\")")
container=$(docker compose ps --all --format json | jq -s ".[] | select(.Service==\"$1\")")
if [[ ${container} = "" ]]; then
log INFO "Service \"$1\": no container yet"
else
Expand All @@ -102,7 +102,7 @@ wait_for_service_state() {
}

verify_flyway_success() {
container=$(docker compose ps --all --format json | jq '.[] | select(.Service=="flyway")')
container=$(docker compose ps --all --format json | jq -s '.[] | select(.Service=="flyway")')
container_name=$(echo "$container" | jq -r '.Name')
exit_code=$(echo "$container" | jq -r '.ExitCode')
if [[ ${exit_code} = 0 ]]; then
Expand Down Expand Up @@ -143,8 +143,7 @@ test_pycue() {
exit 1
fi

rqd_name=$(docker compose ps --format json | jq -r '.[] | select(.Service=="rqd") | .Name')
rqd_ip=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' "${rqd_name}")
rqd_ip=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' opencue-rqd-1)
want_hosts="['${rqd_ip}']"
got_hosts=$(python -c 'import opencue; print([host.name() for host in opencue.api.getHosts()])')
if [[ "${got_hosts}" = "${want_hosts}" ]]; then
Expand All @@ -169,8 +168,7 @@ test_cueadmin() {
exit 1
fi

rqd_name=$(docker compose ps --format json | jq -r '.[] | select(.Service=="rqd") | .Name')
want_host=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' "${rqd_name}")
want_host=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' opencue-rqd-1)
lh_response=$(cueadmin -lh)
got_host=$(echo "${lh_response}" | tail -n 1 | cut -d ' ' -f 1)
if [[ "${got_host}" = "${want_host}" ]]; then
Expand Down
4 changes: 3 additions & 1 deletion cueadmin/cueadmin/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ def _convert(val):
else:
result = opencue.api.criterion_pb2.GreaterThanFloatSearchCriterion(
value=_convert(mixed))
# pylint: disable=use-a-generator
elif any([isinstance(mixed.__class__, crit_cls) for crit_cls in criterions]):
result = mixed
elif not mixed:
Expand Down Expand Up @@ -336,6 +337,7 @@ def _convert(val):
else:
result = opencue.api.criterion_pb2.GreaterThanIntegerSearchCriterion(
value=_convert(mixed))
# pylint: disable=use-a-generator
elif any([isinstance(mixed.__class__, crit_cls) for crit_cls in criterions]):
result = mixed
elif not mixed:
Expand Down Expand Up @@ -562,7 +564,7 @@ def handleArgs(args):

if args.facility:
logger.debug("setting facility to %s", args.facility)
opencue.Cuebot.setFacility(args.facility)
opencue.Cuebot.setHostWithFacility(args.facility)

#
# Query
Expand Down
2 changes: 1 addition & 1 deletion cueadmin/tests/common_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def testSetServer(self, setHostsMock):

setHostsMock.assert_called_with([serverName])

@mock.patch('opencue.Cuebot.setFacility')
@mock.patch('opencue.Cuebot.setHostWithFacility')
def testSetFacility(self, setFacilityMock):
args = self.parser.parse_args(['-facility', TEST_FACILITY])

Expand Down
3 changes: 3 additions & 0 deletions cuebot/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ dependencies {
compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.16.0'
compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.16.0'
compile group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: '2.16.0'
compile group: 'io.sentry', name: 'sentry-log4j2', version: '7.11.0'
compile group: 'io.prometheus', name: 'simpleclient', version: '0.16.0'
compile group: 'io.prometheus', name: 'simpleclient_servlet', version: '0.16.0'

protobuf fileTree("../proto/")

Expand Down
4 changes: 4 additions & 0 deletions cuebot/src/main/java/com/imageworks/spcue/ActionEntity.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ public String getActionId() {
}

public String getFilterId() {
if (filterId == null){
throw new SpcueRuntimeException(
"Trying to get a filterId from a ActityEntity created without a filter");
}
return filterId;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public class DispatchFrame extends FrameEntity implements FrameInterface {
public int maxGpus;
public long minGpuMemory;

// A comma separated list of services
public String services;
}

1 change: 1 addition & 0 deletions cuebot/src/main/java/com/imageworks/spcue/LayerDetail.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public class LayerDetail extends LayerEntity implements LayerInterface {
public Set<String> tags = new LinkedHashSet<String>();
public Set<String> services = new LinkedHashSet<String>();
public Set<String> limits = new LinkedHashSet<String>();
public Set<String> outputs = new LinkedHashSet<String>();

/*
*
Expand Down
Loading

0 comments on commit 2d800d2

Please sign in to comment.