Skip to content

Commit

Permalink
Merge branch 'AcademySoftwareFoundation:master' into rqd-reserve-all-…
Browse files Browse the repository at this point in the history
…cores
  • Loading branch information
KernAttila authored Oct 17, 2024
2 parents 8fc315c + 5ab915b commit 1eaeae3
Show file tree
Hide file tree
Showing 56 changed files with 685 additions and 416 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/packaging-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
integration_test:
name: Run Integration Test
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
ARTIFACTS: cueadmin-${BUILD_ID}-all.tar.gz

name: Build ${{ matrix.NAME }}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
create_other_artifacts:
name: Create Other Build Artifacts
needs: build_components
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/post-release-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
create_blog_post:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
name: Create Blog Post
steps:
- name: Trigger blog post workflow
Expand All @@ -18,7 +18,7 @@ jobs:
WORKFLOW_ID: 2618928
run: |
# Trigger the workflow in the opencue.io repository.
curl -X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Content-Type: application/json" \
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
preflight:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
name: Preflight
steps:
- name: Checkout code
Expand Down Expand Up @@ -37,7 +37,7 @@ jobs:
release_docker_images:
needs: preflight
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
component: [cuebot, rqd, pycue, pyoutline, cuegui, cuesubmit, cueadmin]
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
create_release:
needs: preflight
name: Create Release
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/sonar-cloud-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:

jobs:
analyze_python:
runs-on: ubuntu-latest
container: aswf/ci-opencue:2020
runs-on: ubuntu-22.04
container: aswf/ci-opencue:2024.1
name: Analyze Python Components
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
Expand All @@ -30,8 +30,8 @@ jobs:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

analyze_cuebot:
runs-on: ubuntu-latest
container: aswf/ci-opencue:2020
runs-on: ubuntu-22.04
container: aswf/ci-opencue:2024.1
name: Analyze Cuebot
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
Expand All @@ -48,5 +48,10 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
sudo yum -y install java-17-openjdk.x86_64
sudo yum -y install java-17-openjdk-devel.x86_64
sudo alternatives --set java java-17-openjdk.x86_64
sudo alternatives --set javac java-17-openjdk.x86_64
sudo alternatives --set jre_openjdk java-17-openjdk.x86_64
chown -R aswfuser:aswfgroup .
su -c "cd cuebot && ./gradlew jacocoTestReport sonarqube -Dsonar.login=$(SONAR_TOKEN)" aswfuser
su -c "cd cuebot && ./gradlew jacocoTestReport sonar" aswfuser
22 changes: 11 additions & 11 deletions .github/workflows/testing-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
test_python_2022:
name: Run Python Unit Tests (CY2022)
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
container: aswf/ci-opencue:2022
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
Expand All @@ -20,7 +20,7 @@ jobs:

test_cuebot_2022:
name: Build Cuebot and Run Unit Tests (CY2022)
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
container:
image: aswf/ci-opencue:2022
env:
Expand All @@ -34,7 +34,7 @@ jobs:
test_python_2023:
name: Run Python Unit Tests (CY2023)
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
container: aswf/ci-opencue:2023
steps:
- uses: actions/checkout@v3
Expand All @@ -43,7 +43,7 @@ jobs:

test_cuebot_2023:
name: Build Cuebot and Run Unit Tests (CY2023)
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
container:
image: aswf/ci-opencue:2023
steps:
Expand All @@ -55,7 +55,7 @@ jobs:
test_python_2024:
name: Run Python Unit Tests (CY2024)
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
container: aswf/ci-opencue:2024
steps:
- uses: actions/checkout@v3
Expand All @@ -64,7 +64,7 @@ jobs:

test_cuebot_2024:
name: Build Cuebot and Run Unit Tests (CY2024)
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
container:
image: aswf/ci-opencue:2024
steps:
Expand All @@ -76,7 +76,7 @@ jobs:
lint_python:
name: Lint Python Code
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
container: aswf/ci-opencue:2022
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
Expand All @@ -87,7 +87,7 @@ jobs:

test_sphinx:
name: Test Documentation Build
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
container:
image: aswf/ci-opencue:2023
steps:
Expand All @@ -97,7 +97,7 @@ jobs:

check_changed_files:
name: Check Changed Files
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Get Changed Files
Expand All @@ -108,15 +108,15 @@ jobs:

check_migration_files:
name: Check Database Migration Files
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Check Migration Files
run: ci/check_database_migrations.py

