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

Add width and height params #49

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ inputs:
grafana_dashboard:
description: 'Grafana service dashboard'
required: true
grafana_dashboard_width:
description: 'Grafana service screenshot dashboard width'
required: false
grafana_dashboard_height:
description: 'Grafana service screenshot dashboard height'
required: false
ydb_version:
description: 'YDB version to run SLO over: use docker tag or `newest`'
required: true
Expand Down
2 changes: 1 addition & 1 deletion dist/main/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/errorScheduler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ async function createError(
// run command
callKubernetesAsync(kubeCommand),
// annotate
annotate(name),
annotate(name, core.getInput('grafana_dashboard') || '7CzMl5t4k'),
// wait till next
new Promise(resolve => {
setTimeout(resolve, timeBetweenS * 1000)
Expand Down
8 changes: 6 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ async function main(): Promise<void> {
timeBetweenPhases,
shutdownTime,
grafanaDomain,
grafanaDashboard
grafanaDashboard,
grafanaDashboardWidth,
grafanaDashboardHeight
} = parseArguments()

core.debug(`Setting up OctoKit`)
Expand Down Expand Up @@ -217,7 +219,9 @@ async function main(): Promise<void> {
workloads[i].id,
timings.startTime,
timings.endTime,
grafanaDashboard
grafanaDashboard,
grafanaDashboardWidth,
grafanaDashboardHeight
)
const comment = `
:volcano: Here are results of SLO test for **${
Expand Down
10 changes: 9 additions & 1 deletion src/parseArguments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ export function parseArguments() {
const s3Folder = core.getInput('s3_images_folder')
const grafanaDomain = core.getInput('grafana_domain')
const grafanaDashboard = core.getInput('grafana_dashboard') || '7CzMl5t4k'
const grafanaDashboardWidth = Number(
core.getInput('grafana_dashboard_width') || '1500'
)
const grafanaDashboardHeight = Number(
core.getInput('grafana_dashboard_height') || '1700'
)

let ydbVersion = core.getInput('ydb_version')

Expand Down Expand Up @@ -79,7 +85,9 @@ export function parseArguments() {
timeBetweenPhases,
shutdownTime,
grafanaDomain,
grafanaDashboard
grafanaDashboard,
grafanaDashboardWidth,
grafanaDashboardHeight
}
})
}
Expand Down