Skip to content

Automated backport of #2933: Fix concurrent map write crash in logIfChanged #8105

Automated backport of #2933: Fix concurrent map write crash in logIfChanged

Automated backport of #2933: Fix concurrent map write crash in logIfChanged #8105

Workflow file for this run

---
name: Prometheus Tests
on:
pull_request:
types: [labeled, opened, synchronize, reopened]
permissions: {}
jobs:
check:
name: Metrics Exported
timeout-minutes: 20
runs-on: ubuntu-latest
if: |
( github.event.action == 'labeled' && github.event.label.name == 'check-prometheus' )
|| ( github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'check-prometheus') )
steps:
- name: Check out the repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Reclaim free space
run: |
sudo swapoff -a
sudo rm -f /swapfile
df -h
free -h
- name: Deploy clusters+Submariner using the latest image, with Prometheus
run: make deploy using=prometheus
- name: Expose the first cluster's Prometheus
run: >-
KUBECONFIG=$(find $(git rev-parse --show-toplevel)/output/kubeconfigs/ -type f -printf %p:)
kubectl --context=cluster1 port-forward service/prometheus-operated 9090 &
- name: Make sure the submariner_gateways metric is exported
run: >-
for i in {1..10};
do sleep 5; if test "$(curl -s --data-urlencode query=submariner_gateways http://localhost:9090/api/v1/query |
jq -r '.data.result[0].metric.__name__')" = "submariner_gateways";
then exit 0;
fi;
done;
curl -s --data-urlencode query=submariner_gateways http://localhost:9090/api/v1/query | jq .;
exit 1