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

[Synthetics] chore - synthetics unskip test in mki #204273

Conversation

dominiqueclarke
Copy link
Contributor

@dominiqueclarke dominiqueclarke commented Dec 13, 2024

Summary

Unskip test that was previously failing in MKI.

These tests have been run against MKI.

Background on the test

The test confirms that synthetics integration policies auto update when the package version is updated. It attempts to install an older version of the package and then run fleet setup to install a newer version of the package and trigger auto upgrade

Why it failed

The test expected a lower version of the package to be installed, but a more recent version was already installed. Therefore, when we went to create synthetics integration policies they were installed with the most recent version.

How we fixed it

Before this test, we now uninstall the Synthetics integration to ensure we can force install an earlier version.

@dominiqueclarke dominiqueclarke added v9.0.0 backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) chore Team:obs-ux-management Observability Management User Experience Team labels Dec 16, 2024
@dominiqueclarke dominiqueclarke marked this pull request as ready for review December 16, 2024 15:19
@dominiqueclarke dominiqueclarke requested review from a team as code owners December 16, 2024 15:19
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-management-team (Team:obs-ux-management)

// await security.role.delete(roleName);
// }
// });
it('handles spaces', async () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This test was accidentally commented out. I restored it.

@dominiqueclarke dominiqueclarke changed the title Chore/synthetics unskip test in mki [Synthetics] chore - synthetics unskip test in mki Dec 16, 2024
@dominiqueclarke dominiqueclarke added the release_note:skip Skip the PR/issue when compiling release notes label Dec 16, 2024
@maryam-saeidi
Copy link
Member

@dominiqueclarke Does it make sense to run the flaky test runner for this test?

@dominiqueclarke
Copy link
Contributor Author

@dominiqueclarke Does it make sense to run the flaky test runner for this test?

Does flaky test runner integrate with mki in any way?

@maryam-saeidi
Copy link
Member

Does flaky test runner integrate with mki in any way?

Not that I am aware of. I meant verifying the changes are not flaky outside of the MKI environment.

@wayneseymour
Copy link
Member

Adding a link for the issue this address: #204204

Copy link
Member

@wayneseymour wayneseymour left a comment

Choose a reason for hiding this comment

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

I ran this successfully against an oblt instance from my local! Looks good!

import { addMonitorAPIHelper, keyToOmitList, omitMonitorKeys } from './create_monitor';
import { SyntheticsMonitorTestService } from '../../../services/synthetics_monitor';

export default function ({ getService }: DeploymentAgnosticFtrProviderContext) {
describe('PrivateLocationAddMonitor', function () {
// see details: https://github.com/elastic/kibana/issues/204204
this.tags(['failsOnMKI']);
const kibanaServer = getService('kibanaServer');
const supertestAPI = getService('supertestWithoutAuth');
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const supertestAPI = getService('supertestWithoutAuth');
const supertestWithoutAuth = getService('supertestWithoutAuth');

I recognize this line is not within your pr's changes, but this is bad practice.

@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#7639

[✅] x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts: 50/50 tests passed.

see run history

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

@dominiqueclarke dominiqueclarke merged commit b851db3 into elastic:main Jan 3, 2025
8 checks passed
@dominiqueclarke dominiqueclarke deleted the chore/synthetics-unskip-test-in-mki branch January 3, 2025 16:06
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/12600439782

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 3, 2025
## Summary

Unskip test that was previously failing in MKI.

These tests have been run against MKI.

Background on the test
--
The test confirms that synthetics integration policies auto update when
the package version is updated. It attempts to install an older version
of the package and then run fleet setup to install a newer version of
the package and trigger auto upgrade

Why it failed
--
The test expected a lower version of the package to be installed, but a
more recent version was already installed. Therefore, when we went to
create synthetics integration policies they were installed with the most
recent version.

How we fixed it
--
Before this test, we now uninstall the Synthetics integration to ensure
we can force install an earlier version.

(cherry picked from commit b851db3)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Jan 3, 2025
…205516)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Synthetics] chore - synthetics unskip test in mki
(#204273)](#204273)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Dominique
Clarke","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-03T16:06:00Z","message":"[Synthetics]
chore - synthetics unskip test in mki (#204273)\n\n##
Summary\r\n\r\nUnskip test that was previously failing in
MKI.\r\n\r\nThese tests have been run against MKI.\r\n\r\nBackground on
the test\r\n--\r\nThe test confirms that synthetics integration policies
auto update when\r\nthe package version is updated. It attempts to
install an older version\r\nof the package and then run fleet setup to
install a newer version of\r\nthe package and trigger auto
upgrade\r\n\r\nWhy it failed\r\n--\r\nThe test expected a lower version
of the package to be installed, but a\r\nmore recent version was already
installed. Therefore, when we went to\r\ncreate synthetics integration
policies they were installed with the most\r\nrecent version.\r\n\r\nHow
we fixed it\r\n--\r\nBefore this test, we now uninstall the Synthetics
integration to ensure\r\nwe can force install an earlier
version.","sha":"b851db30137aa51c3390dee903870685feb754ae","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["chore","release_note:skip","v9.0.0","backport:prev-minor","Team:obs-ux-management"],"title":"[Synthetics]
chore - synthetics unskip test in
mki","number":204273,"url":"https://github.com/elastic/kibana/pull/204273","mergeCommit":{"message":"[Synthetics]
chore - synthetics unskip test in mki (#204273)\n\n##
Summary\r\n\r\nUnskip test that was previously failing in
MKI.\r\n\r\nThese tests have been run against MKI.\r\n\r\nBackground on
the test\r\n--\r\nThe test confirms that synthetics integration policies
auto update when\r\nthe package version is updated. It attempts to
install an older version\r\nof the package and then run fleet setup to
install a newer version of\r\nthe package and trigger auto
upgrade\r\n\r\nWhy it failed\r\n--\r\nThe test expected a lower version
of the package to be installed, but a\r\nmore recent version was already
installed. Therefore, when we went to\r\ncreate synthetics integration
policies they were installed with the most\r\nrecent version.\r\n\r\nHow
we fixed it\r\n--\r\nBefore this test, we now uninstall the Synthetics
integration to ensure\r\nwe can force install an earlier
version.","sha":"b851db30137aa51c3390dee903870685feb754ae"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/204273","number":204273,"mergeCommit":{"message":"[Synthetics]
chore - synthetics unskip test in mki (#204273)\n\n##
Summary\r\n\r\nUnskip test that was previously failing in
MKI.\r\n\r\nThese tests have been run against MKI.\r\n\r\nBackground on
the test\r\n--\r\nThe test confirms that synthetics integration policies
auto update when\r\nthe package version is updated. It attempts to
install an older version\r\nof the package and then run fleet setup to
install a newer version of\r\nthe package and trigger auto
upgrade\r\n\r\nWhy it failed\r\n--\r\nThe test expected a lower version
of the package to be installed, but a\r\nmore recent version was already
installed. Therefore, when we went to\r\ncreate synthetics integration
policies they were installed with the most\r\nrecent version.\r\n\r\nHow
we fixed it\r\n--\r\nBefore this test, we now uninstall the Synthetics
integration to ensure\r\nwe can force install an earlier
version.","sha":"b851db30137aa51c3390dee903870685feb754ae"}}]}]
BACKPORT-->

Co-authored-by: Dominique Clarke <[email protected]>
dominiqueclarke added a commit that referenced this pull request Jan 6, 2025
## Summary

Unskips flaky tests.

Passed in stateful and serverless for 50 iterations.

Previous failures related to fleet integration package failures. The
logic for installing the synthetics integration via fleet was changed to
improve flakiness in #204273. Those changes have also impacted the
flakiness of these tests.
kowalczyk-krzysztof pushed a commit to kowalczyk-krzysztof/kibana that referenced this pull request Jan 7, 2025
## Summary

Unskip test that was previously failing in MKI.

These tests have been run against MKI.

Background on the test
--
The test confirms that synthetics integration policies auto update when
the package version is updated. It attempts to install an older version
of the package and then run fleet setup to install a newer version of
the package and trigger auto upgrade

Why it failed
--
The test expected a lower version of the package to be installed, but a
more recent version was already installed. Therefore, when we went to
create synthetics integration policies they were installed with the most
recent version.

How we fixed it
--
Before this test, we now uninstall the Synthetics integration to ensure
we can force install an earlier version.
kowalczyk-krzysztof pushed a commit to kowalczyk-krzysztof/kibana that referenced this pull request Jan 7, 2025
## Summary

Unskips flaky tests.

Passed in stateful and serverless for 50 iterations.

Previous failures related to fleet integration package failures. The
logic for installing the synthetics integration via fleet was changed to
improve flakiness in elastic#204273. Those changes have also impacted the
flakiness of these tests.
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Jan 13, 2025
## Summary

Unskip test that was previously failing in MKI.

These tests have been run against MKI.

Background on the test
--
The test confirms that synthetics integration policies auto update when
the package version is updated. It attempts to install an older version
of the package and then run fleet setup to install a newer version of
the package and trigger auto upgrade

Why it failed
--
The test expected a lower version of the package to be installed, but a
more recent version was already installed. Therefore, when we went to
create synthetics integration policies they were installed with the most
recent version.

How we fixed it
--
Before this test, we now uninstall the Synthetics integration to ensure
we can force install an earlier version.
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Jan 13, 2025
## Summary

Unskips flaky tests.

Passed in stateful and serverless for 50 iterations.

Previous failures related to fleet integration package failures. The
logic for installing the synthetics integration via fleet was changed to
improve flakiness in elastic#204273. Those changes have also impacted the
flakiness of these tests.
viduni94 pushed a commit to viduni94/kibana that referenced this pull request Jan 23, 2025
## Summary

Unskip test that was previously failing in MKI.

These tests have been run against MKI.

Background on the test
--
The test confirms that synthetics integration policies auto update when
the package version is updated. It attempts to install an older version
of the package and then run fleet setup to install a newer version of
the package and trigger auto upgrade

Why it failed
--
The test expected a lower version of the package to be installed, but a
more recent version was already installed. Therefore, when we went to
create synthetics integration policies they were installed with the most
recent version.

How we fixed it
--
Before this test, we now uninstall the Synthetics integration to ensure
we can force install an earlier version.
viduni94 pushed a commit to viduni94/kibana that referenced this pull request Jan 23, 2025
## Summary

Unskips flaky tests.

Passed in stateful and serverless for 50 iterations.

Previous failures related to fleet integration package failures. The
logic for installing the synthetics integration via fleet was changed to
improve flakiness in elastic#204273. Those changes have also impacted the
flakiness of these tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) chore release_note:skip Skip the PR/issue when compiling release notes Team:obs-ux-management Observability Management User Experience Team v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants