Skip to content

Commit

Permalink
Merge branch 'master' into amd/dfuse-ch-evict
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleypittman committed Sep 23, 2024
2 parents 3493b24 + a6d2773 commit 7e8c33b
Show file tree
Hide file tree
Showing 1,697 changed files with 68,824 additions and 41,943 deletions.
41 changes: 0 additions & 41 deletions .github/workflows/clang-format.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/landing-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ on:
- 'utils/docker/Dockerfile.*'
- 'utils/scripts/install-*.sh'
- 'utils/scripts/helpers/*'
- utils/ci
- ci
- utils/ci/**
- ci/**
- requirements-build.txt
- requirements-utest.txt

Expand Down
69 changes: 65 additions & 4 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Check DAOS ftest tags.
run: \[ ! -x src/tests/ftest/tags.py \] || ./src/tests/ftest/tags.py lint
run: \[ ! -x src/tests/ftest/tags.py \] || ./src/tests/ftest/tags.py lint --verbose

flake8-lint:
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
max-line-length: '100'
args: '--filename */SConscript, SConstruct'

Doxygen:
doxygen:
name: Doxygen
runs-on: ubuntu-22.04
steps:
Expand Down Expand Up @@ -146,17 +146,78 @@ jobs:
- name: Run pylint check.
run: ./utils/cq/daos_pylint.py --git --output-format github

Codespell:
codespell:
name: Codespell
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Install extra python packages
run: pip install --requirement utils/cq/requirements.txt
run: python3 -m pip install --requirement utils/cq/requirements.txt
- name: Run check
uses: codespell-project/actions-codespell@3174815d6231f5bdc24dbfb6fc3b8caec73d521c # master
with:
skip: ./src/control/vendor,./src/control/go.sum,./.git
ignore_words_file: ci/codespell.ignores
builtin: clear,rare,informal,names,en-GB_to_en-US

clang-format:
name: Clang Format
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Pull via git
run: git fetch origin ${{ github.event.pull_request.base.ref }}
- name: Run check in docker
uses: ./.github/actions/clang-format
with:
target: origin/${{ github.event.pull_request.base.ref }}
- name: Export changes
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
if: failure()
with:
name: format-patch-for-pr-${{ github.event.pull_request.number }}
path: auto-format-changes.diff

yaml-lint:
name: Yamllint check
runs-on: ubuntu-22.04
steps:
- name: Check out source repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python environment
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: '3'
- name: Install extra python packages
run: python3 -m pip install --requirement utils/cq/requirements.txt
- name: Run check
run: yamllint --format github .

linting-summary:
name: Linting Summary
runs-on: ubuntu-22.04
needs:
- isort
- shell-check
- log-check
- ftest-tags
- flake8-lint
- doxygen
- pylint
- codespell
# - clang-format # not required
- yaml-lint
if: (!cancelled())
steps:
- name: Check if any job failed
run: |
if [[ -z "$(echo "${{ join(needs.*.result, '') }}" | sed -e 's/success//g')" ]]; then
echo "All jobs succeeded"
else
echo "One or more jobs did not succeed"
exit 1
fi
2 changes: 1 addition & 1 deletion .github/workflows/ossf-scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
# uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@97a0fba1372883ab732affbe8f94b823f91727db # v3.pre.node20
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: SARIF file
path: results.sarif
Expand Down
67 changes: 67 additions & 0 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Trivy scan

on:
pull_request:
branches: ["master", "release/**"]

# Declare default permissions as nothing.
permissions: {}

jobs:
build:
name: Build
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Run Trivy vulnerability scanner in repo mode
uses: aquasecurity/trivy-action@6e7b7d1fd3e4fef0c5fa8cce1229c54b2c9bd0d8 # 0.24.0
with:
scan-type: 'fs'
scan-ref: '.'
trivy-config: 'utils/trivy/trivy.yaml'

