Skip to content

Commit

Permalink
Enforce strict rules for yamllint (apache#11709)
Browse files Browse the repository at this point in the history
  • Loading branch information
mik-laj authored Oct 21, 2020
1 parent ffc9aeb commit 53e6062
Show file tree
Hide file tree
Showing 20 changed files with 75 additions and 56 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
blank_issues_enabled: false
contact_links:
- name: Ask a question or get support
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/build-images-workflow-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#
---
name: "Build Images"
on:
on: # yamllint disable-line rule:truthy
workflow_run:
workflows: ["CI Build"]
types: ['requested']
Expand Down Expand Up @@ -60,13 +60,13 @@ jobs:
if: github.repository == 'apache/airflow' || github.event.workflow_run.event != 'schedule'
steps:
- name: "Get information about the origin 'CI Build' run"
uses: potiuk/get-workflow-origin@c657bb36aef4a7402bbe9b2e09a820320f8ff447 # v1
uses: potiuk/get-workflow-origin@c657bb36aef4a7402bbe9b2e09a820320f8ff447 # v1
id: source-run-info
with:
token: ${{ secrets.GITHUB_TOKEN }}
sourceRunId: ${{ github.event.workflow_run.id }}
- name: "Cancel duplicated 'CI Build' runs"
uses: potiuk/cancel-workflow-runs@0acb1c01f6740dfbca6eab6e21a5b5066e8bafb3 # v3_3
uses: potiuk/cancel-workflow-runs@0acb1c01f6740dfbca6eab6e21a5b5066e8bafb3 # v3_3
with:
token: ${{ secrets.GITHUB_TOKEN }}
cancelMode: duplicates
Expand All @@ -84,7 +84,7 @@ jobs:
# in GitHub Actions, we have to use Job names to match Event/Repo/Branch from the
# build-info step there to find the duplicates ¯\_(ツ)_/¯.

uses: potiuk/cancel-workflow-runs@0acb1c01f6740dfbca6eab6e21a5b5066e8bafb3 # v3_3
uses: potiuk/cancel-workflow-runs@0acb1c01f6740dfbca6eab6e21a5b5066e8bafb3 # v3_3
with:
cancelMode: namedJobs
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -105,7 +105,7 @@ jobs:
# can cancel all the matching "Build Images" workflow runs in the two following steps.
# Yeah. Adding to the complexity ¯\_(ツ)_/¯.

uses: potiuk/cancel-workflow-runs@0acb1c01f6740dfbca6eab6e21a5b5066e8bafb3 # v3_3
uses: potiuk/cancel-workflow-runs@0acb1c01f6740dfbca6eab6e21a5b5066e8bafb3 # v3_3
id: cancel-failed
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -140,14 +140,14 @@ jobs:
# it to cancel any jobs that have matching names containing Source Run Id:
# followed by one of the run ids. Yes I know it's super complex ¯\_(ツ)_/¯.
if: env.BUILD_IMAGES == 'true' && steps.source-run-info-failed.outputs.cancelledRuns != '[]'
uses: potiuk/cancel-workflow-runs@0acb1c01f6740dfbca6eab6e21a5b5066e8bafb3 # v3_3
uses: potiuk/cancel-workflow-runs@0acb1c01f6740dfbca6eab6e21a5b5066e8bafb3 # v3_3
with:
cancelMode: namedJobs
token: ${{ secrets.GITHUB_TOKEN }}
notifyPRCancel: true
jobNameRegexps: ${{ steps.extract-cancelled-failed-runs.outputs.matching-regexp }}
- name: "Cancel duplicated 'CodeQL' runs"
uses: potiuk/cancel-workflow-runs@0acb1c01f6740dfbca6eab6e21a5b5066e8bafb3 # v3_3
uses: potiuk/cancel-workflow-runs@0acb1c01f6740dfbca6eab6e21a5b5066e8bafb3 # v3_3
id: cancel
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -243,8 +243,8 @@ jobs:
needs: [build-info, cancel-workflow-runs]
strategy:
matrix:
# We need to attempt to build all possible versions here because workflow_run
# event is run from master for both master and v1-10-tests
# We need to attempt to build all possible versions here because workflow_run
# event is run from master for both master and v1-10-tests
python-version: ${{ fromJson(needs.build-info.outputs.allPythonVersions) }}
image-type: [CI, PROD]
fail-fast: true
Expand Down Expand Up @@ -296,7 +296,7 @@ jobs:
echo "::set-output name=proceed::false"
fi
- name: Initiate Github Checks for Building image
uses: LouisBrunner/checks-action@9f02872da71b6f558c6a6f190f925dde5e4d8798 #v1.1.0
uses: LouisBrunner/checks-action@9f02872da71b6f558c6a6f190f925dde5e4d8798 # v1.1.0
id: build-image-check
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -344,7 +344,7 @@ jobs:
run: ./scripts/ci/images/ci_push_production_images.sh
if: matrix.image-type == 'PROD' && steps.defaults.outputs.proceed == 'true'
- name: Update Github Checks for Building image with status
uses: LouisBrunner/checks-action@9f02872da71b6f558c6a6f190f925dde5e4d8798 #v1.1.0
uses: LouisBrunner/checks-action@9f02872da71b6f558c6a6f190f925dde5e4d8798 # v1.1.0
if: always() && steps.defaults.outputs.proceed == 'true'
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -366,7 +366,7 @@ jobs:
needs: [build-images]
steps:
- name: "Canceling the 'CI Build' source workflow in case of failure!"
uses: potiuk/cancel-workflow-runs@cancel_message #v3
uses: potiuk/cancel-workflow-runs@cancel_message # v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
cancelMode: self
Expand All @@ -381,7 +381,7 @@ jobs:
needs: [build-images]
steps:
- name: "Canceling the 'CI Build' source workflow in case of failure!"
uses: potiuk/cancel-workflow-runs@0acb1c01f6740dfbca6eab6e21a5b5066e8bafb3 # v3_3
uses: potiuk/cancel-workflow-runs@0acb1c01f6740dfbca6eab6e21a5b5066e8bafb3 # v3_3
with:
token: ${{ secrets.GITHUB_TOKEN }}
cancelMode: self
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#
---
name: CI Build
on:
on: # yamllint disable-line rule:truthy
schedule:
- cron: '28 0 * * *'
push:
Expand Down Expand Up @@ -937,7 +937,7 @@ jobs:
- name: "Commit changed constraint files for ${{needs.build-info.outputs.pythonVersions}}"
run: ./scripts/ci/constraints/ci_commit_constraints.sh
- name: "Push changes"
uses: ad-m/github-push-action@40bf560936a8022e68a3c00e7d2abefaf01305a6 # v0.6.0
uses: ad-m/github-push-action@40bf560936a8022e68a3c00e7d2abefaf01305a6 # v0.6.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ steps.constraints-branch.outputs.branch }}
Expand Down Expand Up @@ -973,7 +973,7 @@ jobs:
echo "Tagging ${BRANCH_NAME}"
git tag -f nightly-${BRANCH_NAME} HEAD
- name: "Push tags"
uses: ad-m/github-push-action@40bf560936a8022e68a3c00e7d2abefaf01305a6 # v0.6.0
uses: ad-m/github-push-action@40bf560936a8022e68a3c00e7d2abefaf01305a6 # v0.6.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tags: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: "CodeQL"

on:
on: # yamllint disable-line rule:truthy
push:
branches: [master]
pull_request:
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/delete_old_artifacts.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
---
name: 'Delete old artifacts'
on:
on: # yamllint disable-line rule:truthy
schedule:
- cron: '27 */6 * * *' # run every 6 hours
- cron: '27 */6 * * *' # run every 6 hours

jobs:
delete-artifacts:
runs-on: ubuntu-latest
if: github.repository == 'apache/airflow'
steps:
- uses: kolpav/purge-artifacts-action@04c636a505f26ebc82f8d070b202fb87ff572b10 # v1.0
- uses: kolpav/purge-artifacts-action@04c636a505f26ebc82f8d070b202fb87ff572b10 # v1.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
expire-in: 7days # Setting this to 0 will delete all artifacts
expire-in: 7days # Setting this to 0 will delete all artifacts
2 changes: 1 addition & 1 deletion .github/workflows/repo_sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#
---
name: Force sync master from apache/airflow
on:
on: # yamllint disable-line rule:truthy
workflow_dispatch:
jobs:
repo-sync:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scheduled_quarantined.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#
---
name: Quarantined Build
on:
on: # yamllint disable-line rule:truthy
schedule:
# Run quarantined builds 4 times a day to gather better quarantine stats
- cron: '12 */6 * * *'
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ repos:
hooks:
- id: yamllint
name: Check yaml files with yamllint
entry: yamllint -c yamllint-config.yml
entry: yamllint -c yamllint-config.yml --strict
types: [yaml]
exclude:
^.*init_git_sync\.template\.yaml$|^.*airflow\.template\.yaml$|^chart/(?:templates|files)/.*\.yaml
Expand Down
4 changes: 2 additions & 2 deletions airflow/api_connexion/openapi/v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1510,7 +1510,7 @@ components:
nullable: true
state:
$ref: '#/components/schemas/DagState'
readOnly: True
readOnly: true
external_trigger:
type: boolean
default: true
Expand Down Expand Up @@ -1746,7 +1746,7 @@ components:
type: string
queued_when:
type: string
nullable: True
nullable: true
pid:
type: integer
executor_config:
Expand Down
2 changes: 1 addition & 1 deletion airflow/kubernetes_executor_templates/basic_template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

---
kind: Pod
apiVersion: v1
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

---
apiVersion: "sparkoperator.k8s.io/v1beta2"
kind: SparkApplication
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

---
steps:
- name: 'ubuntu'
args: ['echo', 'Hello {{ params.name}}']
2 changes: 1 addition & 1 deletion airflow/providers/google/config_templates/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

---
- name: providers_google
description: Options for google provider
options:
Expand Down
1 change: 1 addition & 0 deletions chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
# under the License.

# apiVersion v1 is Helm 2
---
apiVersion: v1
name: airflow
version: 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion chart/dockerfiles/statsd-exporter/mappings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

---
mappings:
# Map dot separated stats to labels
- match: airflow.dagrun.dependency-check.*.*
Expand Down
2 changes: 1 addition & 1 deletion chart/requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

---
dependencies:
- name: postgresql
version: 6.3.12
Expand Down
2 changes: 1 addition & 1 deletion chart/tests/migrate-database-job_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

---
templates:
- migrate-database-job.yaml
tests:
Expand Down
50 changes: 33 additions & 17 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -450,13 +450,21 @@ pgbouncer:
config:
maxUnavailable: 1

# Limit the resources to pgbouncerExported.
# When you specify the resource request the scheduler uses this information to decide which node to place
# the Pod on. When you specify a resource limit for a Container, the kubelet enforces those limits so
# that the running container is not allowed to use more of that resource than the limit you set.
# See: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
# Example:
#
# resource:
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
resources: {}
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi

service:
extraAnnotations: {}
Expand Down Expand Up @@ -510,11 +518,13 @@ redis:
registry:
secretName: ~

# Example:
# connection:
# user: ~
# pass: ~
# host: ~
# email: ~
connection: {}
# user: ~
# pass: ~
# host: ~
# email: ~

# Elasticsearch logging configuration
elasticsearch:
Expand All @@ -523,11 +533,14 @@ elasticsearch:
# A secret containing the connection
secretName: ~
# Or an object representing the connection
# Example:
# connection:
# user: ~
# pass: ~
# host: ~
# port: ~
connection: {}
# user: ~
# pass: ~
# host: ~
# port: ~


# All ports used by chart
ports:
Expand Down Expand Up @@ -689,7 +702,8 @@ dags:
# GIT_SYNC_USERNAME: <base64_encoded_git_username>
# GIT_SYNC_PASSWORD: <base64_encoded_git_password>
# and specify the name of the secret below
#credentialsSecret: git-credentials
#
# credentialsSecret: git-credentials
#
#
# If you are using an ssh clone url, you can load
Expand All @@ -703,10 +717,12 @@ dags:
# # key needs to be gitSshKey
# gitSshKey: <base64_encoded_data>
# and specify the name of the secret below
#sshKeySecret: airflow-ssh-secret
# sshKeySecret: airflow-ssh-secret
#
# If you are using an ssh private key, you can additionally
# specify the content of your known_hosts file, example:
#knownHosts: |
#
# knownHosts: |
# <host1>,<ip1> <key1>
# <host2>,<ip2> <key2>
# interval between git sync attempts in seconds
Expand Down
10 changes: 5 additions & 5 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

---
codecov:
require_ci_to_pass: true
notify:
Expand Down Expand Up @@ -62,9 +62,9 @@ coverage:
parsers:
gcov:
branch_detection:
conditional: yes
loop: yes
method: no
macro: no
conditional: true
loop: true
method: false
macro: false

comment: false
Loading

0 comments on commit 53e6062

Please sign in to comment.