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

[fix][package-management] Fix the new path /data introduced regression #15367

Merged
merged 3 commits into from
May 6, 2022

Conversation

zymap
Copy link
Member

@zymap zymap commented Apr 28, 2022


Fixes #15362

Motivation

The PR #13218 supports saving
package data into filesystem. But it introduces a regression for the
old versions.
For example, we have a package function://public/default/[email protected],
it will save the meta to the path function/public/default/package/v0.1/meta,
and save the data to the path function/public/default/package/v0.1.
By default, we are using distributed log as the package storage, and
it supports saving data in a directory.
But some storage like filesystem doesn't have the similar ability, it
needs another path for saving data.
This API provides the ability to support saving the data in another place.
If you specify the data path as /data, the package will be saved into
function/public/default/package/v0.1/data.

Modifications

  • make the data path configurable in the storage implementation.

---

Fixes apache#15362

*Motivation*

The PR apache#13218 supports saving
package data into filesystem. But it introduces an regression for the
old versions.
For example, we have a package function://public/default/[email protected],
it will save the meta to the path function/public/default/package/v0.1/meta,
and save the data to the path function/public/default/package/v0.1.
By default, we are using distributed log as the package storage, and
it supports saving data at a directory.
But some storage like filesystem don't have the similar ability, it
needs another path for saving data.
This api provides the ability to support saving the data in another place.
If you specify the data path as `/data`, the package will saved into
function/public/default/package/v0.1/data.

*Modifications*

- make the data path configurable in the storage implementation.
@zymap zymap added type/bug The PR fixed a bug or issue reported a bug component/package doc-not-needed Your PR changes do not impact docs release/2.10.1 labels Apr 28, 2022
@zymap zymap added this to the 2.11.0 milestone Apr 28, 2022
@zymap zymap self-assigned this Apr 28, 2022
@zymap
Copy link
Member Author

zymap commented Apr 28, 2022

We have tests for the package service both bk storage and filesystem storage. It's a compatibility issue so I think it's hard to add a test for that.

@zymap
Copy link
Member Author

zymap commented Apr 28, 2022

@nlu90 @eolivelli PTAL

@zymap
Copy link
Member Author

zymap commented Apr 29, 2022

ping @merlimat @eolivelli

Copy link
Contributor

@nicoloboschi nicoloboschi left a comment

Choose a reason for hiding this comment

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

Good work!

We have tests for the package service both bk storage and filesystem storage. It's a compatibility issue so I think it's hard to add a test for that.

I believe that a unit test that ensures the default value (for different storage implementations) it would be very useful as we would have been able to spot the regression during the development of #13218

@zymap
Copy link
Member Author

zymap commented May 5, 2022

@nicoloboschi PTAL. Thanks

Copy link
Contributor

@nicoloboschi nicoloboschi left a comment

Choose a reason for hiding this comment

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

thanks for adding the test
LGTM

@zymap zymap merged commit aa9aa18 into apache:master May 6, 2022
@lhotari lhotari mentioned this pull request May 6, 2022
codelipenghui pushed a commit that referenced this pull request May 20, 2022
…ion (#15367)

---

Fixes #15362

*Motivation*

The PR #13218 supports saving
package data into filesystem. But it introduces a regression for the
old versions.
For example, we have a package function://public/default/[email protected],
it will save the meta to the path function/public/default/package/v0.1/meta,
and save the data to the path function/public/default/package/v0.1.
By default, we are using distributed log as the package storage, and
it supports saving data in a directory.
But some storage like filesystem doesn't have the similar ability, it
needs another path for saving data.
This API provides the ability to support saving the data in another place.
If you specify the data path as `/data`, the package will be saved into
function/public/default/package/v0.1/data.

*Modifications*

- make the data path configurable in the storage implementation.

(cherry picked from commit aa9aa18)
nicoloboschi pushed a commit to datastax/pulsar that referenced this pull request May 23, 2022
…ion (apache#15367)

---

Fixes apache#15362

*Motivation*

The PR apache#13218 supports saving
package data into filesystem. But it introduces a regression for the
old versions.
For example, we have a package function://public/default/[email protected],
it will save the meta to the path function/public/default/package/v0.1/meta,
and save the data to the path function/public/default/package/v0.1.
By default, we are using distributed log as the package storage, and
it supports saving data in a directory.
But some storage like filesystem doesn't have the similar ability, it
needs another path for saving data.
This API provides the ability to support saving the data in another place.
If you specify the data path as `/data`, the package will be saved into
function/public/default/package/v0.1/data.

*Modifications*

- make the data path configurable in the storage implementation.

(cherry picked from commit aa9aa18)
(cherry picked from commit 46d6a7f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-picked/branch-2.10 doc-not-needed Your PR changes do not impact docs release/2.10.1 type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[PackagesService] 2.9 Package Service cannot download if uploaded by 2.10
8 participants