Skip to content

Commit

Permalink
chore: Disable yamllint multiline indentation (#1920)
Browse files Browse the repository at this point in the history
Summary: This rule causes more noise than we'd like and it ends up being
disabled all over the place. So instead just remove it at the top level.

Relevant Issues: N/A

Type of change: /kind infra

Test Plan: Lint runs should continue to pass.

Signed-off-by: Vihang Mehta <[email protected]>
  • Loading branch information
vihangm authored May 27, 2024
1 parent 1af42e3 commit 3ae873d
Show file tree
Hide file tree
Showing 54 changed files with 20 additions and 137 deletions.
4 changes: 0 additions & 4 deletions .github/actions/comment_command/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,19 @@ runs:
env:
BODY: ${{ github.event.comment.body }}
COMMAND_NAME: ${{ inputs.command-name }}
# yamllint disable rule:indentation
run: |
if [[ "${BODY}" =~ "/${COMMAND_NAME}"* ]]; then
exit 0
else
echo "${BODY} is not a /${COMMAND_NAME} command" >&2
exit 1
fi
# yamllint enable rule:indentation
- name: Check permissions
shell: bash
env:
PR_AUTHOR_ASSOC: ${{ github.event.issue.author_association }}
COMMENT_AUTHOR_ASSOC: ${{ github.event.comment.author_association }}
ADMIN_ONLY: ${{ inputs.admin-only }}
# yamllint disable rule:indentation
run: |
if [[ -z "${PR_AUTHOR_ASSOC}" ]] || [[ -z "${COMMENT_AUTHOR_ASSOC}" ]]; then
echo "failed to get permission levels of users involved" >&2
Expand All @@ -59,7 +56,6 @@ runs:
fi
echo "members can only run this command on other members prs: permission denied" >&2
exit 2
# yamllint enable rule:indentation
- name: Parse command
id: parse
shell: bash
Expand Down
4 changes: 0 additions & 4 deletions .github/actions/env_protected_pr/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ runs:
using: "composite"
steps:
- name: Not pull_request_target
# yamllint disable rule:indentation
if: github.event_name != 'pull_request_target'
shell: bash
run: |
Expand All @@ -29,21 +28,18 @@ runs:
github.event.pull_request.author_association == 'OWNER' ||
github.event.pull_request.author_association == 'MEMBER'
)
# yamllint enable rule:indentation
shell: bash
run: |
echo "" > env_name
echo "${{ github.event.pull_request.head.sha }}" >> ref
echo "${{ github.event.pull_request.head.sha }}" >> sha
- name: Require external environment authorization.
# yamllint disable rule:indentation
if: >-
github.event_name == 'pull_request_target' &&
!(
github.event.pull_request.author_association == 'OWNER' ||
github.event.pull_request.author_association == 'MEMBER'
)
# yamllint enable rule:indentation
shell: bash
run: |
echo "pr-actions-approval" > env_name
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/build_and_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,12 @@ jobs:
run: ./ci/save_diff_info.sh
- name: Run Clang Tidy
shell: bash
# yamllint disable rule:indentation
run: |
diff_file="diff_origin_main_cc"
if [[ "${{ github.event_name }}" == "push" ]] || [[ "${{ github.event_name }}" == "schedule" ]]; then
diff_file="diff_head_cc"
fi
./ci/run_clang_tidy.sh -f "${diff_file}"
# yamllint enable rule:indentation
code-coverage:
if: github.event_name == 'push'
needs: [authorize, env-protect-setup, get-dev-image]
Expand Down Expand Up @@ -151,23 +149,19 @@ jobs:
run: rm -rf "$(bazel info ${{ matrix.args }} bazel-testlogs --noshow_progress 2>/dev/null)"
- name: Build ${{ matrix.name }}
shell: bash
# yamllint disable rule:indentation
run: |
./scripts/bazel_ignore_codes.sh build \
${{ matrix.args }} \
--target_pattern_file=target_files/${{ matrix.buildables }} \
2> >(tee bazel_stderr)
# yamllint enable rule:indentation
- name: Test ${{ matrix.name }}
if: ${{ matrix.tests }}
shell: bash
# yamllint disable rule:indentation
run: |
# Github actions container runner creates a docker network without IPv6 support. We enable it manually.
sysctl -w net.ipv6.conf.lo.disable_ipv6=0
./scripts/bazel_ignore_codes.sh test ${{ matrix.args }} --target_pattern_file=target_files/${{ matrix.tests }} \
2> >(tee bazel_stderr)
# yamllint enable rule:indentation
- name: Parse junit reports
uses: dorny/test-reporter@afe6793191b75b608954023a46831a3fe10048d4 # v1.7.0
if: always()
Expand Down Expand Up @@ -196,13 +190,11 @@ jobs:
needs.generate-matrix.result == 'success' && needs.clang-tidy.result == 'success'
&& needs.build-and-test.result == 'skipped'
run: echo "Build and Test skipped no matrix configs generated ✓"
# yamllint disable rule:indentation
- if: >
!(needs.build-and-test.result == 'success' && needs.clang-tidy.result == 'success') &&
!(needs.generate-matrix.result == 'success' &&
needs.clang-tidy.result == 'success' &&
needs.build-and-test.result == 'skipped')
# yamllint enable rule:indentation
run: |
echo "Build and Test failed"
exit 1
2 changes: 0 additions & 2 deletions .github/workflows/cli_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ jobs:
REF: ${{ github.event.ref }}
GH_TOKEN: ${{ secrets.BUILDBOT_GH_API_TOKEN }}
shell: bash
# yamllint disable rule:indentation
run: |
export TAG_NAME="${REF#*/tags/}"
# actions/checkout doesn't get the tag annotation properly.
Expand All @@ -185,7 +184,6 @@ jobs:
--title "CLI ${TAG_NAME#release/cli/}" \
--notes $'Pixie CLI Release:\n'"${changelog}"
gh release upload "${TAG_NAME}" linux-artifacts/* macos-artifacts/*
# yamllint enable rule:indentation
update-gh-artifacts-manifest:
runs-on: ubuntu-latest-8-cores
needs: [get-dev-image, create-github-release]
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/cloud_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ jobs:
OWNER: pixie-io
REPO: pixie
shell: bash
# yamllint disable rule:indentation
run: |
export TAG_NAME="${REF#*/tags/}"
# actions/checkout doesn't get the tag annotation properly.
Expand All @@ -88,4 +87,3 @@ jobs:
gh release create "${TAG_NAME}" --title "Cloud ${TAG_NAME#release/cloud/}" \
--notes $'Pixie Cloud Release:\n'"${changelog}"
gh release upload "${TAG_NAME}" cloud-artifacts/*
# yamllint enable rule:indentation
2 changes: 0 additions & 2 deletions .github/workflows/mirror_demos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ jobs:
run: go install github.com/regclient/regclient/cmd/[email protected]
- name: sync images
shell: bash
# yamllint disable rule:indentation
run: |
cd scripts/regclient
regbot once ${{ github.event.inputs.dry_run && ' --dry-run' }} --config regbot_demos.yaml
# yamllint enable rule:indentation
2 changes: 0 additions & 2 deletions .github/workflows/mirror_deps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ jobs:
run: go install github.com/regclient/regclient/cmd/[email protected]
- name: sync images
shell: bash
# yamllint disable rule:indentation
run: |
cd scripts/regclient
regbot once ${{ github.event.inputs.dry_run && ' --dry-run' }} --config regbot_deps.yaml
# yamllint enable rule:indentation
2 changes: 0 additions & 2 deletions .github/workflows/mirror_releases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ jobs:
run: go install github.com/regclient/regclient/cmd/[email protected]
- name: sync images
shell: bash
# yamllint disable rule:indentation
run: |
cd scripts/regclient
regbot once --config regbot_releases.yaml
# yamllint enable rule:indentation
3 changes: 0 additions & 3 deletions .github/workflows/operator_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ jobs:
REF: ${{ github.event.ref }}
GH_TOKEN: ${{ secrets.BUILDBOT_GH_API_TOKEN }}
shell: bash
# yamllint disable rule:indentation
run: |
export TAG_NAME="${REF#*/tags/}"
# actions/checkout doesn't get the tag annotation properly.
Expand Down Expand Up @@ -136,14 +135,12 @@ jobs:
TAG_NAME: ${{ github.event.release.tag_name }}
GH_TOKEN: ${{ secrets.BUILDBOT_GH_API_TOKEN }}
GIT_SSH_COMMAND: "ssh -i /tmp/ssh.key"
# yamllint disable rule:indentation
run: |
cp index-artifacts/index.yaml helm_charts/operator/index.yaml
git add helm_charts/operator/index.yaml
export VERSION="$(echo "${TAG_NAME}" | cut -d'/' -f3)"
git commit -s -m "Release Helm chart ${VERSION}"
git push origin "gh-pages"
# yamllint enable rule:indentation
update-gh-artifacts-manifest:
runs-on: ubuntu-latest-8-cores
needs: [get-dev-image, create-github-release]
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/perf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ jobs:
echo "tags=${tags}" >> $GITHUB_OUTPUT
- name: Add default tags
id: default-tags
# yamllint disable rule:indentation
run: |
default_tags="PR#${{ github.event.issue.number }}"
tags="${{ steps.parse.outputs.tags }}"
Expand All @@ -81,7 +80,6 @@ jobs:
fi
tags="${tags}${default_tags}"
echo "tags=${tags}" >> $GITHUB_OUTPUT
# yamllint enable rule:indentation
pr-perf-eval:
name: PR Performance Evaluation
needs: pr-perf-setup
Expand All @@ -100,7 +98,6 @@ jobs:
steps:
- uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
with:
# yamllint disable rule:indentation
script: |
const experiments = JSON.parse('${{ needs.pr-perf-eval.outputs.experiments }}');
let comment = `Perf eval finished:
Expand All @@ -116,5 +113,3 @@ jobs:
repo: context.repo.repo,
body: comment,
})
# yamllint enable rule:indentation
2 changes: 0 additions & 2 deletions .github/workflows/perf_common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ jobs:
env:
PX_API_KEY: ${{ secrets.PERF_PX_API_KEY }}
GOOGLE_APPLICATION_CREDENTIALS: ${{ steps.gcloud-creds.outputs.gcloud-creds }}
# yamllint disable rule:indentation
run: |
echo "$GOOGLE_APPLICATION_CREDENTIALS"
bazel run //src/e2e_test/perf_tool -- run --commit_sha "${{ steps.get-commit-sha.outputs.commit-sha }}" \
Expand All @@ -104,7 +103,6 @@ jobs:
--tags "${{ inputs.tags }}" \
--suite "${{ matrix.suite }}" \
--experiment_name "${{ matrix.experiment_name }}" > run_output
# yamllint enable rule:indentation
- name: deactivate gcloud service account
run: gcloud auth revoke
# Github actions doesn't have native support for gathering outputs from matrix runs.
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/pr_genfiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,10 @@ jobs:
run: make go-setup
- name: Fail if any files changed
shell: bash
# yamllint disable rule:indentation
run: |
if [[ $(git status --porcelain=v1 | wc -l) -ne 0 ]]; then
echo "Please update generated files by running the appropriate script."
echo "Changed files:"
git diff --name-only
exit 1
fi
# yamllint enable rule:indentation
2 changes: 0 additions & 2 deletions .github/workflows/pr_linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,10 @@ jobs:
run: arc lint --apply-patches --trace
- name: Fail if any files changed
shell: bash
# yamllint disable rule:indentation
run: |
if [[ $(git status --porcelain=v1 | wc -l) -ne 0 ]]; then
echo "Please apply the autofix patches suggested by arc lint."
echo "Changed files:"
git diff --name-only
exit 1
fi
# yamllint enable rule:indentation
1 change: 0 additions & 1 deletion .github/workflows/release_update_docs_px_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ jobs:
env:
GH_TOKEN: ${{ secrets.BUILDBOT_GH_API_TOKEN }}
GIT_SSH_COMMAND: "ssh -i /tmp/ssh.key"
# yamllint disable rule:indentation
run: |
if [[ $(git status --porcelain=v1 | wc -l) -eq 0 ]]; then
echo "No updates to the documentation detected, exiting."
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/release_update_readme.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ jobs:
TAG_NAME: ${{ github.event.release.tag_name }}
GH_TOKEN: ${{ secrets.BUILDBOT_GH_API_TOKEN }}
GIT_SSH_COMMAND: "ssh -i /tmp/ssh.key"
# yamllint disable rule:indentation
run: |
export VERSION="$(echo "${TAG_NAME}" | cut -d'/' -f3)"
export BRANCH="${VERSION}-update-readme"
Expand All @@ -62,4 +61,3 @@ jobs:
gh pr create --repo pixie-io/pixie \
--head "pixie-io-buildbot:${BRANCH}" \
--body "$(cat pr_body)" --title "$(cat pr_title)"
# yamllint enable rule:indentation
2 changes: 0 additions & 2 deletions .github/workflows/trivy_images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,11 @@ jobs:
mkdir -p sarif/${{ matrix.artifact }}
./bazel-bin/k8s/${{ matrix.artifact }}/list_image_bundle | xargs -I{} sh -c 'trivy image {} --format=sarif --output=sarif/${{ matrix.artifact }}/$(basename {} | cut -d":" -f1).sarif'
# yamllint enable rule:line-length
# yamllint disable rule:indentation
- run: |
for f in "sarif/${{ matrix.artifact }}/"*; do
jq '.runs[].tool.driver.name = "trivy-images"' < "$f" > tmp
mv tmp "$f"
done
# yamllint enable rule:indentation
- uses: github/codeql-action/upload-sarif@04df1262e6247151b5ac09cd2c303ac36ad3f62b # v2.2.9
with:
sarif_file: sarif/${{ matrix.artifact }}
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/update_script_bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jobs:
- name: Add pwd to git safe dir
run: git config --global --add safe.directory `pwd`
- name: Install Pixie CLI
# yamllint disable rule:indentation
run: |
jq_script=(
'.[] | '
Expand All @@ -29,7 +28,6 @@ jobs:
download_link=$(curl -fssL "https://artifacts.px.dev/artifacts/manifest.json" | jq "${jq_script[*]}" -r )
curl -fssL "${download_link}" -o px
chmod +x px
# yamllint enable rule:indentation
- name: Build bundle
shell: bash
run: |
Expand Down Expand Up @@ -72,7 +70,6 @@ jobs:
env:
GH_TOKEN: ${{ secrets.BUILDBOT_GH_API_TOKEN }}
GIT_SSH_COMMAND: "ssh -i /tmp/ssh.key"
# yamllint disable rule:indentation
run: |
mkdir -p pxl_scripts
cp bundle/bundle-oss.json pxl_scripts/bundle.json
Expand All @@ -84,4 +81,3 @@ jobs:
fi
git commit -s -m "Update PxL script bundle"
git push origin "gh-pages"
# yamllint enable rule:indentation
4 changes: 0 additions & 4 deletions .github/workflows/vizier_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ jobs:
REF: ${{ github.event.ref }}
GH_TOKEN: ${{ secrets.BUILDBOT_GH_API_TOKEN }}
shell: bash
# yamllint disable rule:indentation
run: |
export TAG_NAME="${REF#*/tags/}"
# actions/checkout doesn't get the tag annotation properly.
Expand All @@ -116,7 +115,6 @@ jobs:
--title "Vizier ${TAG_NAME#release/vizier/}" \
--notes $'Pixie Vizier Release:\n'"${changelog}"
gh release upload "${TAG_NAME}" vizier-artifacts/*
# yamllint enable rule:indentation
create-helm-chart:
if: ${{ !contains(github.event.ref, '-') }}
name: Create Helm chart on Github
Expand Down Expand Up @@ -144,14 +142,12 @@ jobs:
TAG_NAME: ${{ github.event.release.tag_name }}
GH_TOKEN: ${{ secrets.BUILDBOT_GH_API_TOKEN }}
GIT_SSH_COMMAND: "ssh -i /tmp/ssh.key"
# yamllint disable rule:indentation
run: |
cp index-artifacts/index.yaml helm_charts/vizier/index.yaml
git add helm_charts/vizier/index.yaml
export VERSION="$(echo "${TAG_NAME}" | cut -d'/' -f3)"
git commit -s -m "Release Helm chart Vizier ${VERSION}"
git push origin "gh-pages"
# yamllint enable rule:indentation
update-gh-artifacts-manifest:
runs-on: ubuntu-latest-8-cores
needs: [get-dev-image, create-github-release]
Expand Down
1 change: 0 additions & 1 deletion .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ rules:
indentation:
spaces: 2
indent-sequences: false
check-multi-line-strings: true
line-length:
max: 120
truthy:
Expand Down
2 changes: 0 additions & 2 deletions demos/sock-shop/sock-shop-loadgen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,11 @@ spec:
initContainers:
- name: wait-sock-shop
image: gcr.io/pixie-oss/pixie-dev-public/curl:multiarch-7.87.0@sha256:f7f265d5c64eb4463a43a99b6bf773f9e61a50aaa7cefaf564f43e42549a01dd
# yamllint disable rule:indentation
command: ['sh', '-c', 'set -x;
until timeout 2 curl -f "${SOCK_SHOP_HEALTH_ADDR}"; do
echo "waiting for ${SOCK_SHOP_HEALTH_ADDR}";
sleep 2;
done;']
# yamllint enable rule:indentation
env:
- name: SOCK_SHOP_HEALTH_ADDR
value: "http://orders.px-sock-shop.svc.cluster.local/health"
Expand Down
1 change: 0 additions & 1 deletion k8s/cloud/base/ory_auth/hydra/hydra_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: hydra-config
# yamllint disable rule:indentation
data:
hydra.yml: |+
# All URLS must be set in the environment variables instead of config.
Expand Down
Loading

0 comments on commit 3ae873d

Please sign in to comment.