Merge pull request #15960 from tao12345666333/add-yamllint

ci: Introduce yamllint for actions workflow files
dependabot/go_modules/github.com/prometheus/procfs-0.11.0
Marek Siarkowicz 2023-05-29 08:12:56 +02:00 committed by GitHub
commit 8b5ec05ede
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
34 changed files with 675 additions and 651 deletions

View File

@ -1,9 +1,10 @@
---
name: Bug Report
description: Report a bug encountered while operating Etcd
labels:
- type/bug
- type/bug
body:
- type: markdown
- type: markdown
attributes:
value: |
Please read https://github.com/etcd-io/etcd/blob/main/Documentation/contributor-guide/reporting_bugs.md
@ -11,33 +12,33 @@ body:
Please fill the form below and provide as much information as possible.
Not doing so may result in your bug not being addressed in a timely manner.
- type: textarea
- type: textarea
id: problem
attributes:
label: What happened?
validations:
required: true
- type: textarea
- type: textarea
id: expected
attributes:
label: What did you expect to happen?
validations:
required: true
- type: textarea
- type: textarea
id: repro
attributes:
label: How can we reproduce it (as minimally and precisely as possible)?
validations:
required: true
- type: textarea
- type: textarea
id: additional
attributes:
label: Anything else we need to know?
- type: textarea
- type: textarea
id: etcdVersion
attributes:
label: Etcd version (please run commands below)
@ -56,7 +57,7 @@ body:
validations:
required: true
- type: textarea
- type: textarea
id: config
attributes:
label: Etcd configuration (command line flags or environment variables)
@ -67,7 +68,7 @@ body:
</details>
- type: textarea
- type: textarea
id: etcdDebugInformation
attributes:
label: Etcd debug information (please run commands below, feel free to obfuscate the IP address or FQDN in the output)
@ -84,7 +85,7 @@ body:
</details>
- type: textarea
- type: textarea
id: logs
attributes:
label: Relevant log output

View File

@ -1,5 +1,6 @@
---
blank_issues_enabled: false
contact_links:
- name: Question
- name: Question
url: https://github.com/etcd-io/etcd/discussions
about: Question relating to Etcd

View File

@ -1,16 +1,17 @@
---
name: Feature request
description: Provide idea for a new feature
labels:
- type/feature
- type/feature
body:
- type: textarea
- type: textarea
id: feature
attributes:
label: What would you like to be added?
validations:
required: true
- type: textarea
- type: textarea
id: rationale
attributes:
label: Why is this needed?

View File

@ -1,16 +1,17 @@
---
name: Membership nomination
description: Nominate new etcd members
labels:
- area/community
- area/community
body:
- type: textarea
- type: textarea
id: feature
attributes:
label: Who would you like to nominate?
validations:
required: true
- id: requirements
- id: requirements
type: checkboxes
attributes:
label: Requirements
@ -22,7 +23,7 @@ body:
- label: The members are being sponsored by two current reviewers or a current maintainer.
required: true
- type: textarea
- type: textarea
id: rationale
attributes:
label: How do the new members meet the regular active contribution requirements?

View File

@ -1,33 +1,34 @@
---
name: Flaking Test
description: Report flaky tests
labels:
- type/flake
- type/flake
body:
- type: textarea
- type: textarea
id: workflows
attributes:
label: Which github workflows are flaking?
validations:
required: true
- type: textarea
- type: textarea
id: tests
attributes:
label: Which tests are flaking?
validations:
required: true
- type: input
- type: input
id: link
attributes:
label: Github Action link
- type: textarea
- type: textarea
id: reason
attributes:
label: Reason for failure (if possible)
- type: textarea
- type: textarea
id: additional
attributes:
label: Anything else we need to know?

View File

@ -1,3 +1,4 @@
---
version: 2
updates:
- package-ecosystem: github-actions

1
.github/stale.yml vendored
View File

@ -1,3 +1,4 @@
---
# Configuration for probot-stale - https://github.com/probot/stale
# Number of days of inactivity before an Issue or Pull Request becomes stale

View File

@ -1,3 +1,4 @@
---
name: Build
on: [push, pull_request]
permissions: read-all

View File

@ -1,3 +1,4 @@
---
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
@ -13,10 +14,10 @@ name: "CodeQL"
on:
push:
branches: [ main, release-3.4, release-3.5, release-3.6 ]
branches: [main, release-3.4, release-3.5, release-3.6]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
branches: [main]
schedule:
- cron: '20 14 * * 5'
@ -34,7 +35,7 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'go' ]
language: ['go']
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

View File

@ -1,3 +1,4 @@
---
name: Test contrib/mixin
on: [push, pull_request]
permissions: read-all

View File

@ -1,3 +1,4 @@
---
name: Coverage
on: [push]
permissions: read-all

View File

@ -1,3 +1,4 @@
---
name: E2E-arm64
on:
schedule:

View File

@ -1,3 +1,4 @@
---
name: E2E
on: [push, pull_request]
permissions: read-all

View File

@ -1,3 +1,4 @@
---
name: Fuzzing v3rpc
on: [push, pull_request]
permissions: read-all

View File

@ -1,3 +1,4 @@
---
name: Go version setup
permissions: read-all

View File

@ -1,3 +1,4 @@
---
name: Go Vulnerability Checker
on: [push, pull_request]
permissions: read-all

View File

@ -1,3 +1,4 @@
---
name: grpcProxy-tests
on: [push, pull_request]
permissions: read-all

View File

@ -1,3 +1,4 @@
---
name: Measure Test Flakiness
on:

View File

@ -1,3 +1,4 @@
---
name: Release
on: [push, pull_request]
permissions: read-all

View File

@ -1,3 +1,4 @@
---
name: Robustness Nightly
permissions: read-all
on:

View File

@ -1,3 +1,4 @@
---
name: Reusable Robustness Workflow
on:
workflow_call:
@ -69,4 +70,3 @@ jobs:
with:
name: ${{ inputs.artifactName }}
path: /tmp/results/*

View File

@ -1,3 +1,4 @@
---
name: Reusable Robustness Workflow
on:
workflow_call:

View File

@ -1,3 +1,4 @@
---
name: Robustness
on: [push, pull_request]
permissions: read-all

View File

@ -1,3 +1,4 @@
---
name: Scorecards supply-chain security
on:
# Only the default branch is supported.
@ -5,7 +6,7 @@ on:
schedule:
- cron: '45 1 * * 0'
push:
branches: [ "main" ]
branches: ["main"]
# Declare default permissions as read only.
permissions: read-all

View File

@ -1,3 +1,4 @@
---
name: Static Analysis
on: [push, pull_request]
permissions: read-all

View File

@ -1,3 +1,4 @@
---
name: Tests-arm64
on:
schedule:

View File

@ -1,3 +1,4 @@
---
name: Tests
on: [push, pull_request]
permissions: read-all

View File

@ -1,17 +1,14 @@
---
run:
timeout: 30m
skip-files:
- "^zz_generated.*"
skip-files: [^zz_generated.*]
issues:
max-same-issues: 0
# Excluding configuration per-path, per-linter, per-text and per-source
exclude-rules:
# exclude ineffassing linter for generated files for conversion
- path: conversion\.go
linters:
- ineffassign
linters: [ineffassign]
linters:
disable-all: true
enable: # please keep this alphabetized
@ -27,15 +24,14 @@ linters:
- stylecheck
- unused
- unconvert # Remove unnecessary type conversions
linters-settings: # please keep this alphabetized
goimports:
local-prefixes: go.etcd.io # Put imports beginning with prefix after 3rd-party packages.
staticcheck:
checks:
- "all"
- "-SA1019" # TODO(fix) Using a deprecated function, variable, constant or field
- "-SA2002" # TODO(fix) Called testing.T.FailNow or SkipNow in a goroutine, which isnt allowed
- all
- -SA1019 # TODO(fix) Using a deprecated function, variable, constant or field
- -SA2002 # TODO(fix) Called testing.T.FailNow or SkipNow in a goroutine, which isnt allowed
stylecheck:
checks:
- "ST1019" # Importing the same package multiple times.
- ST1019 # Importing the same package multiple times.

7
.yamllint Normal file
View File

@ -0,0 +1,7 @@
---
extends: default
rules:
line-length: disable
truthy: disable
comments: disable

View File

@ -64,7 +64,7 @@ fuzz:
verify: verify-gofmt verify-bom verify-lint verify-dep verify-shellcheck verify-goword \
verify-govet verify-license-header verify-receiver-name verify-mod-tidy verify-shellcheck \
verify-shellws verify-proto-annotations verify-genproto verify-goimport
verify-shellws verify-proto-annotations verify-genproto verify-goimport verify-yamllint
fix: fix-bom fix-lint
./scripts/fix.sh
@ -132,6 +132,10 @@ verify-genproto:
verify-goimport:
PASSES="goimport" ./scripts/test.sh
.PHONY: verify-yamllint
verify-yamllint:
yamllint .
# Cleanup
clean:

View File

@ -1,17 +1,16 @@
---
codecov:
token: "6040de41-c073-4d6f-bbf8-d89256ef31e1"
token: 6040de41-c073-4d6f-bbf8-d89256ef31e1
disable_default_path_fixes: true
fixes:
- "go.etcd.io/etcd/api/v3/::api/"
- "go.etcd.io/etcd/client/v3/::client/v3/"
- "go.etcd.io/etcd/client/v2/::client/v2/"
- "go.etcd.io/etcd/etcdctl/v3/::etcdctl/"
- "go.etcd.io/etcd/pkg/v3/::pkg/"
- "go.etcd.io/etcd/server/v3/::server/"
- go.etcd.io/etcd/api/v3/::api/
- go.etcd.io/etcd/client/v3/::client/v3/
- go.etcd.io/etcd/client/v2/::client/v2/
- go.etcd.io/etcd/etcdctl/v3/::etcdctl/
- go.etcd.io/etcd/pkg/v3/::pkg/
- go.etcd.io/etcd/server/v3/::server/
ignore:
- "**/*.pb.go"
- "**/*.pb.gw.go"
- "tests/**/*"
- "go.etcd.io/etcd/tests/**/*"
- '**/*.pb.go'
- '**/*.pb.gw.go'
- tests/**/*
- go.etcd.io/etcd/tests/**/*

