Skip to content

Conversation

yduartep
Copy link
Contributor

create new shared action to run e2e tests against pre-selected stack. You define in which region the selected stack belong, the plugin from where are executed the tests and optionally which other plugins and datasources you want to provision in that stack when starting a Grafana instance. You need to have the playwright configuration and the test specifications in the plugin that run the tests.

@yduartep yduartep requested a review from a team as a code owner September 19, 2025 07:34
Copy link
Contributor

@dsotirakis dsotirakis left a comment

Choose a reason for hiding this comment

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

@yduartep 👋
Haven't properly reviewed the PR but I wonder if this is an action that could fit better in https://github.com/grafana/plugin-ci-workflows?

@yduartep
Copy link
Contributor Author

@yduartep 👋 Haven't properly reviewed the PR but I wonder if this is an action that could fit better in https://github.com/grafana/plugin-ci-workflows?

Good point. I can move it there if you think is a better choice. Take a look and let me know. I have not a problem to move it.

@yduartep yduartep requested a review from dsotirakis September 19, 2025 07:40
@dsotirakis
Copy link
Contributor

@tolzhabayev wdyt? Worth moving to that repository?

Copy link

@jarben jarben left a comment

Choose a reason for hiding this comment

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

wow this is cool @yduartep !

@dsotirakis
Copy link
Contributor

@tolzhabayev wdyt? Worth moving to that repository?

@tolzhabayev 👋 just a small reminder in case you've missed it!

@yduartep
Copy link
Contributor Author

@tolzhabayev wdyt? Worth moving to that repository?

@tolzhabayev 👋 just a small reminder in case you've missed it!

Answered here. Waiting for suggestion about the right place from giuseppe.

return obj;
}

function getBaseUrlByEnv(env) {

Choose a reason for hiding this comment

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

For shared workflow (for security reasons), I think we should limit it to dev/ops only and make the function more universal (add templating to URLs to inject regions)

Copy link
Contributor Author

@yduartep yduartep Sep 25, 2025

Choose a reason for hiding this comment

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

Hi @kozhuhds I am agree with you about removing prod from here.

Regarding the region, exactly what you mean? Get the base url with something like https://hg-api-${answers.ENV}-0.grafana${dev ? '-dev' : ops? '-ops': ''}.net?

I was trying to fetch the list of possible regions dynamically but I couldn't found the way. I tried to call the /{stackSlug}/instances api receiving by parameter also env=dev|ops and get directly the regionSlug to use on the baseUrl but I think I will need another token and I don't want to add more input params.

Copy link

@kozhuhds kozhuhds Sep 25, 2025

Choose a reason for hiding this comment

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

api-${answers.ENV}-0.grafana${dev ? '-dev' : ops? '-ops': ''}.net

yes smth like this (moreover, you can identify if it's ops or dev from env)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @kozhuhds I pushed some changes. Can you take a look again?

uses: grafana/shared-workflows/actions/get-vault-secrets@5d7e361bc7e0a183cde8afe9899fb7b596d2659b # v1.2.0
with:
common_secrets: |
HG_TOKEN=hg-ci:token

Choose a reason for hiding this comment

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

which HG_TOKEN is added to Vault?

Copy link
Contributor Author

@yduartep yduartep Sep 25, 2025

Choose a reason for hiding this comment

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

a token I generated in the past using the same steps you described in asserts and is working. You can see a successful execution here.

Choose a reason for hiding this comment

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

my doubt here is that this is a shared workflow that depends on a personal token; technically, I don't really see a problem here, but I just wonder if we can end up with smth more general (not a blocker)

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.

4 participants