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

Align package storage directories with public dir structure #376

Merged
merged 6 commits into from
Apr 27, 2020

Conversation

ruflin
Copy link
Member

@ruflin ruflin commented Apr 23, 2020

The package structure of the published packages is {package}/{version}. So far the stored packages had the structure {package}-{version}. This PR brings the two in line.

The driver behind the current data structure was to don't have too much nesting during development. But in the future, this structure is not meant for development but for storing packages. All released packages will be stored in our package storage. The package development will be moved to https://github.com/elastic/integrations. In there, I expect that only a directory {package} will exist without a version attached to it as in most cases only 1 version is developed in parallel. Then when the package should be released, it is copied to the storage to be deployed. Having the storage as close to the packages published should simplify the mental model.

@ruflin ruflin self-assigned this Apr 23, 2020
magefile.go Outdated
@@ -32,7 +32,7 @@ var (

publicDir = "./public"
buildDir = "./build"
packagePaths = []string{"./dev/packages/alpha/", "./dev/packages/beats/", "./dev/packages/example/"}
packagePaths = []string{"./dev/packages/alpha/"}
Copy link
Member Author

Choose a reason for hiding this comment

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

This will be reverted if we decided to move forward here.

@ruflin
Copy link
Member Author

ruflin commented Apr 23, 2020

@mtojek Would like to get your feedback on this change. If we move forward with this, I would also adjust the Beats generator and all built packages as part of this PR.

@mtojek
Copy link
Contributor

mtojek commented Apr 23, 2020

The package development will be moved to https://github.com/elastic/integrations. In there, I expect that only a directory {package} will exist without a version attached to it as in most cases only 1 version is developed in parallel.

Agree, we should ensure single place in which we store revision. I would consider removing it from internals of a package.

Then when the package should be released, it is copied to the storage to be deployed.

Hmm.. not sure about this part. It looks like the goal of storage would be only for storing artifacts ready to serve. Is it possible to generate them in flight?

@ruflin
Copy link
Member Author

ruflin commented Apr 23, 2020

Undecided if we need to discuss how a package is released first before moving forward with this or @mtojek independent on this, the proposed directory change looks ok to you?

@mtojek
Copy link
Contributor

mtojek commented Apr 23, 2020

the proposed directory change looks ok to you?

Yup, it looks good to me. Could you please adjust also the import-beats script?

I believe the only change should be in this line:

packagePath := filepath.Join(outputDir, packageName+"-"+manifest.Version)

@@ -32,7 +32,7 @@ var (

publicDir = "./public"
buildDir = "./build"
packagePaths = []string{"./dev/packages/alpha/", "./dev/packages/beats/", "./dev/packages/example/"}
packagePaths = []string{"./dev/packages/alpha/", "./dev/packages/example/"}
Copy link
Member Author

Choose a reason for hiding this comment

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

@mtojek As I would prefer to only have "rename" changes in this PR and not all other changes related to what change in Beats, I would prefer to get this PR in with beats excluded and how a follow up PR for it?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure, let's go that way.

@ruflin ruflin marked this pull request as ready for review April 27, 2020 12:51
The package structure of the published packages is {package}/{version}. So far the stored packages had the structure {package}-{version}. This PR brings the two in line.

The driver behind the current data structure was to don't have too much nesting during development. But in the future, this structure is not meant for development but for storing packages. All released packages will be stored in our [package storage](https://github.com/elastic/package-storage). The package development will be moved to https://github.com/elastic/integrations. In there, I expect that only a directory {package} will exist without a version attached to it as in most cases only 1 version is developed in parallel. Then when the package should be released, it is copied to the storage to be deployed. Having the storage as close to the packages published should simplify the mental model.
@ruflin ruflin merged commit e5f531e into elastic:master Apr 27, 2020
@ruflin ruflin deleted the modify-package-path branch April 27, 2020 18:21
@ruflin
Copy link
Member Author

ruflin commented Apr 27, 2020

@mtojek @kaiyan-sheng @alakahakai @skh I merged this PR which probably means your PR needs a rebased. All that changes is the name of the directory so I hope it should be pretty straigh forward. Otherwise please ping me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants