@@ -59,12 +59,16 @@ runs:
59
59
GRAFANA_URL : https://grafana-poc.avax-dev.network/d/kBQpRdWnk/avalanche-main-dashboard?orgId=1&refresh=10s&var-filter=is_ephemeral_node%7C%3D%7Cfalse&var-filter=gh_repo%7C%3D%7C${{ inputs.repository_owner }}%2F${{ inputs.repository_name }}&var-filter=gh_run_id%7C%3D%7C${{ inputs.run_id }}&var-filter=gh_run_attempt%7C%3D%7C${{ inputs.run_attempt }}
60
60
GH_JOB_ID : ${{ inputs.job }}
61
61
FILTER_BY_OWNER : ${{ inputs.filter_by_owner }}
62
+ - name : Warn that collection of metrics and logs will not be performed
63
+ if : (inputs.prometheus_username == '')
64
+ shell : bash
65
+ run : echo "::warning::Monitoring credentials not found. Skipping collector start. Is the PR from a fork branch?"
62
66
- name : Run command
63
67
shell : bash
64
68
# --impure ensures the env vars are accessible to the command
65
69
run : ${{ inputs.run_env }} nix develop --impure --command bash -x ${{ inputs.run }}
66
70
env :
67
- TMPNET_START_COLLECTORS : true
71
+ TMPNET_START_COLLECTORS : ${{ inputs.prometheus_username != '' }}
68
72
LOKI_USERNAME : ${{ inputs.loki_username }}
69
73
LOKI_PASSWORD : ${{ inputs.loki_password }}
70
74
PROMETHEUS_USERNAME : ${{ inputs.prometheus_username }}
91
95
if-no-files-found : error
92
96
# TODO(marun) Maybe optionally run these checks in an AfterSuite step?
93
97
- name : Check that logs were collected
94
- if : always( )
98
+ if : (inputs.prometheus_username != '' )
95
99
shell : bash
96
100
run : go run github.com/ava-labs/avalanchego/tests/fixture/tmpnet/cmd check-logs
97
101
env :
@@ -104,7 +108,7 @@ runs:
104
108
GH_RUN_ATTEMPT : ${{ inputs.run_attempt }}
105
109
GH_JOB_ID : ${{ inputs.job }}
106
110
- name : Check that metrics were collected
107
- if : always( )
111
+ if : (inputs.prometheus_username != '' )
108
112
shell : bash
109
113
run : go run github.com/ava-labs/avalanchego/tests/fixture/tmpnet/cmd check-metrics
110
114
env :
0 commit comments