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

[Observability Onboarding Integration] breaks installed integrations page #174804

Merged
merged 2 commits into from
Jan 16, 2024
Merged
Changes from 1 commit
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
5 changes: 4 additions & 1 deletion x-pack/plugins/fleet/server/services/epm/archive/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,10 @@ export function parseAndVerifyArchive(
): ArchivePackage {
// The top-level directory must match pkgName-pkgVersion, and no other top-level files or directories may be present
const logger = appContextService.getLogger();
const toplevelDir = topLevelDirOverride || paths[0].split('/')[0];
let toplevelDir = topLevelDirOverride || '';
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 fixed my issue. But since I am not aware of the Fleet/Integrations ecosystem, it might not be the correct way to fix the root of the problem.

Copy link
Contributor

Choose a reason for hiding this comment

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

the fix looks good to me, if you make the pr ready for review, the CI build will run automatically

Copy link
Member

Choose a reason for hiding this comment

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

I checked this fix locally and it solved the related error 👍🏻

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I opened it up for review!

if (paths.length > 0) {
toplevelDir = topLevelDirOverride || paths[0].split('/')[0];
}

paths.forEach((filePath) => {
if (!filePath.startsWith(toplevelDir)) {
Expand Down