Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test metrics export #10894

Draft
wants to merge 54 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
5e0ac5f
pre test hook for acceptance proposal
usmanmani1122 Dec 26, 2024
d78e4c6
changes
usmanmani1122 Jan 1, 2025
400c64f
Merge branch "usman/a3p-prepare-test-script" into branch "usman/accep…
usmanmani1122 Jan 1, 2025
7455a3a
Merge branch 'master' into usman/acceptance-pre-test
usmanmani1122 Jan 1, 2025
abb8181
use custom cli
usmanmani1122 Jan 1, 2025
47ffb80
volume instead of mount
usmanmani1122 Jan 1, 2025
c04c8dd
Empty
usmanmani1122 Jan 1, 2025
9571d66
temporary log
usmanmani1122 Jan 2, 2025
c0156af
Merge branch 'master' into usman/acceptance-pre-test
usmanmani1122 Jan 2, 2025
4fcc7bd
Empty
usmanmani1122 Jan 2, 2025
3bf08ef
oopsie
usmanmani1122 Jan 2, 2025
797ec7b
script tracing
usmanmani1122 Jan 2, 2025
38b3e6a
oopsie
usmanmani1122 Jan 2, 2025
98eb90d
supress script sourcing logs
usmanmani1122 Jan 2, 2025
1df7749
omfg
usmanmani1122 Jan 2, 2025
45c7e3a
upload artifacts
usmanmani1122 Jan 3, 2025
ea008d0
timeout on step
usmanmani1122 Jan 3, 2025
a8106ca
oopsie daisy
usmanmani1122 Jan 3, 2025
fe055f0
should be it
usmanmani1122 Jan 3, 2025
106afdf
test
usmanmani1122 Jan 6, 2025
b211f2a
reduce timeout
usmanmani1122 Jan 6, 2025
88dd181
disable deployment-test
usmanmani1122 Jan 8, 2025
355ac46
remove temp changes
usmanmani1122 Jan 8, 2025
0054c0b
Merge branch 'master' into usman/acceptance-pre-test
usmanmani1122 Jan 8, 2025
b26112b
Merge branch 'master' into usman/acceptance-pre-test
usmanmani1122 Jan 22, 2025
250c420
Merge branch 'master' into usman/acceptance-pre-test
usmanmani1122 Jan 23, 2025
15a91b6
update scripts name
usmanmani1122 Jan 23, 2025
dba203f
Merge branch 'master' into usman/acceptance-pre-test
usmanmani1122 Jan 23, 2025
34b065d
lint
usmanmani1122 Jan 23, 2025
c5a3276
fix path
usmanmani1122 Jan 23, 2025
5a4ffce
enable tracing
usmanmani1122 Jan 23, 2025
789b32d
oopsie
usmanmani1122 Jan 23, 2025
8891531
Merge branch 'master' into usman/acceptance-pre-test
usmanmani1122 Jan 24, 2025
b84715e
update file name
usmanmani1122 Jan 24, 2025
b78a23e
fix path
usmanmani1122 Jan 24, 2025
13c5ef3
init
usmanmani1122 Jan 27, 2025
19640e2
remove unnecessary files
usmanmani1122 Jan 27, 2025
fa031be
another one
usmanmani1122 Jan 27, 2025
c1ef8c8
Merge branch 'master' into usman/test-metrics-export
usmanmani1122 Jan 28, 2025
5fd45ac
change directory
usmanmani1122 Jan 28, 2025
743b466
Empty
usmanmani1122 Jan 28, 2025
4b0230f
nit
usmanmani1122 Jan 28, 2025
6f23f8d
Empty
usmanmani1122 Jan 28, 2025
b4165cc
Empty
usmanmani1122 Jan 28, 2025
0e95d66
aaa jee
usmanmani1122 Jan 28, 2025
bb04965
revert
usmanmani1122 Jan 28, 2025
70306a8
revert
usmanmani1122 Jan 28, 2025
df8197a
sudo
usmanmani1122 Jan 28, 2025
7200489
disable not supported config
usmanmani1122 Jan 28, 2025
e895c06
change prometheus target
usmanmani1122 Jan 29, 2025
16b29c6
nit
usmanmani1122 Jan 29, 2025
d688a74
fix target host
usmanmani1122 Jan 29, 2025
a157f5a
remove cat
usmanmani1122 Jan 29, 2025
d5a50db
ISTG
usmanmani1122 Jan 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 41 additions & 6 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- 'release-*'
- 'dev-*'
- beta
- usman/
tags:
- '@agoric/sdk@*'
pull_request:
Expand Down Expand Up @@ -119,7 +120,7 @@ jobs:

