Skip to content

Commit 4a1f1cd

Browse files
authored
Enable yaml formatter; fix formatting in default-python & dbt-sql (#3026)
## Changes - Update 'make fmt' to format yaml with https://github.com/google/yamlfmt/ - Templates dbt-sql and default-python updated to have consistent indentation according to formatter. ## Why For templates with a lot of options (default-python) it's easy to introduce formatting issues - too many empty lines or not enough in the output. I'd like to use formatter also on non-materialized templates in default-python/combinations to ensure that resulting yamls are formatted well for any possible combination of options. Related: #3004
1 parent 582c2df commit 4a1f1cd

82 files changed

Lines changed: 352 additions & 339 deletions

File tree

Some content is hidden

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

.github/workflows/external-message.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,25 +29,25 @@ jobs:
2929

3030
- name: Delete old comments
3131
env:
32-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3333
run: |
34-
# Delete previous comment if it exists
35-
previous_comment_ids=$(gh api "repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments" \
36-
--jq '.[] | select(.body | startswith("<!-- INTEGRATION_TESTS_MANUAL -->")) | .id')
37-
echo "Previous comment IDs: $previous_comment_ids"
38-
# Iterate over each comment ID and delete the comment
39-
if [ ! -z "$previous_comment_ids" ]; then
40-
echo "$previous_comment_ids" | while read -r comment_id; do
41-
echo "Deleting comment with ID: $comment_id"
42-
gh api "repos/${{ github.repository }}/issues/comments/$comment_id" -X DELETE
43-
done
44-
fi
34+
# Delete previous comment if it exists
35+
previous_comment_ids=$(gh api "repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments" \
36+
--jq '.[] | select(.body | startswith("<!-- INTEGRATION_TESTS_MANUAL -->")) | .id')
37+
echo "Previous comment IDs: $previous_comment_ids"
38+
# Iterate over each comment ID and delete the comment
39+
if [ ! -z "$previous_comment_ids" ]; then
40+
echo "$previous_comment_ids" | while read -r comment_id; do
41+
echo "Deleting comment with ID: $comment_id"
42+
gh api "repos/${{ github.repository }}/issues/comments/$comment_id" -X DELETE
43+
done
44+
fi
4545
4646
- name: Comment on PR
4747
env:
4848
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4949
COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
50-
run: |
50+
run: |-
5151
gh pr comment ${{ github.event.pull_request.number }} --body \
5252
"<!-- INTEGRATION_TESTS_MANUAL -->
5353
An authorized user can trigger integration tests manually by following the instructions below:

.github/workflows/integration-approve.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
env:
2727
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2828
shell: bash
29-
run: |
29+
run: |-
3030
gh api -X POST -H "Accept: application/vnd.github+json" \
3131
-H "X-GitHub-Api-Version: 2022-11-28" \
3232
/repos/${{ github.repository }}/statuses/${{ github.sha }} \

.github/workflows/integration-main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Trigger Workflow in Another Repo
3131
env:
3232
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
33-
run: |
33+
run: |-
3434
gh workflow run cli-isolated-nightly.yml -R ${{ secrets.ORG_NAME }}/${{secrets.REPO_NAME}} \
3535
--ref main \
3636
-f commit_sha=${{ github.event.after }}

.github/workflows/integration-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- name: Trigger Workflow in Another Repo
3434
env:
3535
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
36-
run: |
36+
run: |-
3737
gh workflow run cli-isolated-pr.yml -R ${{ secrets.ORG_NAME }}/${{secrets.REPO_NAME}} \
3838
--ref main \
3939
-f pull_request_number=${{ github.event.pull_request.number }} \

.github/workflows/push.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
branches:
1515
- main
1616
schedule:
17-
- cron: '0 0,12 * * *' # Runs at 00:00 and 12:00 UTC daily
17+
- cron: '0 0,12 * * *' # Runs at 00:00 and 12:00 UTC daily
1818

1919
env:
2020
GOTESTSUM_FORMAT: github-actions
@@ -192,7 +192,7 @@ jobs:
192192

193193
- name: Verify that python/codegen is up to date
194194
working-directory: experimental/python
195-
run: |
195+
run: |-
196196
make codegen
197197
198198
if ! ( git diff --exit-code ); then

.github/workflows/python_push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
strategy:
2727
fail-fast: false
2828
matrix:
29-
pyVersion: [ '3.10', '3.11', '3.12', '3.13' ]
29+
pyVersion: ['3.10', '3.11', '3.12', '3.13']
3030

3131
steps:
3232
- name: Checkout repository and submodules

.github/workflows/release-snapshot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,6 @@ jobs:
9494
prerelease: true
9595
tag_name: snapshot
9696
token: ${{ secrets.GITHUB_TOKEN }}
97-
files: |
97+
files: |-
9898
dist/databricks_cli_*.zip
9999
dist/databricks_cli_*.tar.gz

.github/workflows/release.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ jobs:
161161

162162
needs: goreleaser
163163

164-
165164
# IMPORTANT:
166165
# - 'id-token: write' is mandatory for OIDC and trusted publishing to PyPi
167166
# - 'environment: release' is a part of OIDC assertion done by PyPi

.github/workflows/start-integration-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ jobs:
3737
- name: Run start_integration_tests.py
3838
env:
3939
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
40-
run: |
40+
run: |-
4141
python3 ./start_integration_tests.py -R ${{ secrets.ORG_NAME }}/${{secrets.REPO_NAME}} --yes

.github/workflows/tagging.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ on:
1111
concurrency:
1212
group: "tagging"
1313

14-
1514
jobs:
1615
tag:
1716
environment: "release-is"
@@ -47,5 +46,5 @@ jobs:
4746
env:
4847
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
4948
GITHUB_REPOSITORY: ${{ github.repository }}
50-
run: |
49+
run: |-
5150
python internal/genkit/tagging.py

0 commit comments

Comments
 (0)