Fixes Failing smoke test artifacts snapshot: Visualize Visualize Reporting Screenshots PNG reports: sample data created in 7.6 TSVB Gauge: PNG file matches the baseline image#226067
Merged
ymao1 merged 8 commits intoelastic:mainfrom Jul 8, 2025
Conversation
23fc205 to
df50546
Compare
df50546 to
d4b4ae0
Compare
Contributor
|
Pinging @elastic/response-ops (Team:ResponseOps) |
markov00
reviewed
Jul 3, 2025
markov00
approved these changes
Jul 7, 2025
Contributor
markov00
left a comment
There was a problem hiding this comment.
Thanks for the changes, LGTM!
Contributor
Author
|
@elasticmachine merge upstream |
Contributor
💚 Build Succeeded
Metrics [docs]
History
cc @ymao1 |
kertal
pushed a commit
to kertal/kibana
that referenced
this pull request
Jul 25, 2025
…rting Screenshots PNG reports: sample data created in 7.6 TSVB Gauge: PNG file matches the baseline image (elastic#226067) Fixes elastic#189590 ## Summary Test was failing with `TypeError: Invalid URL`, only on the smoke tests that are run on [this pipeline](https://buildkite.com/elastic/kibana-artifacts-snapshot), not locally. The smoke tests run against real cloud deployments, so there is a difference in URLs between real deployments and local test runs. The issue occurs here: https://github.com/elastic/kibana/blob/dc09cb5d8abe1d6a52977d0a7d8c69778c1eabd0/x-pack/platform/test/functional/page_objects/reporting_page.ts#L97-L102 For the smoke test, the `fullUrl` looks like `https://kibana-pr-226067.kb.us-west2.gcp.elastic-cloud.com/internal/reporting/jobs/download/8446e53e-bafe-400d-8f28-4f923bfeadd8?elasticInternalOrigin=true` but the `baseUrl` looks like `https://kibana-pr-226067.kb.us-west2.gcp.elastic-cloud.com:443` because it's generated with the port. This causes the `urlWithoutBase` replacement to fail because the `fullUrl` does not include the port number. For local testing, everything works fine because the `fullUrl` is `http://localhost:5620/internal/reporting/jobs/download/1d9b0e64-b706-4916-855d-a5bbec9a5f02?elasticInternalOrigin=true` and the `baseUrl` is `http://localhost:5620` so the `urlWithoutBase` correctly ends up being `/internal/reporting/jobs/download/1d9b0e64-b706-4916-855d-a5bbec9a5f02?elasticInternalOrigin=true` This fix catches any errors from the original request and retries them without the port in the `baseUrl`. ## To Verify 1. Check out this PR branch 2. Get the credentials for the cloud deployment. 3. The smoke test is run using this script: `.buildkite/scripts/steps/artifacts/cloud.sh`. To recreate it, set your environment variables in your terminal with the cloud deployment info: ``` export TEST_KIBANA_PROTOCOL=https export TEST_KIBANA_HOSTNAME=kibana-pr-226067.kb.us-west2.gcp.elastic-cloud.com export TEST_KIBANA_PORT=443 export TEST_KIBANA_USERNAME=elastic export TEST_KIBANA_PASSWORD=<password> export TEST_ES_PROTOCOL=https export TEST_ES_HOSTNAME=kibana-pr-226067.es.us-west2.gcp.elastic-cloud.com export TEST_ES_PORT=443 export TEST_ES_USERNAME=elastic export TEST_ES_PASSWORD=<password> export TEST_BROWSER_HEADLESS=1 export NODE_TLS_REJECT_UNAUTHORIZED=0 ``` Then run `node --no-warnings scripts/functional_test_runner.js --config x-pack/test/functional/apps/visualize/config.ts --include-tag=smoke --grep "TSVB Gauge: PNG file matches the baseline image"` The test should pass. --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #189590
Summary
Test was failing with
TypeError: Invalid URL, only on the smoke tests that are run on this pipeline, not locally.The smoke tests run against real cloud deployments, so there is a difference in URLs between real deployments and local test runs. The issue occurs here:
kibana/x-pack/platform/test/functional/page_objects/reporting_page.ts
Lines 97 to 102 in dc09cb5
For the smoke test, the
fullUrllooks likehttps://kibana-pr-226067.kb.us-west2.gcp.elastic-cloud.com/internal/reporting/jobs/download/8446e53e-bafe-400d-8f28-4f923bfeadd8?elasticInternalOrigin=truebut thebaseUrllooks likehttps://kibana-pr-226067.kb.us-west2.gcp.elastic-cloud.com:443because it's generated with the port. This causes theurlWithoutBasereplacement to fail because thefullUrldoes not include the port number.For local testing, everything works fine because the
fullUrlishttp://localhost:5620/internal/reporting/jobs/download/1d9b0e64-b706-4916-855d-a5bbec9a5f02?elasticInternalOrigin=trueand thebaseUrlishttp://localhost:5620so theurlWithoutBasecorrectly ends up being/internal/reporting/jobs/download/1d9b0e64-b706-4916-855d-a5bbec9a5f02?elasticInternalOrigin=trueThis fix catches any errors from the original request and retries them without the port in the
baseUrl.To Verify
.buildkite/scripts/steps/artifacts/cloud.sh. To recreate it, set your environment variables in your terminal with the cloud deployment info:Then run
node --no-warnings scripts/functional_test_runner.js --config x-pack/test/functional/apps/visualize/config.ts --include-tag=smoke --grep "TSVB Gauge: PNG file matches the baseline image"The test should pass.