- name: Prepare the report to be uploaded to the GitHub artifact store
run: |
mkdir report
cp trivy-report-daos.txt report
cp utils/trivy/.trivyignore report/trivyignore.txt
- name: Upload the report to the GitHub artifact store
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
path: report/*
name: trivy-report-daos

- name: Adjust config file to use sarif format
run: |
sed -i 's/output: "trivy-report-daos.txt"/output: "trivy-results.sarif"/g' \
utils/trivy/trivy.yaml
sed -i 's/format: template/format: sarif/g' utils/trivy/trivy.yaml
- name: Run Trivy vulnerability scanner in repo mode
uses: aquasecurity/trivy-action@6e7b7d1fd3e4fef0c5fa8cce1229c54b2c9bd0d8 # 0.24.0
with:
scan-type: 'fs'
scan-ref: '.'
trivy-config: 'utils/trivy/trivy.yaml'

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a
# 3.25.15 (v3)
with:
sarif_file: 'trivy-results.sarif'

- name: Adjust config file to show and validate scan results
run: |
sed -i 's/output: "trivy-results.sarif"//g' utils/trivy/trivy.yaml
sed -i 's/format: sarif/format: table/g' utils/trivy/trivy.yaml
sed -i 's/exit-code: 0/exit-code: 1/g' utils/trivy/trivy.yaml
- name: Run Trivy vulnerability scanner in repo mode
uses: aquasecurity/trivy-action@6e7b7d1fd3e4fef0c5fa8cce1229c54b2c9bd0d8 # 0.24.0
with:
scan-type: 'fs'
scan-ref: '.'
trivy-config: 'utils/trivy/trivy.yaml'
34 changes: 0 additions & 34 deletions .github/workflows/yaml.yml

This file was deleted.

40 changes: 35 additions & 5 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,19 @@ void rpm_test_post(String stage_name, String node) {
job_status_update()
}

/**
* Update default commit pragmas based on files modified.
*/
Map update_default_commit_pragmas() {
String default_pragmas_str = sh(script: 'ci/gen_commit_pragmas.py --target origin/' + target_branch,
returnStdout: true).trim()
println("pragmas from gen_commit_pragmas.py:")
println(default_pragmas_str)
if (default_pragmas_str) {
updatePragmas(default_pragmas_str, false)
}
}

