From 217d9dddceeebef47aeae735002262b7f9f89e93 Mon Sep 17 00:00:00 2001 From: shaynafinocchiaro Date: Fri, 26 Jul 2024 16:44:45 -0400 Subject: [PATCH] Merge main branch into release-v1.11 branch (#468) * Release 1.10.1 (#401) * Fix Helm deployment of vxflexos driver (#397) * [csm-application-mobility] Revert app mobility version changes (#399) * Revert app mobility version changes --------- Co-authored-by: KshitijaKakde <111420075+KshitijaKakde@users.noreply.github.com> Co-authored-by: gallacher <35462391+gallacher@users.noreply.github.com> * Update driver/module versions for 10.0.2 (#424) * Revert "Update driver/module versions for 10.0.2 (#424)" (#425) * Release v1.10.2 rebase resolved (#440) * Update driver/module versions for 10.0.2 (#426) * removed extra space from sidecar suffix (#433) * Update cosi versions (#434) * Rebase branch (#436) * Update driver/module versions for 10.0.2 (#424) * Revert "Update driver/module versions for 10.0.2 (#424)" (#425) --------- Co-authored-by: boyamurthy <92081029+boyamurthy@users.noreply.github.com> * Update driver/module versions for 10.0.2 (#426) * removed extra space from sidecar suffix (#433) * Update cosi versions (#434) --------- Co-authored-by: boyamurthy <92081029+boyamurthy@users.noreply.github.com> * Revert "Release v1.10.2 rebase resolved (#440)" (#441) This reverts commit 34e764e6e6ee395930b64e4e384b0c32b22b357b. * Release v1.10.2 (#445) * Update driver/module versions for 10.0.2 (#426) * removed extra space from sidecar suffix (#433) * Update cosi versions (#434) * Rebase branch (#436) * Update driver/module versions for 10.0.2 (#424) * Revert "Update driver/module versions for 10.0.2 (#424)" (#425) --------- Co-authored-by: boyamurthy <92081029+boyamurthy@users.noreply.github.com> * Update driver/module versions for 10.0.2 (#426) * removed extra space from sidecar suffix (#433) * Update cosi versions (#434) * Reverse proxy issue * Reverse proxy issue (#443) --------- Co-authored-by: boyamurthy <92081029+boyamurthy@users.noreply.github.com> Co-authored-by: shefali-malhotra <91597668+shefali-malhotra@users.noreply.github.com> * Add yaml lint GitHub Action (#447) * add yamllint github action * add exception * Update helm chart validation action (#449) * remove outdated helm-validations actions and replace with updated action * don't validate maintainers * disable error on braces * update rule * update rules * update rules * ignore template and crd files * lint file * version changes * edits * ignore linting on crd files because they are autogenerated * fix chart linting * fix linting * disable chart linting temporarily * remove doc separator --------- Co-authored-by: Adarsh Kumar Yadav <109620911+adarsh-dell@users.noreply.github.com> Co-authored-by: KshitijaKakde <111420075+KshitijaKakde@users.noreply.github.com> Co-authored-by: gallacher <35462391+gallacher@users.noreply.github.com> Co-authored-by: boyamurthy <92081029+boyamurthy@users.noreply.github.com> Co-authored-by: shefali-malhotra <91597668+shefali-malhotra@users.noreply.github.com> Co-authored-by: HarishH-DELL <109663924+HarishH-DELL@users.noreply.github.com> Co-authored-by: Chiman Jain <36687396+chimanjain@users.noreply.github.com> --- .github/workflows/helm-validations.yml | 72 +++++++++----------------- .github/workflows/yamllinter.yaml | 22 ++++++++ .yamllint | 44 ++++++++++++++++ ct.yaml | 8 +++ dependencyConfig.yaml | 5 -- lintConfig.yaml | 6 --- 6 files changed, 99 insertions(+), 58 deletions(-) create mode 100644 .github/workflows/yamllinter.yaml create mode 100644 .yamllint create mode 100644 ct.yaml delete mode 100644 dependencyConfig.yaml delete mode 100644 lintConfig.yaml diff --git a/.github/workflows/helm-validations.yml b/.github/workflows/helm-validations.yml index d16d5f6f..2a995c41 100644 --- a/.github/workflows/helm-validations.yml +++ b/.github/workflows/helm-validations.yml @@ -1,4 +1,4 @@ -# This action checks the Helm Chart changes for linting and version updates +# This action checks the Helm Chart changes for linting name: helm-validations # Check runs on PRs created to merge to main branch @@ -6,64 +6,42 @@ on: pull_request: branches: - main - - karavi-observability-release - - csm-authorization-release - release-v* jobs: - # This job will check to see if any .yaml file is modified - check_files: - runs-on: ubuntu-latest - outputs: - run_tests: ${{ steps.diff.outputs.run_tests }} - steps: - - uses: actions/checkout@v4 - - name: Check for files changed - id: diff - run: | - URL="https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" - FILES=$(curl -s -X GET -G $URL | jq -r '.[] | .filename') - echo $FILES | grep \.yaml && echo '::set-output name=run_tests::true' || true - - # This job will run helm lint and version increment check on updated charts + # This job will run helm lint on updated charts lint: + name: CSM Chart Linter runs-on: ubuntu-latest - # Only run job when .yaml file is changed - needs: check_files - if: needs.check_files.outputs.run_tests == 'true' steps: # Check out the repo - name: Checkout uses: actions/checkout@v4 with: - fetch-depth: "0" + fetch-depth: "0" - # Lint and version increment checks on updated charts - - name: Run lint/version increment checks - id: versionIncrement - # Bump to proper version after this issue is fixed : https://github.com/helm/chart-testing-action/issues/132 - uses: helm/chart-testing-action@cb49023b9227b1097e5eddd8824f48bdea11b1aa + - name: Set up Helm + uses: azure/setup-helm@v4.2.0 with: - command: lint - config: lintConfig.yaml + version: latest - # This job checks that dependency versions have been updated on the karavi-observability chart - dependency: - runs-on: ubuntu-latest - # Only run job when .yaml file is changed - needs: check_files - if: needs.check_files.outputs.run_tests == 'true' - steps: - # Check out the repo - - name: Checkout - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 with: - fetch-depth: "0" + python-version: '3.12' - # Run a check on karavi-observability chart for updated dependency versions - - name: Run dependency version checks - id: lint - uses: helm/chart-testing-action@cb49023b9227b1097e5eddd8824f48bdea11b1aa - with: - command: lint - config: dependencyConfig.yaml + - name: Install chart-testing-action + uses: helm/chart-testing-action@v2.6.1 + + - name: Run chart-testing list-changed + id: modified-charts + run: | + modified=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }}) + if [[ -n "$modified" ]]; then + echo "modified=true" >> "$GITHUB_OUTPUT" + fi + + # disabling step temporarily to have more time to look into "chart metadata is missing these dependencies" error + # - name: Run chart-testing linter + # if: steps.modified-charts.outputs.modified == 'true' + # run: ct lint --config ct.yaml diff --git a/.github/workflows/yamllinter.yaml b/.github/workflows/yamllinter.yaml new file mode 100644 index 00000000..c241adda --- /dev/null +++ b/.github/workflows/yamllinter.yaml @@ -0,0 +1,22 @@ +# This action checks the linting errors in yaml files +name: yaml-lint + +on: + pull_request: + branches: + - main + - release-v* + +jobs: + yaml_lint_scan: + name: Run Yaml Lint + runs-on: ubuntu-latest + steps: + - name: Checkout the code + uses: actions/checkout@v4 + - name: setup python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + - run: pip install yamllint + - run: yamllint . diff --git a/.yamllint b/.yamllint new file mode 100644 index 00000000..b8b92841 --- /dev/null +++ b/.yamllint @@ -0,0 +1,44 @@ +--- +yaml-files: + - "*.yaml" + - "*.yml" + - ".yamllint" + +rules: + braces: + level: warning + max-spaces-inside: 1 + brackets: + level: warning + max-spaces-inside: 1 + colons: enable + commas: enable + comments: + level: warning + comments-indentation: disable + document-end: disable + document-start: disable + empty-lines: enable + empty-values: disable + hyphens: enable + indentation: enable + key-duplicates: enable + key-ordering: disable + line-length: disable + new-line-at-end-of-file: enable + new-lines: enable + octal-values: disable + quoted-strings: disable + trailing-spaces: enable + truthy: + level: warning + +ignore: | + .github/workflows/ + charts/*/templates/ + charts/*/*/*/templates/ + charts/csi-powermax/charts/csireverseproxy/conf/config.yaml + charts/csm-replication/crds/replicationcrds.all.yaml + charts/csm-authorization-v2.0/crds/csm-authorization.storage.dell.com_csmroles.yaml + charts/csm-authorization-v2.0/crds/csm-authorization.storage.dell.com_csmtenants.yaml + charts/csm-authorization-v2.0/crds/csm-authorization.storage.dell.com_storages.yaml diff --git a/ct.yaml b/ct.yaml new file mode 100644 index 00000000..99199ad1 --- /dev/null +++ b/ct.yaml @@ -0,0 +1,8 @@ +# See https://github.com/helm/chart-testing#configuration +remote: origin +target-branch: main +# Not executed on installation-wizard because of the dependency on other charts +chart-dirs: + - charts +validate-maintainers: false +check-version-increment: false diff --git a/dependencyConfig.yaml b/dependencyConfig.yaml deleted file mode 100644 index 49886490..00000000 --- a/dependencyConfig.yaml +++ /dev/null @@ -1,5 +0,0 @@ -target-branch: main -charts: - - charts/karavi-observability -validate-chart-schema: false -validate-maintainers: false diff --git a/lintConfig.yaml b/lintConfig.yaml deleted file mode 100644 index ccffd22c..00000000 --- a/lintConfig.yaml +++ /dev/null @@ -1,6 +0,0 @@ -target-branch: main -chart-dirs: - - charts -check-version-increment: true -validate-chart-schema: false -validate-maintainers: false