-
Notifications
You must be signed in to change notification settings - Fork 438
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
[Synthetics] adjust run_from.id #6047
[Synthetics] adjust run_from.id #6047
Conversation
Pinging @elastic/uptime (Team:Uptime) |
🌐 Coverage report
|
{{#if location_id}} | ||
run_from.id: {{location_id}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{{#if location_id}} | |
run_from.id: {{location_id}} | |
{{#if location_id}} | |
run_from.id: {{location_id}} | |
{{else if location_name}} | |
run_from.id: {{location_name}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need a migration?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest with you, I'm not sure if a migration is truly necessary here. Plus, it's also impossible if you remember because we can't actually get the location ids in the migration function because we can't perform async operations.
But anyway, the main reason I don't think we need a migration here is because we haven't truly started using this anywhere. It'll help us to get rid of some tech debt in the future though.
Plus, once we get time for this issue elastic/kibana#153812, we'll not have to worry as much about saved object migrations for package policies because we'll get the opportunity to resave monitors to update to newer versions, and can apply custom "migrations" if necessary, like resaving if there's a missing field or something.
3b07275
to
d850be1
Compare
## Summary Resolves #156320 Adjust the value of the `run_from.id` field. Before Both the `run_from.id` and the `run_from.name` were the same value. After <img width="543" alt="Screen Shot 2023-05-01 at 7 55 24 PM" src="https://user-images.githubusercontent.com/11356435/235551964-bb9c419d-2ada-4a39-bd08-ce6f5021747b.png"> ### Testing 1. Check out this PR from integrations elastic/integrations#6047 2. In the integrations repo `cd packages/synthetics` 3. Run `elastic-package clean` then `elastic-package build` (You may need to upgrade elastic package if you're significantly behind) 4. In your `kibana.dev.yml` file add `xpack.fleet.registryUrl: https://localhost:8080` 5. Start kibana with `NODE_EXTRA_CA_CERTS=$HOME/.elastic-package/profiles/default/certs/kibana/ca-cert.pem yarn start --no-base-path` 6. Create a private location 7. Create a monitor assigned to that private location 8. Inspect the agent policy for that private location, then find the integration policy for that monitor. Ensure the `run_from.id` is the id of the location, and the `run_from.name` is the name of the location. (If you run into problems setting up your local kibana connected to elastic-package registry, see https://github.com/elastic/security-team/blob/main/docs/cloud-security-posture-team/kibana/local-setup-using-elastic-package.mdx) --------- Co-authored-by: shahzad31 <shahzad31comp@gmail.com>
## Summary Resolves elastic#156320 Adjust the value of the `run_from.id` field. Before Both the `run_from.id` and the `run_from.name` were the same value. After <img width="543" alt="Screen Shot 2023-05-01 at 7 55 24 PM" src="https://user-images.githubusercontent.com/11356435/235551964-bb9c419d-2ada-4a39-bd08-ce6f5021747b.png"> ### Testing 1. Check out this PR from integrations elastic/integrations#6047 2. In the integrations repo `cd packages/synthetics` 3. Run `elastic-package clean` then `elastic-package build` (You may need to upgrade elastic package if you're significantly behind) 4. In your `kibana.dev.yml` file add `xpack.fleet.registryUrl: https://localhost:8080` 5. Start kibana with `NODE_EXTRA_CA_CERTS=$HOME/.elastic-package/profiles/default/certs/kibana/ca-cert.pem yarn start --no-base-path` 6. Create a private location 7. Create a monitor assigned to that private location 8. Inspect the agent policy for that private location, then find the integration policy for that monitor. Ensure the `run_from.id` is the id of the location, and the `run_from.name` is the name of the location. (If you run into problems setting up your local kibana connected to elastic-package registry, see https://github.com/elastic/security-team/blob/main/docs/cloud-security-posture-team/kibana/local-setup-using-elastic-package.mdx) --------- Co-authored-by: shahzad31 <shahzad31comp@gmail.com> (cherry picked from commit f59471b)
Package synthetics - 1.0.1 containing this change is available at https://epr.elastic.co/search?package=synthetics |
…#157531) # Backport This will backport the following commits from `main` to `8.8`: - [[Synthetics] adjust run_from.id for private locations (#156324)](#156324) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Dominique Clarke","email":"dominique.clarke@elastic.co"},"sourceCommit":{"committedDate":"2023-05-12T18:30:53Z","message":"[Synthetics] adjust run_from.id for private locations (#156324)\n\n## Summary\r\n\r\nResolves https://github.com/elastic/kibana/issues/156320\r\n\r\nAdjust the value of the `run_from.id` field.\r\n\r\nBefore\r\nBoth the `run_from.id` and the `run_from.name` were the same value.\r\n\r\nAfter\r\n<img width=\"543\" alt=\"Screen Shot 2023-05-01 at 7 55 24 PM\"\r\nsrc=\"https://user-images.githubusercontent.com/11356435/235551964-bb9c419d-2ada-4a39-bd08-ce6f5021747b.png\">\r\n\r\n### Testing\r\n1. Check out this PR from integrations\r\nhttps://github.com/elastic/integrations/pull/6047\r\n2. In the integrations repo `cd packages/synthetics`\r\n3. Run `elastic-package clean` then `elastic-package build` (You may\r\nneed to upgrade elastic package if you're significantly behind)\r\n4. In your `kibana.dev.yml` file add `xpack.fleet.registryUrl:\r\nhttps://localhost:8080`\r\n5. Start kibana with\r\n`NODE_EXTRA_CA_CERTS=$HOME/.elastic-package/profiles/default/certs/kibana/ca-cert.pem\r\nyarn start --no-base-path`\r\n6. Create a private location\r\n7. Create a monitor assigned to that private location\r\n8. Inspect the agent policy for that private location, then find the\r\nintegration policy for that monitor. Ensure the `run_from.id` is the id\r\nof the location, and the `run_from.name` is the name of the location.\r\n\r\n(If you run into problems setting up your local kibana connected to\r\nelastic-package registry, see\r\nhttps://github.com/elastic/security-team/blob/main/docs/cloud-security-posture-team/kibana/local-setup-using-elastic-package.mdx)\r\n\r\n---------\r\n\r\nCo-authored-by: shahzad31 <shahzad31comp@gmail.com>","sha":"f59471bcdc8d8fa156e7997749efe7d252457d77","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","Team:uptime","release_note:skip","Team:Fleet","v8.8.0","v8.9.0"],"number":156324,"url":"https://github.com/elastic/kibana/pull/156324","mergeCommit":{"message":"[Synthetics] adjust run_from.id for private locations (#156324)\n\n## Summary\r\n\r\nResolves https://github.com/elastic/kibana/issues/156320\r\n\r\nAdjust the value of the `run_from.id` field.\r\n\r\nBefore\r\nBoth the `run_from.id` and the `run_from.name` were the same value.\r\n\r\nAfter\r\n<img width=\"543\" alt=\"Screen Shot 2023-05-01 at 7 55 24 PM\"\r\nsrc=\"https://user-images.githubusercontent.com/11356435/235551964-bb9c419d-2ada-4a39-bd08-ce6f5021747b.png\">\r\n\r\n### Testing\r\n1. Check out this PR from integrations\r\nhttps://github.com/elastic/integrations/pull/6047\r\n2. In the integrations repo `cd packages/synthetics`\r\n3. Run `elastic-package clean` then `elastic-package build` (You may\r\nneed to upgrade elastic package if you're significantly behind)\r\n4. In your `kibana.dev.yml` file add `xpack.fleet.registryUrl:\r\nhttps://localhost:8080`\r\n5. Start kibana with\r\n`NODE_EXTRA_CA_CERTS=$HOME/.elastic-package/profiles/default/certs/kibana/ca-cert.pem\r\nyarn start --no-base-path`\r\n6. Create a private location\r\n7. Create a monitor assigned to that private location\r\n8. Inspect the agent policy for that private location, then find the\r\nintegration policy for that monitor. Ensure the `run_from.id` is the id\r\nof the location, and the `run_from.name` is the name of the location.\r\n\r\n(If you run into problems setting up your local kibana connected to\r\nelastic-package registry, see\r\nhttps://github.com/elastic/security-team/blob/main/docs/cloud-security-posture-team/kibana/local-setup-using-elastic-package.mdx)\r\n\r\n---------\r\n\r\nCo-authored-by: shahzad31 <shahzad31comp@gmail.com>","sha":"f59471bcdc8d8fa156e7997749efe7d252457d77"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/156324","number":156324,"mergeCommit":{"message":"[Synthetics] adjust run_from.id for private locations (#156324)\n\n## Summary\r\n\r\nResolves https://github.com/elastic/kibana/issues/156320\r\n\r\nAdjust the value of the `run_from.id` field.\r\n\r\nBefore\r\nBoth the `run_from.id` and the `run_from.name` were the same value.\r\n\r\nAfter\r\n<img width=\"543\" alt=\"Screen Shot 2023-05-01 at 7 55 24 PM\"\r\nsrc=\"https://user-images.githubusercontent.com/11356435/235551964-bb9c419d-2ada-4a39-bd08-ce6f5021747b.png\">\r\n\r\n### Testing\r\n1. Check out this PR from integrations\r\nhttps://github.com/elastic/integrations/pull/6047\r\n2. In the integrations repo `cd packages/synthetics`\r\n3. Run `elastic-package clean` then `elastic-package build` (You may\r\nneed to upgrade elastic package if you're significantly behind)\r\n4. In your `kibana.dev.yml` file add `xpack.fleet.registryUrl:\r\nhttps://localhost:8080`\r\n5. Start kibana with\r\n`NODE_EXTRA_CA_CERTS=$HOME/.elastic-package/profiles/default/certs/kibana/ca-cert.pem\r\nyarn start --no-base-path`\r\n6. Create a private location\r\n7. Create a monitor assigned to that private location\r\n8. Inspect the agent policy for that private location, then find the\r\nintegration policy for that monitor. Ensure the `run_from.id` is the id\r\nof the location, and the `run_from.name` is the name of the location.\r\n\r\n(If you run into problems setting up your local kibana connected to\r\nelastic-package registry, see\r\nhttps://github.com/elastic/security-team/blob/main/docs/cloud-security-posture-team/kibana/local-setup-using-elastic-package.mdx)\r\n\r\n---------\r\n\r\nCo-authored-by: shahzad31 <shahzad31comp@gmail.com>","sha":"f59471bcdc8d8fa156e7997749efe7d252457d77"}}]}] BACKPORT--> Co-authored-by: Dominique Clarke <dominique.clarke@elastic.co> Co-authored-by: Shahzad <shahzad31comp@gmail.com>
## Summary Resolves #156320 Adjust the value of the `run_from.id` field. Before Both the `run_from.id` and the `run_from.name` were the same value. After <img width="543" alt="Screen Shot 2023-05-01 at 7 55 24 PM" src="https://user-images.githubusercontent.com/11356435/235551964-bb9c419d-2ada-4a39-bd08-ce6f5021747b.png"> ### Testing 1. Check out this PR from integrations elastic/integrations#6047 2. In the integrations repo `cd packages/synthetics` 3. Run `elastic-package clean` then `elastic-package build` (You may need to upgrade elastic package if you're significantly behind) 4. In your `kibana.dev.yml` file add `xpack.fleet.registryUrl: https://localhost:8080` 5. Start kibana with `NODE_EXTRA_CA_CERTS=$HOME/.elastic-package/profiles/default/certs/kibana/ca-cert.pem yarn start --no-base-path` 6. Create a private location 7. Create a monitor assigned to that private location 8. Inspect the agent policy for that private location, then find the integration policy for that monitor. Ensure the `run_from.id` is the id of the location, and the `run_from.name` is the name of the location. (If you run into problems setting up your local kibana connected to elastic-package registry, see https://github.com/elastic/security-team/blob/main/docs/cloud-security-posture-team/kibana/local-setup-using-elastic-package.mdx) --------- Co-authored-by: shahzad31 <shahzad31comp@gmail.com>
Package synthetics - 1.0.5 containing this change is available at https://epr.elastic.co/search?package=synthetics |
What does this PR do?
Resolves elastic/kibana#156320
Adjusts the
run_from.id
to reflect the id of the location, not the name.