Skip to content

Commit

Permalink
Merge tag 'refs/tags/v0.78.2' into release-2.12
Browse files Browse the repository at this point in the history
v0.78.2
  • Loading branch information
github-actions[bot] committed Nov 25, 2024
2 parents 233733b + 9efea40 commit 9b582ce
Show file tree
Hide file tree
Showing 553 changed files with 83,378 additions and 25,931 deletions.
6 changes: 3 additions & 3 deletions .github/env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
golang-version=1.22
kind-version=v0.23.0
kind-image=kindest/node:v1.30.0
golang-version=1.23
kind-version=v0.24.0
kind-image=kindest/node:v1.31.0
27 changes: 27 additions & 0 deletions .github/workflows/changed-files.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: changed-files

on:
workflow_call:
outputs:
non-markdown-files:
description: "changed files list"
value: ${{ jobs.changed-files.outputs.non-markdown-files }}

jobs:
changed-files:
# Map the job outputs to step outputs
outputs:
non-markdown-files : ${{ steps.changed-files.outputs.non-markdown-files}}
runs-on: ubuntu-latest
steps:
- name: checkout repo
id: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: get changed files
id: changed-files
run: |
echo non-markdown-files=$(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep -iv .md$ | xargs) >> $GITHUB_OUTPUT
- run: |
echo "${{ steps.changed-files.outputs.non-markdown-files}}"
45 changes: 42 additions & 3 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
- 'main'
tags:
- 'v*'
# To cancel running workflow when new commits pushed in a pull request
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
generate:
runs-on: ${{ matrix.os }}
Expand All @@ -26,6 +30,23 @@ jobs:
go-version: '${{ env.golang-version }}'
check-latest: true
- run: make --always-make format generate && git diff --exit-code
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

comment-generate-failure:
if: ${{ failure() }}
permissions:
pull-requests: write
needs: generate
name: Comment troubleshooting message for format and generate failure
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Comment PR
uses: thollander/actions-comment-pull-request@v3
with:
message: 'Auto-generated files are likely not up-to-date. Please make sure to run `make --always-make format generate`, commit the modifications and push the updated branch.'

check-docs:
runs-on: ubuntu-latest
Expand All @@ -39,6 +60,24 @@ jobs:
go-version: '${{ env.golang-version }}'
check-latest: true
- run: make check-docs
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

comment-docs-failure:
if: ${{ failure() }}
permissions:
pull-requests: write
needs: check-docs
name: Comment troubleshooting message for check-docs failure
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Comment PR
uses: thollander/actions-comment-pull-request@v3
with:
message: |
message: 'Formatting and local/remote links likely not correct. Please make sure to run `make check-docs`, commit the modifications and push the updated branch.'
check-golang:
runs-on: ubuntu-latest
Expand All @@ -54,9 +93,9 @@ jobs:
- name: go.mod
run: make tidy && git diff --exit-code
- name: golangci-lint
uses: golangci/golangci-lint-action@v6.0.1
uses: golangci/golangci-lint-action@v6.1.1
with:
version: v1.57.2
version: v1.61.0
args: --timeout 10m0s --go ${{ env.golang-version }}

check-metrics:
Expand Down Expand Up @@ -89,6 +128,7 @@ jobs:
go-version: '${{ env.golang-version }}'
check-latest: true
- run: make operator

po-rule-migration:
runs-on: ubuntu-latest
name: Build Prometheus Operator rule config map to rule file CRDs CLI tool
Expand All @@ -101,4 +141,3 @@ jobs:
go-version: '${{ env.golang-version }}'
check-latest: true
- run: cd cmd/po-rule-migration && go install

12 changes: 8 additions & 4 deletions .github/workflows/e2e-feature-gated.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
name: e2e-feature-gated
on:
pull_request:
paths-ignore:
- '**/*.md'
push:
branches:
- 'release-*'
- 'master'
- 'main'
tags:
- 'v*'
paths-ignore:
- '**/*.md'
# To cancel running workflow when new commits pushed in a pull request
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
changed-files:
uses: ./.github/workflows/changed-files.yaml
e2e-tests:
name: E2E tests for feature gates
needs: changed-files
if: ${{ needs.changed-files.outputs.non-markdown-files }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
109 changes: 109 additions & 0 deletions .github/workflows/e2e-prometheus3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
name: e2e-prometheus3

on:
schedule:
- cron: '30 14 * * *' # Every day 14:30

jobs:
e2e-tests:
name: E2E experimental version tests
runs-on: ubuntu-latest
strategy:
# since upgrade test was failing other tests were cancelled, setting this so that other test run
fail-fast: false
matrix:
suite: [alertmanager, prometheus, prometheusAllNS, thanosruler, operatorUpgrade]
include:
- suite: alertmanager
prometheus: "exclude"
prometheusAllNS: "exclude"
alertmanager: ""
thanosruler: "exclude"
operatorUpgrade: "exclude"
- suite: prometheus
prometheus: ""
prometheusAllNS: "exclude"
alertmanager: "exclude"
thanosruler: "exclude"
operatorUpgrade: "exclude"
- suite: prometheusAllNS
prometheus: "exclude"
prometheusAllNS: ""
alertmanager: "exclude"
thanosruler: "exclude"
operatorUpgrade: "exclude"
- suite: thanosruler
prometheus: "exclude"
prometheusAllNS: "exclude"
alertmanager: "exclude"
thanosruler: ""
operatorUpgrade: "exclude"
- suite: operatorUpgrade
prometheus: "exclude"
prometheusAllNS: "exclude"
alertmanager: "exclude"
thanosruler: "exclude"
operatorUpgrade: ""
steps:
- uses: actions/checkout@v4
- name: Import environment variables from file
run: cat ".github/env" >> $GITHUB_ENV
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '${{ env.golang-version }}'
check-latest: true
- name: Build images
run: |
export SHELL=/bin/bash
make build image
- name: Start kind cluster
uses: helm/[email protected]
with:
version: ${{ env.kind-version }}
node_image: ${{ env.kind-image }}
wait: 300s
config: ./test/e2e/kind-conf.yaml
cluster_name: e2e
- name: Wait for cluster to finish bootstraping
run: |
echo "Waiting for all nodes to be ready..."
kubectl wait --for=condition=Ready nodes --all --timeout=120s
kubectl get nodes
echo "Waiting for all pods to be ready..."
kubectl wait --for=condition=Ready pods --all --all-namespaces --timeout=300s
kubectl get pods -A
echo "Cluster information"
kubectl cluster-info
- name: Load images
run: |
kind load docker-image -n e2e quay.io/prometheus-operator/prometheus-operator:$(git rev-parse --short HEAD)
kind load docker-image -n e2e quay.io/prometheus-operator/prometheus-config-reloader:$(git rev-parse --short HEAD)
kind load docker-image -n e2e quay.io/prometheus-operator/admission-webhook:$(git rev-parse --short HEAD)
kubectl apply -f scripts/kind-rbac.yaml
- name: Run tests
run: >
TEST_EXPERIMENTAL_PROMETHEUS=true
EXCLUDE_ALERTMANAGER_TESTS=${{ matrix.alertmanager }}
EXCLUDE_PROMETHEUS_TESTS=${{ matrix.prometheus }}
EXCLUDE_PROMETHEUS_ALL_NS_TESTS=${{ matrix.prometheusAllNS }}
EXCLUDE_THANOSRULER_TESTS=${{ matrix.thanosruler }}
EXCLUDE_OPERATOR_UPGRADE_TESTS=${{ matrix.operatorUpgrade }}
EXCLUDE_FEATURE_GATED_TESTS=exclude
EXCLUDE_PROMETHEUS_UPGRADE_TESTS=exclude
make test-e2e
# Added to summarize the matrix and allow easy branch protection rules setup
e2e-tests-result:
name: End-to-End Test Results
if: always()
needs:
- e2e-tests
runs-on: ubuntu-latest
steps:
- name: Mark the job as a success
if: needs.e2e-tests.result == 'success'
run: exit 0
- name: Mark the job as a failure
if: needs.e2e-tests.result != 'success'
run: exit 1
13 changes: 10 additions & 3 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,18 @@ on:
- 'main'
tags:
- 'v*'
paths-ignore:
- '**/*.md'
# To cancel running workflow when new commits pushed in a pull request
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
changed-files:
uses: ./.github/workflows/changed-files.yaml
e2e-tests:
name: E2E tests
runs-on: ubuntu-latest
needs: changed-files
if: ${{ needs.changed-files.outputs.non-markdown-files }}
strategy:
matrix:
suite: [alertmanager, prometheus, prometheusAllNS, thanosruler, operatorUpgrade]
Expand Down Expand Up @@ -101,8 +107,9 @@ jobs:
# Added to summarize the matrix and allow easy branch protection rules setup
e2e-tests-result:
name: End-to-End Test Results
if: always()
if: ${{ needs.changed-files.outputs.non-markdown-files }}
needs:
- changed-files
- e2e-tests
runs-on: ubuntu-latest
steps:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ jobs:
uses: actions/checkout@v4
- name: Import environment variables from file
run: cat ".github/env" >> $GITHUB_ENV
- name: Reclaim disk space
run: |
docker image prune --force --all
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
- name: Install Go
uses: actions/setup-go@v5
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-prom-version-upgrade.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:
kubectl apply -f scripts/kind-rbac.yaml
- name: Run tests
run: >
TEST_EXPERIMENTAL_PROMETHEUS=false
EXCLUDE_ALL_NS_TESTS=exclude
EXCLUDE_ALERTMANAGER_TESTS=exclude
EXCLUDE_PROMETHEUS_TESTS=exclude
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/unit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,18 @@ on:
- 'main'
tags:
- 'v*'
paths-ignore:
- '**/*.md'
# To cancel running workflow when new commits pushed in a pull request
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
changed-files:
uses: ./.github/workflows/changed-files.yaml
unit-tests:
runs-on: ubuntu-latest
name: Unit tests
runs-on: ubuntu-latest
needs: changed-files
if: ${{ needs.changed-files.outputs.non-markdown-files }}
steps:
- uses: actions/checkout@v4
- name: Import environment variables from file
Expand All @@ -28,6 +34,8 @@ jobs:
extended-tests:
runs-on: ubuntu-latest
name: Extended tests
needs: changed-files
if: ${{ needs.changed-files.outputs.non-markdown-files }}
steps:
- uses: actions/checkout@v4
- name: Import environment variables from file
Expand Down
8 changes: 8 additions & 0 deletions .mdox.validate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ timeout: "1m"
explicitLocalValidators: true

validators:
# Skip localhost examples.
- regex: 'localhost'
type: "ignore"
# docs.github.com returns 403 if not in browser. Cannot curl as well.
- regex: 'docs\.github\.com'
type: "ignore"
Expand Down Expand Up @@ -31,3 +34,8 @@ validators:
# Ignore anchor links pointing to the API documentation which are HTML <a> tags and not supported by mdox.
- regex: 'api\.md#monitoring\.coreos\.com/v1\.(BasicAuth|PrometheusSpec|StorageSpec)$'
type: ignore
# Use the githubPullsIssues validator to avoid rate-limiting.
- regex: '(^http[s]?:\/\/)(www\.)?(github\.com\/)prometheus-operator\/prometheus-operator(\/pull\/|\/issues\/)'
type: githubPullsIssues
# The GitHub actions running mdox configure the GITHUB_TOKEN environment variable.
token: '$(GITHUB_TOKEN)'
Loading

0 comments on commit 9b582ce

Please sign in to comment.