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

[EDR Workflows] Turn on new Manifest Manager feature flag. #186596

Merged
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .buildkite/ftr_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -582,5 +582,3 @@ enabled:
- x-pack/test/security_solution_api_integration/test_suites/security_solution_endpoint/configs/serverless.endpoint.config.ts
- x-pack/test/security_solution_api_integration/test_suites/security_solution_endpoint/configs/integrations.config.ts
- x-pack/test/security_solution_api_integration/test_suites/security_solution_endpoint/configs/serverless.integrations.config.ts
- x-pack/test/security_solution_api_integration/test_suites/security_solution_endpoint/configs/serverless.integrations_feature_flag.config.ts
- x-pack/test/security_solution_api_integration/test_suites/security_solution_endpoint/configs/integrations_feature_flag.config.ts
Comment on lines -585 to -586
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These two suites were copies of the two above them that were initialized with the feature flag on. With the feature flag enabled, they are no longer needed.

Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ export const allowedExperimentalValues = Object.freeze({
/**
* Enables unified manifest that replaces existing user artifacts manifest SO with a new approach of creating a SO per package policy.
*/
unifiedManifestEnabled: false,
unifiedManifestEnabled: true,

/**
* Enables Security AI Assistant's Flyout mode
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
const pageObjects = getPageObjects(['common', 'artifactEntriesList']);
const testSubjects = getService('testSubjects');
const browser = getService('browser');
const endpointArtifactTestResources = getService('endpointArtifactTestResources');
const endpointArtifactsTestResources = getService('endpointArtifactTestResources');
const endpointTestResources = getService('endpointTestResources');
const retry = getService('retry');
const esClient = getService('es');
Expand All @@ -51,9 +51,8 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
.delete(`${EXCEPTION_LIST_URL}?list_id=${listId}&namespace_type=agnostic`)
.set('kbn-xsrf', 'true');
};
// It's flaky only in Serverless
// Failing: See https://github.com/elastic/kibana/issues/186004
Copy link
Contributor

Choose a reason for hiding this comment

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

Were we able to fix the flakiness for this?

describe.skip('@ess @serverless For each artifact list under management', function () {

describe('@ess @serverless For each artifact list under management', function () {
let indexedData: IndexedHostsAndAlertsResponse;
let policyInfo: PolicyTestResourceInfo;

Expand All @@ -73,13 +72,14 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
// Check edited artifact is in the list with new values (wait for list to be updated)
let updatedArtifact: ArtifactElasticsearchProperties | undefined;
await retry.waitForWithTimeout('fleet artifact is updated', 120_000, async () => {
const artifacts = await endpointArtifactTestResources.getArtifacts();
const artifacts = await endpointArtifactsTestResources.getArtifactsFromUnifiedManifestSO();

// This expects manifest artifact to come from unified so
const manifestArtifact = artifacts.find((artifact) => {
return (
artifact.artifactId ===
`${expectedArtifact.identifier}-${expectedArtifact.decoded_sha256}` &&
artifact.policyId === policy?.packagePolicy.id
artifact.artifactIds.includes(
`${expectedArtifact.identifier}-${expectedArtifact.decoded_sha256}`
) && artifact.policyId === policy?.packagePolicy.id
);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,18 +99,18 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {

const checkArtifact = (expectedArtifact: object) => {
return retry.tryForTime(2 * MINUTES, async () => {
const artifacts = await endpointArtifactTestResources.getArtifacts();
const artifacts = await endpointArtifactTestResources.getArtifactsFromUnifiedManifestSO();

const manifestArtifact = artifacts.find((artifact) =>
artifact.artifactId.startsWith('endpoint-exceptionlist-macos-v1')
);
const foundArtifactId = artifacts
.flatMap((artifact) => artifact.artifactIds)
.find((artifactId) => artifactId.startsWith('endpoint-exceptionlist-macos-v1'));

expect(manifestArtifact).to.not.be(undefined);
expect(foundArtifactId).to.not.be(undefined);

// Get fleet artifact
const artifactResult = await esClient.get({
index: '.fleet-artifacts-7',
id: `endpoint:${manifestArtifact!.artifactId}`,
id: `endpoint:${foundArtifactId!}`,
});

const artifact = artifactResult._source as ArtifactElasticsearchProperties;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import { FullAgentPolicy } from '@kbn/fleet-plugin/common/types';
import { ArtifactElasticsearchProperties } from '@kbn/fleet-plugin/server/services/artifacts/types';
import { InternalManifestSchema } from '@kbn/security-solution-plugin/server/endpoint/schemas/artifacts';
import { InternalUnifiedManifestBaseSchema } from '@kbn/security-solution-plugin/server/endpoint/schemas/artifacts';
import { TranslatedExceptionListItem } from '@kbn/security-solution-plugin/server/endpoint/schemas/artifacts/lists';

export interface AgentPolicyResponseType {
Expand All @@ -17,12 +17,12 @@ export interface AgentPolicyResponseType {
_source: { data: FullAgentPolicy };
}

export interface InternalManifestSchemaResponseType {
export interface InternalUnifiedManifestSchemaResponseType {
_index: string;
_id: string;
_score: number;
_source: {
'endpoint:user-artifact-manifest': InternalManifestSchema;
'endpoint:unified-user-artifact-manifest': InternalUnifiedManifestBaseSchema;
};
}

Expand Down
Loading