Skip to content

Commit

Permalink
Merge branch 'master' into fix-sonar-pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoTavares authored Sep 18, 2024
2 parents 008be39 + 0b60722 commit a5f3072
Show file tree
Hide file tree
Showing 211 changed files with 4,797 additions and 1,794 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,7 +130,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_version_bump.py ${{ steps.get_changed_files.outputs.all_changed_and_modified_files }}

Expand Down
8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,11 @@

So, you want to contribute to OpenCue? To find out how you can help, refer to OpenCue's
[contribution guidelines](https://www.opencue.io/contributing/opencue/contributing/).

## Guideline for new issues
GitHub issues are a great place to start a conversation! Issues aren’t restricted to bugs; we happily welcome feature requests and other suggestions submitted as issues.

The only conversations we would direct away from issues are questions in the form of “How do I do X”. Please direct these to the opencue [slack channel](https://academysoftwarefdn.slack.com/archives/CMFPXV39Q), and consider contributing what you’ve learned to our docs if appropriate!

Please categorize your issues accordingly and make sure all sections on template are filled up.

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.29
0.35
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: 6 additions & 4 deletions 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 @@ -408,18 +410,18 @@ def dropAllDepends(job, layer=None, frame=None):
logger.debug("dropping all depends on: %s/%04d-%s", job, layer, frame)
depend_er_frame = opencue.api.findFrame(job, layer, frame)
for depend in depend_er_frame.getWhatThisDependsOn():
depend.proxy.satisfy()
depend.satisfy()
elif layer:
logger.debug("dropping all depends on: %s/%s", job, layer)
depend_er_layer = opencue.api.findLayer(job, layer)
for depend in depend_er_layer.getWhatThisDependsOn():
depend.proxy.satisfy()
depend.satisfy()
else:
logger.debug("dropping all depends on: %s", job)
depend_er_job = opencue.api.findJob(job)
for depend in depend_er_job.getWhatThisDependsOn():
logger.debug("dropping depend %s %s", depend.data.type, opencue.id(depend))
depend.proxy.satisfy()
depend.satisfy()


class Convert(object):
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
11 changes: 7 additions & 4 deletions cueadmin/cueadmin/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,16 +141,19 @@ def displaySubscriptions(subscriptions, show):
sub_format = "%-30s %-12s %6s %8s %8s %8s"
print(sub_format % ("Allocation", "Show", "Size", "Burst", "Run", "Used"))
for s in subscriptions:
size = s.data.size/100
burst = s.data.burst/100
run = s.data.reserved_cores/100
if s.data.size:
perc = float(s.data.reserved_cores) / s.data.size * 100.0
else:
perc = s.data.reserved_cores * 100.0
perc = run

print(sub_format % (s.data.allocation_name,
s.data.show_name,
s.data.size,
s.data.burst,
"%0.2f" % s.data.reserved_cores,
size,
burst,
"%0.2f" % run,
"%0.2f%%" % perc))


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
4 changes: 2 additions & 2 deletions cueadmin/tests/output_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ def testDisplaySubscriptions(self, getStubMock):
self.assertEqual(
'Subscriptions for showName\n'
'Allocation Show Size Burst Run Used\n'
'local.general showName 1000 1500 500.00 50.00%\n'
'cloud.desktop showName 0 1500 50.00 5000.00%\n',
'local.general showName 10.0 15.0 5.00 50.00%\n'
'cloud.desktop showName 0.0 15.0 0.50 0.50%\n',
out.getvalue())

def testDisplayJobs(self, getStubMock):
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
Loading

0 comments on commit a5f3072

Please sign in to comment.