View File

@ -1,17 +1,15 @@
rule_files:
- manifests/etcd-prometheusRules.yaml
---
rule_files: [manifests/etcd-prometheusRules.yaml]
evaluation_interval: 1m
tests:
- interval: 1m
input_series:
- series: 'up{job="etcd",instance="10.10.10.0"}'
values: '1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0'
- series: 'up{job="etcd",instance="10.10.10.1"}'
values: '1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0'
- series: 'up{job="etcd",instance="10.10.10.2"}'
values: '1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0'
- series: up{job="etcd",instance="10.10.10.0"}
values: 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0
- series: up{job="etcd",instance="10.10.10.1"}
values: 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
- series: up{job="etcd",instance="10.10.10.2"}
values: 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0
alert_rule_test:
- eval_time: 3m
alertname: etcdInsufficientMembers
@ -27,7 +25,7 @@ tests:
severity: critical
exp_annotations:
description: 'etcd cluster "etcd": members are down (3).'
summary: 'etcd cluster members are down.'
summary: etcd cluster members are down.
- eval_time: 7m
alertname: etcdInsufficientMembers
- eval_time: 11m
@ -38,7 +36,7 @@ tests:
severity: critical
exp_annotations:
description: 'etcd cluster "etcd": insufficient members (1).'
summary: 'etcd cluster has insufficient number of members.'
summary: etcd cluster has insufficient number of members.
- eval_time: 15m
alertname: etcdInsufficientMembers
exp_alerts:
@ -47,16 +45,15 @@ tests:
severity: critical
exp_annotations:
description: 'etcd cluster "etcd": insufficient members (0).'
summary: 'etcd cluster has insufficient number of members.'
summary: etcd cluster has insufficient number of members.
- interval: 1m
input_series:
- series: 'up{job="etcd",instance="10.10.10.0"}'
values: '1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0'
- series: 'up{job="etcd",instance="10.10.10.1"}'
values: '1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0'
- series: 'up{job="etcd",instance="10.10.10.2"}'
values: '1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'
- series: up{job="etcd",instance="10.10.10.0"}
values: 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
- series: up{job="etcd",instance="10.10.10.1"}
values: 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0
- series: up{job="etcd",instance="10.10.10.2"}
values: 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
alert_rule_test:
- eval_time: 14m
alertname: etcdMembersDown
@ -66,16 +63,15 @@ tests:
severity: critical
exp_annotations:
description: 'etcd cluster "etcd": members are down (3).'
summary: 'etcd cluster members are down.'
summary: etcd cluster members are down.
- interval: 1m
input_series:
- series: 'up{job="etcd",instance="10.10.10.0"}'
values: '1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0'
- series: 'up{job="etcd",instance="10.10.10.1"}'
values: '1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0'
- series: 'etcd_network_peer_sent_failures_total{To="member-1",job="etcd",endpoint="test"}'
values: '0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18'
- series: up{job="etcd",instance="10.10.10.0"}
values: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0
- series: up{job="etcd",instance="10.10.10.1"}
values: 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
- series: etcd_network_peer_sent_failures_total{To="member-1",job="etcd",endpoint="test"}
values: 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
alert_rule_test:
- eval_time: 13m
alertname: etcdMembersDown
@ -85,16 +81,15 @@ tests:
severity: critical
exp_annotations:
description: 'etcd cluster "etcd": members are down (1).'
summary: 'etcd cluster members are down.'
summary: etcd cluster members are down.
- interval: 1m
input_series:
- series: 'etcd_server_leader_changes_seen_total{job="etcd",instance="10.10.10.0"}'
values: '0 0 2 0 0 1 0 0 0 0 0 0 0 0 0 0'
- series: 'etcd_server_leader_changes_seen_total{job="etcd",instance="10.10.10.1"}'
values: '0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0'
- series: 'etcd_server_leader_changes_seen_total{job="etcd",instance="10.10.10.2"}'
values: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'
- series: etcd_server_leader_changes_seen_total{job="etcd",instance="10.10.10.0"}
values: 0 0 2 0 0 1 0 0 0 0 0 0 0 0 0 0
- series: etcd_server_leader_changes_seen_total{job="etcd",instance="10.10.10.1"}
values: 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
- series: etcd_server_leader_changes_seen_total{job="etcd",instance="10.10.10.2"}
values: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
alert_rule_test:
- eval_time: 10m
alertname: etcdHighNumberOfLeaderChanges
@ -103,62 +98,69 @@ tests:
job: etcd
severity: warning
exp_annotations:
description: 'etcd cluster "etcd": 4 leader changes within the last 15 minutes. Frequent elections may be a sign of insufficient resources, high network latency, or disruptions by other components and should be investigated.'
summary: 'etcd cluster has high number of leader changes.'
description: 'etcd cluster "etcd": 4 leader changes within the last
15 minutes. Frequent elections may be a sign of insufficient resources,
high network latency, or disruptions by other components and should
be investigated.'
summary: etcd cluster has high number of leader changes.
- interval: 1m
input_series:
- series: 'etcd_server_leader_changes_seen_total{job="etcd",instance="10.10.10.0"}'
values: '0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0'
- series: 'etcd_server_leader_changes_seen_total{job="etcd",instance="10.10.10.1"}'
values: '0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0'
- series: 'etcd_server_leader_changes_seen_total{job="etcd",instance="10.10.10.2"}'
values: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'
- series: etcd_server_leader_changes_seen_total{job="etcd",instance="10.10.10.0"}
values: 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0
- series: etcd_server_leader_changes_seen_total{job="etcd",instance="10.10.10.1"}
values: 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
- series: etcd_server_leader_changes_seen_total{job="etcd",instance="10.10.10.2"}
values: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
alert_rule_test:
- eval_time: 10m
alertname: etcdHighNumberOfLeaderChanges
exp_alerts:
- interval: 1m
input_series:
- series: 'etcd_mvcc_db_total_size_in_bytes{job="etcd",instance="10.10.10.0"}'
values: '0+8192x240'
- series: 'etcd_server_quota_backend_bytes{job="etcd",instance="10.10.10.0"}'
values: '524288+0x240'
- series: 'etcd_mvcc_db_total_size_in_bytes{job="etcd",instance="10.10.10.1"}'
values: '0+1024x240'
- series: 'etcd_server_quota_backend_bytes{job="etcd",instance="10.10.10.1"}'
values: '524288+0x240'
- series: etcd_mvcc_db_total_size_in_bytes{job="etcd",instance="10.10.10.0"}
values: 0+8192x240
- series: etcd_server_quota_backend_bytes{job="etcd",instance="10.10.10.0"}
values: 524288+0x240
- series: etcd_mvcc_db_total_size_in_bytes{job="etcd",instance="10.10.10.1"}
values: 0+1024x240
- series: etcd_server_quota_backend_bytes{job="etcd",instance="10.10.10.1"}
values: 524288+0x240
alert_rule_test:
- eval_time: 11m
alertname: etcdExcessiveDatabaseGrowth
exp_alerts:
- exp_labels:
instance: '10.10.10.0'
instance: 10.10.10.0
job: etcd
severity: warning
exp_annotations:
description: 'etcd cluster "etcd": Predicting running out of disk space in the next four hours, based on write observations within the past four hours on etcd instance 10.10.10.0, please check as it might be disruptive.'
summary: 'etcd cluster database growing very fast.'
description: 'etcd cluster "etcd": Predicting running out of disk space
in the next four hours, based on write observations within the past
four hours on etcd instance 10.10.10.0, please check as it might be
disruptive.'
summary: etcd cluster database growing very fast.
- interval: 1m
input_series:
- series: 'etcd_mvcc_db_total_size_in_use_in_bytes{job="etcd",instance="10.10.10.0"}'
values: '300000000+0x10'
- series: 'etcd_mvcc_db_total_size_in_bytes{job="etcd",instance="10.10.10.0"}'
values: '1000000000+0x10'
- series: 'etcd_mvcc_db_total_size_in_use_in_bytes{job="etcd",instance="10.10.10.1"}'
values: '700000000+0x10'
- series: 'etcd_mvcc_db_total_size_in_bytes{job="etcd",instance="10.10.10.1"}'
values: '1000000000+0x10'
- series: etcd_mvcc_db_total_size_in_use_in_bytes{job="etcd",instance="10.10.10.0"}
values: 300000000+0x10
- series: etcd_mvcc_db_total_size_in_bytes{job="etcd",instance="10.10.10.0"}
values: 1000000000+0x10
- series: etcd_mvcc_db_total_size_in_use_in_bytes{job="etcd",instance="10.10.10.1"}
values: 700000000+0x10
- series: etcd_mvcc_db_total_size_in_bytes{job="etcd",instance="10.10.10.1"}
values: 1000000000+0x10
alert_rule_test:
- eval_time: 11m
alertname: etcdDatabaseHighFragmentationRatio
exp_alerts:
- exp_labels:
instance: '10.10.10.0'
instance: 10.10.10.0
job: etcd
severity: warning
exp_annotations:
description: 'etcd cluster "etcd": database size in use on instance 10.10.10.0 is 30% of the actual allocated disk space, please run defragmentation (e.g. etcdctl defrag) to retrieve the unused fragmented disk space.'
description: 'etcd cluster "etcd": database size in use on instance
10.10.10.0 is 30% of the actual allocated disk space, please run defragmentation
(e.g. etcdctl defrag) to retrieve the unused fragmented disk space.'
runbook_url: https://etcd.io/docs/v3.5/op-guide/maintenance/#defragmentation
summary: 'etcd database size in use is less than 50% of the actual allocated storage.'
summary: etcd database size in use is less than 50% of the actual allocated
storage.

View File

@ -1,3 +1,4 @@
---
apiVersion: v1
kind: Service
metadata:
@ -10,9 +11,7 @@ spec:
targetPort: 2379
selector:
app: etcd
---
apiVersion: v1
kind: Pod
metadata:
@ -48,9 +47,7 @@ spec:
name: server
protocol: TCP
restartPolicy: Always
---
apiVersion: v1
kind: Service
metadata:
@ -69,9 +66,7 @@ spec:
targetPort: 2380
selector:
etcd_node: etcd0
---
apiVersion: v1
kind: Pod
metadata:
@ -107,9 +102,7 @@ spec:
name: server
protocol: TCP
restartPolicy: Always
---
apiVersion: v1
kind: Service
metadata:
@ -128,9 +121,7 @@ spec:
targetPort: 2380
selector:
etcd_node: etcd1
---
apiVersion: v1
kind: Pod
metadata:
@ -166,9 +157,7 @@ spec:
name: server
protocol: TCP
restartPolicy: Always
---
apiVersion: v1
kind: Service
metadata:

View File

@ -1,3 +1,4 @@
---
apiVersion: v1
kind: Pod
metadata: