elastic / elastic/package-spec

[FLEET] Support preserving assets for a previous package version when package is updated

Open
#246 5 comments 0 reactions 0 assignees View on GitHub
Team:Ecosystem Team:Fleet
Dominant language
Go
Stars
20
Forks
93
Avg merge
15h 10m
Merged PRs (30d)
12

Description

**Describe the feature:**

Add functionality for preserving assets for a previous package version when package is updated.

Proposed solution is to add a `preserve_assets: boolean` field to package manifest and use that as the check for whether or not to delete previous assets on update.

Related to changes in: https://github.com/elastic/kibana/pull/107710 in which support for ML model packages has been added.

The current workflow for model packages requires older versions not be removed when a user updates a package. To prevent previous versions pipeline assets from being removed from ML packages on upgrade, the temporary solution is to skip previous versions pipeline deletion when those pipelines are top-level assets (not within a datastream directory).

This is a temporary solution that works for now because ML model packages are the only packages currently containing top-level pipeline assets so this will not affect other packages.

This issue is to propose a more robust solution.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the package manifest and the package update workflow, focusing on how previous-version assets are identified and deleted. Compare the proposed preserve_assets field with the temporary handling for top-level pipeline assets; done means package updates preserve assets for versions that opt in without changing deletion behavior for other packages.

Written by the indexing model from the issue text.

Assessment

Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.