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

devenv: Add docker load test which authenticates with API key #28905

Merged
merged 2 commits into from Nov 24, 2020

Conversation

dafydd-t
Copy link
Contributor

@dafydd-t dafydd-t commented Nov 6, 2020

What this PR does / why we need it:

This provides for a use case where we wanted to authenticate with a Grafana instance with an API Key.

Also:

  • Edit load tests to assign the orgId in the default function, as the setup function is only called once for all VUs and therefore the change is not persisted to each VU.
  • Remove side effect from orgId setup function and explicitly set orgId in setup client

Which issue(s) this PR fixes:

There's no issue for this PR.

Special notes for your reviewer:

Functionality of all existing test cases is unchanged. Verify the new test by generating an Admin-level API key in your grafana instance and providing it as a value for the -k flag.

- Edit load tests to assign the orgId in the default function, as the setup function is only called once for all VUs and therefore the change is not persisted to each VU.
- Remove side effect from orgId setup function and explicitly set orgId in setup client
@CLAassistant
Copy link

CLAassistant commented Nov 6, 2020

CLA assistant check
All committers have signed the CLA.

@dafydd-t dafydd-t marked this pull request as ready for review November 6, 2020 18:05
@aknuds1 aknuds1 requested review from a team, wbrowne and papagian and removed request for a team November 6, 2020 18:51
Copy link
Member

@wbrowne wbrowne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@papagian papagian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM I've tested running auth_key_test without key, with invalid (deleted) key, viewer key and admin key and it works as expected.

@stale
Copy link

stale bot commented Nov 24, 2020

This pull request has been automatically marked as stale because it has not had activity in the last 2 weeks. It will be closed in 30 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@stale stale bot added the stale Issue with no recent activity label Nov 24, 2020
@papagian papagian removed the stale Issue with no recent activity label Nov 24, 2020
@papagian papagian added this to the 7.4.0 milestone Nov 24, 2020
@papagian papagian merged commit d29f73b into master Nov 24, 2020
@papagian papagian deleted the use-api-key-loadtest branch November 24, 2020 07:34
xlson added a commit to AgnesToulet/grafana that referenced this pull request Nov 24, 2020
* master: (71 commits)
  Security: Fixes minor security issue with alert notification webhooks that allowed GET & DELETE requests grafana#29330
  Chore: Bump storybook to v6 (grafana#28926)
  ReleaseNotes: Updates release notes link in package.json (master) (grafana#29329)
  Docs: Accurately reflecting available variables (grafana#29302)
  Heatmap: Fixes issue introduced by new eventbus (grafana#29322)
  Dashboard Schemas (grafana#28793)
  devenv: Add docker load test which authenticates with API key (grafana#28905)
  Login: Fixes redirect url encoding issues of # %23 being unencoded after login (grafana#29299)
  InfluxDB: update flux library and support boolean label values (grafana#29310)
  Explore/Logs: Update Parsed fields to Detected fields (grafana#28881)
  GraphNG: Init refactorings and fixes (grafana#29275)
  fixing a broken relref link (grafana#29312)
  Drone: Upgrade build pipeline tool (grafana#29308)
  decreasing frontend docs threshold. (grafana#29304)
  Docker: update docker root group docs and docker image (grafana#29222)
  WebhookNotifier: Convert tests away from goconvey (grafana#29291)
  Annotations: fixing so when changing annotations query links submenu will be updated. (grafana#28990)
  [graph-ng] add temporal DataFrame alignment/outerJoin & move null-asZero pass inside (grafana#29250)
  Dashboard: Fixes kiosk state after being redirected to login page and back (grafana#29273)
  make it possible to hide change password link in profile menu (grafana#29246)
  ...
@mjseaman mjseaman added this to the 7.4.0 milestone Jan 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants