elastic / elastic/elastic-package

Refactor structs defined in fleetpkg internal package if possible

Open
#3,238 0 comments 0 reactions 0 assignees View on GitHub
Team:Ecosystem technnical debt
Dominant language
Go
Stars
72
Forks
141
Avg merge
19h 42m
Merged PRs (30d)
55

Description

In #3213 a new `elastic-package modify` command has been added into `elastic-package` that required to create new internal packages (`fleetpkg` and `yamledit`).

There are some structs in `fleetpkg` that look similar to others already defined in `elastic-package`-

For instance:
- `Manifest` in `fleetpkg` (https://github.com/elastic/elastic-package/pull/3213/changes#diff-7880dbca868888be0062a986f730fcbb094076bd95f397070f6e068e83c142b5R31) and `PackageManifest` in `packages` (https://github.com/elastic/elastic-package/blob/1c096f5f836de67ca842e655f7b7fae391272689/internal/packages/packages.go#L198)
- `Datastream` in `fleetpkg` (https://github.com/elastic/elastic-package/pull/3213/changes#diff-7880dbca868888be0062a986f730fcbb094076bd95f397070f6e068e83c142b5R52) and `DatastreamManifest` in `packages` (https://github.com/elastic/elastic-package/blob/ba9289e88d0a84c5f038b2dea6b0a0aafc49434a/internal/packages/packages.go#L243)

Refactor those structs from `fleetpkg` if possible to use existing structs in `packages` package. To be checked if there could be breaking changes.

Related thread: https://github.com/elastic/elastic-package/pull/3213#discussion_r2731139383

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by comparing the structs in the internal/fleetpkg package with PackageManifest and DatastreamManifest in internal/packages/packages.go. Review the elastic-package modify command and the related discussion from pull request #3213, then check whether reusing the existing packages types introduces breaking changes. Done means duplicate structs are removed or justified without breaking current behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Refactor
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.