Skip to content

Commit 8c3647e

Browse files
authored
Merge branch 'main' into fix/tempo-null-data-handling
2 parents 81f9eba + 2d927b5 commit 8c3647e

File tree

339 files changed

+13211
-5832
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

339 files changed

+13211
-5832
lines changed

.coderabbit.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@
55
inheritance: true
66

77
reviews:
8+
path_instructions:
9+
- path: "**/*.py"
10+
instructions: |
11+
- This project targets Python 3.14 (requires-python = '==3.14.*').
12+
- Per PEP 758 (https://peps.python.org/pep-0758/), bare 'except ExcA, ExcB:' without parentheses is valid syntax in Python 3.14+ and means catching both exceptions. Do not flag this as a Python 2-style except clause or suggest adding parentheses.
13+
- Focus on security, test structure and coding style adherence in new code introduced
14+
- Code should follow python, pytest best practices
15+
- Ensure we use https://github.com/RedHatQE/openshift-python-wrapper/ instead of direct oc calls when possible
16+
- Code reuse, test parameterization, proper test dependency should be also encouraged
17+
- Check CONSTITUTION and AGENTS files
818
review_status: false
919
changed_files_summary: true
1020
suggested_labels: true

.github/CODEOWNERS

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@
1111
* @opendatahub-io/opendatahub-tests-contributors
1212

1313
# Test directory specific rules
14-
tests/model_explainability/ @sheltoncyril @kpunwatk
15-
tests/model_registry/ @dbasunag @lugi0 @fege
16-
tests/model_serving/ @mwaykole @Raghul-M @brettmthompson @threcc @malhajfr
17-
tests/rag/ @jgarciao @jiripetrlik
18-
tests/workbenches @jstourac @andyatmiami @jiridanek @harshad16
14+
tests/model_explainability/ @sheltoncyril @kpunwatk
15+
tests/model_registry/ @dbasunag @lugi0 @fege
16+
tests/model_serving/ @mwaykole @Raghul-M @brettmthompson @threcc @rpancham @SB159
17+
tests/model_serving/model_runtime/ @Raghul-M @brettmthompson @rpancham
18+
tests/model_serving/model_server/ @threcc @mwaykole
19+
tests/model_serving/maas_billing/ @SB159
20+
tests/rag/ @jgarciao @jiripetrlik
21+
tests/workbenches @jstourac @andyatmiami @jiridanek @harshad16

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,16 @@ assignees: ''
1414

1515
<!-- Add any steps to reproduce the issue being reported or add any relevant stacktrace -->
1616

17+
## Expected behavior
18+
19+
A clear and concise description of what you expected to happen.
20+
1721
## Proposed Solution
1822

1923
<!-- If you have a suggestion for how to fix this, describe it here -->
2024

2125
## Additional Context
2226

23-
<!-- Any other information that might be helpful -->
27+
### Environment
28+
29+
<!-- Any other information that might be helpful, including environment -->

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
- Fixes: <!-- github issue -->
1111
- JIRA: <!-- Jira information -->
1212

13-
## How it has been tested
13+
## Please review and indicate how it has been tested
1414

1515
- [ ] Locally
1616
- [ ] Jenkins

.github/workflows/scripts/pr_workflow.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import logging
12
import os
23
import re
34
import sys
@@ -23,9 +24,8 @@
2324
from github.PullRequest import PullRequest
2425
from github.Repository import Repository
2526
from github.Team import Team
26-
from simple_logger.logger import get_logger
2727

28-
LOGGER = get_logger(name="pr_labeler")
28+
LOGGER = logging.getLogger("pr_labeler")
2929

3030

3131
class PrBaseClass:
@@ -109,7 +109,7 @@ def verify_allowed_user(self) -> bool:
109109
# check if the user is a member of opendatahub-tests-contributors
110110
membership = team.get_team_membership(member=self.user_login)
111111
LOGGER.info(f"User {self.user_login} is a member of the test contributor team. {membership}")
112-
return True # noqa: TRY300
112+
return True
113113
except UnknownObjectException:
114114
LOGGER.error(f"User {self.user_login} is not allowed for this action. Exiting.")
115115
return False

.gitleaks.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@
1010
[allowlist]
1111
description = "Exclude test fixtures, mock data, sample configs, and CI resources"
1212
paths = [
13+
# Go test files (commonly contain mock credentials)
14+
'''.*_test\.go$''',
15+
16+
# JS/TS test files (.spec.ts, .test.tsx, etc.)
17+
'''.*\.spec\.(ts|tsx|js|jsx)$''',
18+
'''.*\.test\.(ts|tsx|js|jsx)$''',
19+
20+
# JS/TS test directories
21+
'''__tests__/''',
22+
1323
# Go testdata directories
1424
'''testdata/''',
1525

.pre-commit-config.yaml

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1+
ci:
2+
autofix_prs: true
3+
autoupdate_schedule: weekly
4+
autoupdate_commit_msg: "chore: update pre-commit hooks"
5+
16
minimum_pre_commit_version: 3.3.0
27
default_install_hook_types: [pre-commit, commit-msg]
38

49
default_language_version:
5-
python: python3.13
10+
python: python3.14
611

712
repos:
813
- repo: https://github.com/pre-commit/pre-commit-hooks
@@ -36,19 +41,11 @@ repos:
3641
exclude: .*/__snapshots__/.*|.*-input\.json$|^semgrep\.yaml$
3742

3843
- repo: https://github.com/astral-sh/ruff-pre-commit
39-
rev: v0.15.4
44+
rev: v0.15.8
4045
hooks:
4146
- id: ruff
4247
- id: ruff-format
4348

44-
# https://github.com/renovatebot/pre-commit-hooks/issues/2621
45-
# This hook goes over the 250MiB limit that pre-commit.ci imposes
46-
# Disable unless a solution is found.
47-
# - repo: https://github.com/renovatebot/pre-commit-hooks
48-
# rev: 39.45.0
49-
# hooks:
50-
# - id: renovate-config-validator
51-
5249
- repo: https://github.com/gitleaks/gitleaks
5350
rev: v8.30.0
5451
hooks:
@@ -62,6 +59,18 @@ repos:
6259
exclude: ^(docs/|.*test.*\.py$|utilities/manifests/.*|utilities/plugins/tgis_grpc/.*)
6360

6461

62+
- repo: local
63+
hooks:
64+
- id: check-signoff
65+
name: Check Signed-off-by
66+
stages: [commit-msg]
67+
language: system
68+
entry: >
69+
bash -c 'grep -q "^Signed-off-by: .* <.*@.*>" "$1" ||
70+
{ echo "ERROR: Commit message must include a valid Signed-off-by trailer.";
71+
echo " Use: git commit -s";
72+
echo " Or add manually: Signed-off-by: Your Name <your@email.com>"; exit 1; }' --
73+
6574
- repo: https://github.com/espressif/conventional-precommit-linter
6675
rev: v1.11.0
6776
hooks:
@@ -81,12 +90,12 @@ repos:
8190
pass_filenames: false
8291

8392
- repo: https://github.com/rhysd/actionlint
84-
rev: v1.7.11
93+
rev: v1.7.12
8594
hooks:
8695
- id: actionlint
8796

8897
- repo: https://github.com/DavidAnson/markdownlint-cli2
89-
rev: v0.21.0
98+
rev: v0.22.0
9099
hooks:
91100
- id: markdownlint-cli2
92101
args:

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ utilities/ # Shared utility functions
8888
- Moving fixtures to shared locations
8989
- Adding new markers to `pytest.ini`
9090
- Modifying session-scoped fixtures
91+
- Adding new binaries or system-level dependencies (must also update `Dockerfile` and verify with `make build`)
9192

9293
### 🚫 Never
9394

CONSTITUTION.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,12 @@ All code MUST consider security implications.
7979
- Avoid running destructive commands without explicit user confirmation
8080
- Use detect-secrets and gitleaks pre-commit hooks to prevent secret leakage
8181
- Test code MUST NOT introduce vulnerabilities into the tested systems
82+
- Use `utilities.path_utils.resolve_repo_path` to resolve and validate any user-supplied or parameterized file paths, preventing path-traversal and symlink-escape outside the repository root
83+
- JIRA ticket links are allowed in PRs and commit messages (our Jira is public)
84+
- Do NOT reference internal-only resources (Jenkins, Confluence, Slack threads) in code, PRs, or commit messages
85+
- Do NOT link embargoed or security-restricted (RH-employee-only) tickets
8286

83-
**Rationale**: Tests interact with production-like clusters; security lapses can have real consequences.
87+
**Rationale**: Tests interact with production-like clusters; security lapses can have real consequences. This is a public repository — only reference publicly accessible resources.
8488

8589
## Test Development Standards
8690

Dockerfile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
FROM fedora:42
1+
FROM fedora:43
22

33
ARG USER=odh
44
ARG HOME=/home/$USER
55
ARG TESTS_DIR=$HOME/opendatahub-tests/
6-
ENV UV_PYTHON=python3.13
6+
ENV UV_PYTHON=python3.14
77
ENV UV_COMPILE_BYTECODE=1
88
ENV UV_NO_SYNC=1
99
ENV UV_NO_CACHE=1
1010

1111
ENV BIN_DIR="$HOME_DIR/.local/bin"
1212
ENV PATH="$PATH:$BIN_DIR"
1313

14-
# Install Python 3.13 and other dependencies using dnf
14+
# Install system dependencies using dnf
1515
RUN dnf update -y \
16-
&& dnf install -y python3.13 python3.13-pip ssh gnupg curl gpg wget vim httpd-tools rsync openssl openssl-devel\
16+
&& dnf install -y python3 python3-pip ssh gnupg curl gpg wget vim httpd-tools rsync openssl openssl-devel skopeo\
1717
&& dnf clean all \
1818
&& rm -rf /var/cache/dnf
1919

@@ -22,6 +22,9 @@ RUN curl -sSL "https://github.com/fullstorydev/grpcurl/releases/download/v1.9.2/
2222
&& tar xvf /tmp/grpcurl_1.2.tar.gz --no-same-owner \
2323
&& mv grpcurl /usr/bin/grpcurl
2424

25+
# Install cosign
26+
COPY --from=quay.io/securesign/cli-cosign@sha256:a8289d488491991d454a32784de19476f2c984917eb7a33b4544e55512f2747c /usr/local/bin/cosign /usr/bin/cosign
27+
2528
RUN useradd -ms /bin/bash $USER
2629
USER $USER
2730
WORKDIR $HOME_DIR

0 commit comments

Comments
 (0)