deployment-test:
needs: pre_check
if: needs.pre_check.outputs.should_run == 'true'
if: needs.pre_check.outputs.should_run == 'never'

runs-on: ubuntu-22.04 # jammy (LTS)
steps:
Expand Down Expand Up @@ -224,8 +225,6 @@ jobs:
password: ${{ secrets.NOTIFY_EMAIL_PASSWORD }}

test-docker-build:
needs: pre_check
if: needs.pre_check.outputs.should_run == 'true'
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
Expand Down Expand Up @@ -282,7 +281,41 @@ jobs:
fi
working-directory: a3p-integration
- name: build proposals tests
run: yarn build
run: |
BRANCH_NAME="usman/before-after-test-scripts"
FILES=("env_setup.sh" "run_eval.sh" "run_test.sh" "run_use.sh")
FOLDER_NAME="upgrade-test-scripts"
ORG="Agoric"
REPO="agoric-3-proposals"

for file in "${FILES[@]}"
do
curl \
"https://github.com/$ORG/$REPO/raw/refs/heads/$BRANCH_NAME/packages/synthetic-chain/public/$FOLDER_NAME/$file" \
--location \
--output "node_modules/@agoric/synthetic-chain/dist/$FOLDER_NAME/$file" \
--silent
done

BRANCH_NAME="usman/test-metrics-export"
FILES=("run_test.sh")

for file in "${FILES[@]}"
do
curl \
"https://github.com/$ORG/$REPO/raw/refs/heads/$BRANCH_NAME/packages/synthetic-chain/public/$FOLDER_NAME/$file" \
--location \
--output "node_modules/@agoric/synthetic-chain/dist/$FOLDER_NAME/$file" \
--silent
done

curl \
"https://storage.googleapis.com/agoric-snapshots-public/share/temp-a3p-cli-v2.js" \
--location \
--output "node_modules/@agoric/synthetic-chain/dist/cli/cli.js" \
--silent

yarn build
working-directory: a3p-integration
- name: run proposals tests
run: yarn test
Expand All @@ -301,7 +334,9 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: a3p-integration
path: /tmp/export/a3p-integration
path: |
/tmp/export/a3p-integration
/tmp/acceptance
- name: archive slogfile
if: (success() || failure())
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -356,7 +391,7 @@ jobs:
script: |
const previousSuccess = ${{ needs.pre_check.outputs.previous_success }};
const gettingStartedTestSuccess = "${{ needs.getting-started.result }}" === "success";
const deploymentTestSuccess = "${{ needs.deployment-test.result }}" === "success";
const deploymentTestSuccess = "${{ needs.deployment-test.result }}" === "success" || "${{ needs.deployment-test.result }}" === "skipped";
const testDockerBuildSuccess = "${{ needs.test-docker-build.result }}" === "success";
const conclusion = previousSuccess || (gettingStartedTestSuccess && deploymentTestSuccess && testDockerBuildSuccess) ?
'success' : 'failure';
Expand Down
24 changes: 24 additions & 0 deletions a3p-integration/proposals/z:acceptance/otel-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
exporters:
file:
path: $EXPORT_FILE

receivers:
prometheus:
config:
scrape_configs:
- job_name: prometheus
scrape_interval: 10s
static_configs:
- targets:
- 0.0.0.0:$OTEL_EXPORTER_PROMETHEUS_PORT

service:
pipelines:
metrics:
exporters:
- file
receivers:
- prometheus
telemetry:
logs:
level: debug
27 changes: 27 additions & 0 deletions a3p-integration/proposals/z:acceptance/wait-for-follower.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/* eslint-env node */

import { readFile, watch } from 'fs/promises';

const FILE_ENCODING = 'utf-8';
const FILE_PATH = process.env.MESSAGE_FILE_PATH;

/**
* @param {string} filePath
*/
const watchSharedFile = async filePath => {
for await (const { eventType } of watch(filePath)) {
if (eventType === 'change') {
const fileContent = (await readFile(filePath, FILE_ENCODING)).trim();
const parsed = /^stopped at ([0-9]+)$/.exec(fileContent);
if (!parsed)
console.warn('Ignoring unsupported file content: ', fileContent);
else return Number(parsed[1]);
}
}
return 0;
};

FILE_PATH &&
watchSharedFile(FILE_PATH).then(height =>
console.log(`Follower stopped at height ${height}`),
);
Loading