pipeline {
agent { label 'lightweight' }

Expand Down Expand Up @@ -260,22 +273,22 @@ pipeline {
booleanParam(name: 'CI_medium_TEST',
defaultValue: true,
description: 'Run the Functional Hardware Medium test stage')
booleanParam(name: 'CI_medium-md-on-ssd_TEST',
booleanParam(name: 'CI_medium_md_on_ssd_TEST',
defaultValue: true,
description: 'Run the Functional Hardware Medium MD on SSD test stage')
booleanParam(name: 'CI_medium-verbs-provider_TEST',
booleanParam(name: 'CI_medium_verbs_provider_TEST',
defaultValue: true,
description: 'Run the Functional Hardware Medium Verbs Provider test stage')
booleanParam(name: 'CI_medium-verbs-provider-md-on-ssd_TEST',
booleanParam(name: 'CI_medium_verbs_provider_md_on_ssd_TEST',
defaultValue: true,
description: 'Run the Functional Hardware Medium Verbs Provider MD on SSD test stage')
booleanParam(name: 'CI_medium-ucx-provider_TEST',
booleanParam(name: 'CI_medium_ucx_provider_TEST',
defaultValue: true,
description: 'Run the Functional Hardware Medium UCX Provider test stage')
booleanParam(name: 'CI_large_TEST',
defaultValue: true,
description: 'Run the Functional Hardware Large test stage')
booleanParam(name: 'CI_large-md-on-ssd_TEST',
booleanParam(name: 'CI_large_md_on_ssd_TEST',
defaultValue: true,
description: 'Run the Functional Hardware Large MD on SSD test stage')
string(name: 'CI_UNIT_VM1_LABEL',
Expand All @@ -296,6 +309,9 @@ pipeline {
string(name: 'FUNCTIONAL_HARDWARE_MEDIUM_VERBS_PROVIDER_LABEL',
defaultValue: 'ci_nvme5',
description: 'Label to use for 5 node Functional Hardware Medium Verbs Provider (MD on SSD) stages')
string(name: 'FUNCTIONAL_HARDWARE_MEDIUM_VMD_LABEL',
defaultValue: 'ci_vmd5',
description: 'Label to use for the Functional Hardware Medium VMD stage')
string(name: 'FUNCTIONAL_HARDWARE_MEDIUM_UCX_PROVIDER_LABEL',
defaultValue: 'ci_ofed5',
description: 'Label to use for 5 node Functional Hardware Medium UCX Provider stage')
Expand Down Expand Up @@ -329,6 +345,7 @@ pipeline {
stage('Get Commit Message') {
steps {
pragmasToEnv()
update_default_commit_pragmas()
}
}
stage('Determine Release Branch') {
Expand Down Expand Up @@ -1168,6 +1185,19 @@ pipeline {
run_if_landing: false,
job_status: job_status_internal
),
'Functional Hardware Medium VMD': getFunctionalTestStage(
name: 'Functional Hardware Medium VMD',
pragma_suffix: '-hw-medium-vmd',
label: params.FUNCTIONAL_HARDWARE_MEDIUM_VMD_LABEL,
next_version: next_version,
stage_tags: 'hw_vmd,medium',
/* groovylint-disable-next-line UnnecessaryGetter */
default_tags: startedByTimer() ? 'pr daily_regression' : 'pr',
nvme: 'auto',
run_if_pr: false,
run_if_landing: false,
job_status: job_status_internal
),
'Functional Hardware Medium Verbs Provider': getFunctionalTestStage(
name: 'Functional Hardware Medium Verbs Provider',
pragma_suffix: '-hw-medium-verbs-provider',
Expand Down
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,4 @@ Interact with members of the DAOS community real-time on [slack](https://daos-st
An invitation to join the slack workspace is automatically sent when joining
the community [mailing list](https://daos.groups.io/g/daos).

DAOS is a SODA Foundation project.

<a href="https://sodafoundation.io/">
<img src="https://sodafoundation.io/wp-content/uploads/2020/01/SODA_logo_outline_color_800x800.png" width="200" height="200">
</a>
DAOS is a Linux Foundation project.
17 changes: 14 additions & 3 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,15 @@ def add_command_line_options():
AddOption('--build-deps',
dest='build_deps',
type='choice',
choices=['yes', 'no', 'only', 'build-only'],
choices=['fetch', 'yes', 'no', 'only'],
default='no',
help="Automatically download and build sources. (yes|no|only|build-only) [no]")
help="Automatically download and build sources. (fetch|yes|no|only) [no]")

AddOption('--skip-download',
dest='skip_download',
action='store_true',
default=False,
help="Assume the source for prerequisites is already downloaded")

# We want to be able to check what dependencies are needed without
# doing a build, similar to --dry-run. We can not use --dry-run
Expand Down Expand Up @@ -363,7 +369,7 @@ MINIMAL_ENV = ('HOME', 'TERM', 'SSH_AUTH_SOCK', 'http_proxy', 'https_proxy', 'PK

# Environment variables that are also kept when LD_PRELOAD is set.
PRELOAD_ENV = ('LD_PRELOAD', 'D_LOG_FILE', 'DAOS_AGENT_DRPC_DIR', 'D_LOG_MASK', 'DD_MASK',
'DD_SUBSYS', 'D_IL_MAX_EQ')
'DD_SUBSYS', 'D_IL_MAX_EQ', 'D_IL_ENFORCE_EXEC_ENV', 'D_IL_COMPATIBLE')


def scons():
Expand All @@ -372,6 +378,11 @@ def scons():
check_for_release_target()

deps_env = Environment()
# Ensure 'install-sandbox' option is defined early
deps_env.Tool('install')

# Silence deprecation warning so it doesn't fail the build
SetOption('warn', ['no-python-version'])

add_command_line_options()

Expand Down
Loading

0 comments on commit 7e8c33b

Please sign in to comment.