check_for_version_bump:
name: Check for Version Bump
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Get Changed Files
Expand Down
7 changes: 3 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ htmlcov/
.vscode
.venv/
.eggs/*
.gradle/*
/cuebot/logs
/cuebot/bin
/logs
/cuebot/bin/*
/logs/*
/.gradle/*
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
![OpenCue](/images/opencue_logo_with_text.png)

[![Supported VFX Platform Versions](https://img.shields.io/badge/vfx%20platform-2019--2021-lightgrey.svg)](http://www.vfxplatform.com/)
![Supported Python Versions](https://img.shields.io/badge/python-2.7%2C%203.6%2C%203.7%2C%203.8%2C%203.9-blue.svg)
[![Supported VFX Platform Versions](https://img.shields.io/badge/vfx%20platform-2021--2024-lightgrey.svg)](http://www.vfxplatform.com/)
![Supported Python Versions](https://img.shields.io/badge/python-3.6+-blue.svg)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/2837/badge)](https://bestpractices.coreinfrastructure.org/projects/2837)

- [Introduction](#Introduction)
Expand Down
2 changes: 1 addition & 1 deletion VERSION.in
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.35
1.0
19 changes: 11 additions & 8 deletions ci/python_coverage_report.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

set -e

pip install --user -r requirements.txt -r requirements_gui.txt
python -m pip install --user -r requirements.txt -r requirements_gui.txt
# Requirements for running the tests on the vfx-platform images
python -m pip install coverage pytest-xvfb

# Protos need to have their Python code generated in order for tests to pass.
python -m grpc_tools.protoc -I=proto/ --python_out=pycue/opencue/compiled_proto --grpc_python_out=pycue/opencue/compiled_proto proto/*.proto
Expand All @@ -11,12 +13,13 @@ python -m grpc_tools.protoc -I=proto/ --python_out=rqd/rqd/compiled_proto --grpc
2to3 -wn -f import rqd/rqd/compiled_proto/*_pb2*.py

# Run coverage for each component individually, but append it all into the same report.
coverage run --source=pycue/opencue/,pycue/FileSequence/ --omit=pycue/opencue/compiled_proto/* pycue/setup.py test
PYTHONPATH=pycue coverage run -a --source=pyoutline/outline/ pyoutline/setup.py test
PYTHONPATH=pycue coverage run -a --source=cueadmin/cueadmin/ cueadmin/setup.py test
PYTHONPATH=pycue xvfb-run -d coverage run -a --source=cuegui/cuegui/ cuegui/setup.py test
PYTHONPATH=pycue:pyoutline coverage run -a --source=cuesubmit/cuesubmit/ cuesubmit/setup.py test
coverage run -a --source=rqd/rqd/ --omit=rqd/rqd/compiled_proto/* rqd/setup.py test
python -m coverage run --source=pycue/opencue/,pycue/FileSequence/ --omit=pycue/opencue/compiled_proto/* pycue/tests/test_suite.py
PYTHONPATH=pycue python -m coverage run -a --source=pyoutline/outline/ pyoutline/setup.py test
PYTHONPATH=pycue python -m coverage run -a --source=cueadmin/cueadmin/ cueadmin/setup.py test
# TODO: re-enable cuegui tests when xvfb-run gets configured to execute on the new vfx-platform
# PYTHONPATH=pycue xvfb-run -d python -m coverage run -a --source=cuegui/cuegui/ cuegui/setup.py test
PYTHONPATH=pycue:pyoutline python -m coverage run -a --source=cuesubmit/cuesubmit/ cuesubmit/setup.py test
python -m coverage run -a --source=rqd/rqd/ --omit=rqd/rqd/compiled_proto/* rqd/setup.py test

# SonarCloud needs the report in XML.
coverage xml
python -m coverage xml
5 changes: 2 additions & 3 deletions ci/run_integration_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,8 @@ main() {
log INFO "Creating Python virtual environment..."
create_and_activate_venv
log INFO "Installing OpenCue Python libraries..."
install_log="${TEST_LOGS}/install-client-sources.log"
sandbox/install-client-sources.sh &>"${install_log}"
log INFO "Testing pycue library..."
sandbox/install-client-sources.sh
log INFO "Testing pycue library..."£
test_pycue
log INFO "Testing cueadmin..."
test_cueadmin
Expand Down
5 changes: 5 additions & 0 deletions connectors/prometheus_metrics/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ ENV PYTHONUNBUFFERED 1

WORKDIR /opt/opencue

# centos:7 repos moved to vault.centos
RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/CentOS-*.repo
RUN sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/CentOS-*.repo
RUN sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/CentOS-*.repo

RUN yum -y install \
epel-release \
gcc \
Expand Down
6 changes: 3 additions & 3 deletions cueadmin/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ COPY cueadmin/tests/ ./cueadmin/tests
COPY cueadmin/cueadmin ./cueadmin/cueadmin

COPY VERSION.in VERSIO[N] ./
RUN test -e VERSION || echo "$(cat VERSION.in)-custom" | tee VERSION
RUN test -e VERSION || echo "$(cat VERSION.in)" | tee VERSION

RUN cd pycue && python3 setup.py install
RUN cd cueadmin && python3 setup.py test
RUN cd pycue && python3 -m pip install .
RUN cd cueadmin && python3 tests/test_suite.py

RUN cp LICENSE requirements.txt VERSION cueadmin/

Expand Down
2 changes: 0 additions & 2 deletions cueadmin/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@
classifiers=[
'License :: OSI Approved :: Apache Software License',

'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
Expand Down
27 changes: 27 additions & 0 deletions cueadmin/tests/test_suite.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright Contributors to the OpenCue Project
#
# Licensed 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.
# pylint: disable=missing-function-docstring,missing-module-docstring

import unittest

def create_test_suite():
loader = unittest.TestLoader()
start_dir = '.' # Specify the directory where your test files reside
suite = loader.discover(start_dir, pattern='*_tests.py')
return suite

if __name__ == '__main__':
runner = unittest.TextTestRunner()
test_suite = create_test_suite()
runner.run(test_suite)
2 changes: 1 addition & 1 deletion cuebot/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -----------------
# BUILD
# -----------------
FROM gradle:6.0.1-jdk13 AS build
FROM gradle:7.6.4-jdk17 AS build

USER gradle

Expand Down
Loading

0 comments on commit 1eaeae3

Please sign in to comment.