Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.13] [Synthetics] Allow Synthetics global params to include dashes (#…
…178054) (#178268) # Backport This will backport the following commits from `main` to `8.13`: - [[Synthetics] Allow Synthetics global params to include dashes (#178054)](#178054) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Justin Kambic","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-03-07T23:11:59Z","message":"[Synthetics] Allow Synthetics global params to include dashes (#178054)\n\n## Summary\r\n\r\nResolves #178053.\r\n\r\nIncludes `-` in the regex to filter param names.\r\n\r\n## Testing\r\n\r\n### Repro instructions\r\n\r\nTesting this is straightforward. You can verify the issue in `main` or\r\non a cloud instance. If you spin up an ESS that is the most\r\nstraightforward way.\r\n\r\n1. In Synthetics UI, go to Settings > Global Parameters.\r\n<img width=\"831\" alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/18429259/f6dc78f6-6e0c-4b84-a114-9e88266327e9\">\r\n\r\n2. Create a param with some dashes in the key, i.e. `TEST-PARAMS`.\r\n\r\n3. After saving, create an HTTP monitor. In the create form, you can\r\nscroll down and expand `Advanced options`. Include a check for `Request\r\nheaders`, specify a header name and for the value, reference your global\r\nparam using [Beats env\r\nsyntax](https://www.elastic.co/guide/en/beats/libbeat/current/config-file-format-env-vars.html#_examples).\r\n<img width=\"831\" alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/18429259/bcf3c495-1db8-499c-a394-781564744679\">\r\n\r\nYou can either use Test Now or wait for it to fail, and you'll see\r\nissues get logged similar to what is documented in the attached issue.\r\n\r\n### Testing the fix\r\n\r\nI will create an ESS deployment from this PR that will allow you to\r\nfollow the same steps above. You should be able to see your monitor\r\neither succeed (if the response headers you check for are actually\r\nthere), or fail for legitimate reasons. But you should not see the error\r\ndocumented in the attached issue, with a message like `io:job could not\r\nbe initialized...`.","sha":"d69045bd4d1b013cf92daf4992c836ea623a4968","branchLabelMapping":{"^v8.14.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","Team:obs-ux-infra_services","v8.13.0","v8.14.0"],"title":"[Synthetics] Allow Synthetics global params to include dashes","number":178054,"url":"https://github.com/elastic/kibana/pull/178054","mergeCommit":{"message":"[Synthetics] Allow Synthetics global params to include dashes (#178054)\n\n## Summary\r\n\r\nResolves #178053.\r\n\r\nIncludes `-` in the regex to filter param names.\r\n\r\n## Testing\r\n\r\n### Repro instructions\r\n\r\nTesting this is straightforward. You can verify the issue in `main` or\r\non a cloud instance. If you spin up an ESS that is the most\r\nstraightforward way.\r\n\r\n1. In Synthetics UI, go to Settings > Global Parameters.\r\n<img width=\"831\" alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/18429259/f6dc78f6-6e0c-4b84-a114-9e88266327e9\">\r\n\r\n2. Create a param with some dashes in the key, i.e. `TEST-PARAMS`.\r\n\r\n3. After saving, create an HTTP monitor. In the create form, you can\r\nscroll down and expand `Advanced options`. Include a check for `Request\r\nheaders`, specify a header name and for the value, reference your global\r\nparam using [Beats env\r\nsyntax](https://www.elastic.co/guide/en/beats/libbeat/current/config-file-format-env-vars.html#_examples).\r\n<img width=\"831\" alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/18429259/bcf3c495-1db8-499c-a394-781564744679\">\r\n\r\nYou can either use Test Now or wait for it to fail, and you'll see\r\nissues get logged similar to what is documented in the attached issue.\r\n\r\n### Testing the fix\r\n\r\nI will create an ESS deployment from this PR that will allow you to\r\nfollow the same steps above. You should be able to see your monitor\r\neither succeed (if the response headers you check for are actually\r\nthere), or fail for legitimate reasons. But you should not see the error\r\ndocumented in the attached issue, with a message like `io:job could not\r\nbe initialized...`.","sha":"d69045bd4d1b013cf92daf4992c836ea623a4968"}},"sourceBranch":"main","suggestedTargetBranches":["8.13"],"targetPullRequestStates":[{"branch":"8.13","label":"v8.13.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.14.0","branchLabelMappingKey":"^v8.14.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/178054","number":178054,"mergeCommit":{"message":"[Synthetics] Allow Synthetics global params to include dashes (#178054)\n\n## Summary\r\n\r\nResolves #178053.\r\n\r\nIncludes `-` in the regex to filter param names.\r\n\r\n## Testing\r\n\r\n### Repro instructions\r\n\r\nTesting this is straightforward. You can verify the issue in `main` or\r\non a cloud instance. If you spin up an ESS that is the most\r\nstraightforward way.\r\n\r\n1. In Synthetics UI, go to Settings > Global Parameters.\r\n<img width=\"831\" alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/18429259/f6dc78f6-6e0c-4b84-a114-9e88266327e9\">\r\n\r\n2. Create a param with some dashes in the key, i.e. `TEST-PARAMS`.\r\n\r\n3. After saving, create an HTTP monitor. In the create form, you can\r\nscroll down and expand `Advanced options`. Include a check for `Request\r\nheaders`, specify a header name and for the value, reference your global\r\nparam using [Beats env\r\nsyntax](https://www.elastic.co/guide/en/beats/libbeat/current/config-file-format-env-vars.html#_examples).\r\n<img width=\"831\" alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/18429259/bcf3c495-1db8-499c-a394-781564744679\">\r\n\r\nYou can either use Test Now or wait for it to fail, and you'll see\r\nissues get logged similar to what is documented in the attached issue.\r\n\r\n### Testing the fix\r\n\r\nI will create an ESS deployment from this PR that will allow you to\r\nfollow the same steps above. You should be able to see your monitor\r\neither succeed (if the response headers you check for are actually\r\nthere), or fail for legitimate reasons. But you should not see the error\r\ndocumented in the attached issue, with a message like `io:job could not\r\nbe initialized...`.","sha":"d69045bd4d1b013cf92daf4992c836ea623a4968"}}]}] BACKPORT--> Co-authored-by: Justin Kambic <[email protected]>
- Loading branch information