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

Feat/Add meta to neofs-lens #1714

Merged
merged 4 commits into from
Sep 6, 2022
Merged

Feat/Add meta to neofs-lens #1714

merged 4 commits into from
Sep 6, 2022

Conversation

carpawell
Copy link
Member

@carpawell carpawell commented Aug 19, 2022

Adds meta subcommand. Also, includes refactoring that separates inspect and list commands on write-cache and blobovnicza subcommands.

@codecov
Copy link

codecov bot commented Aug 19, 2022

Codecov Report

Merging #1714 (70b9f63) into master (82839cb) will decrease coverage by 0.63%.
The diff coverage is n/a.

❗ Current head 70b9f63 differs from pull request most recent head d5c3286. Consider uploading reports for the commit d5c3286 to get more accurate results

@@            Coverage Diff             @@
##           master    #1714      +/-   ##
==========================================
- Coverage   33.19%   32.55%   -0.64%     
==========================================
  Files         351      337      -14     
  Lines       23422    22667     -755     
==========================================
- Hits         7774     7380     -394     
+ Misses      14997    14674     -323     
+ Partials      651      613      -38     
Impacted Files Coverage Δ
...kg/local_object_storage/blobstor/fstree/control.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/local_object_storage/blobstor/mode.go 0.00% <0.00%> (-86.67%) ⬇️
pkg/local_object_storage/metabase/mode.go 0.00% <0.00%> (-81.82%) ⬇️
..._object_storage/blobstor/blobovniczatree/exists.go 0.00% <0.00%> (-77.78%) ⬇️
pkg/local_object_storage/blobstor/fstree/option.go 0.00% <0.00%> (-75.00%) ⬇️
...object_storage/blobstor/blobovniczatree/control.go 42.62% <0.00%> (-25.88%) ⬇️
...object_storage/blobstor/blobovniczatree/iterate.go 62.68% <0.00%> (-23.99%) ⬇️
...ject_storage/blobstor/blobovniczatree/get_range.go 55.17% <0.00%> (-13.80%) ⬇️
pkg/morph/event/container/delete.go 51.85% <0.00%> (-10.94%) ⬇️
pkg/morph/event/container/put.go 42.85% <0.00%> (-10.85%) ⬇️
... and 41 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@carpawell carpawell marked this pull request as ready for review August 23, 2022 14:10
@carpawell carpawell self-assigned this Aug 23, 2022
@carpawell carpawell added enhancement Improving existing functionality neofs-lens NeoFS Lens app issues labels Aug 23, 2022
@carpawell carpawell added this to the v0.32.0 milestone Aug 23, 2022
fyrchik
fyrchik previously approved these changes Aug 24, 2022
Comment on lines 24 to 33
db := meta.New(
meta.WithPath(vPath),
meta.WithBoltDBOptions(&bbolt.Options{
ReadOnly: true,
Timeout: 100 * time.Millisecond,
}),
meta.WithEpochState(epochState{}),
)

common.ExitOnErr(cmd, common.Errf("could not open metabase: %w", db.Open(true)))
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we move all 3 calls in this package in a single parameterless function? They have the same purpose -- open DB in readonly to view sth.

Copy link
Member Author

@carpawell carpawell Aug 24, 2022

Choose a reason for hiding this comment

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

sure, added such funcs for all the components

Copy link
Contributor

@cthulhu-rider cthulhu-rider left a comment

Choose a reason for hiding this comment

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

For future pls don't blend feature code with refactor

cmd/neofs-lens/internal/meta/root.go Outdated Show resolved Hide resolved
Separate `inspect` and `list` on `write-cache` and `blobovnicza`
subcommands.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
@carpawell
Copy link
Member Author

carpawell commented Sep 2, 2022

For future pls don't blend feature code with refactor

Usually, I do not do PRs that way. That happened because of the order of my changes: first, i added the meta but then realized that it was incredibly hard to use it without a refactor (and separate the refactor from the feature, so that is not refactoring for refactoring, just adding the meta make usage hard). In fact, commits are quite independent now.

Rebased CHANGELOG conflicts.

Includes:
1. `inspect`
2. `list-garbage`
3. `list-graveyard`

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
@cthulhu-rider cthulhu-rider merged commit fa18100 into nspcc-dev:master Sep 6, 2022
cthulhu-rider pushed a commit that referenced this pull request Sep 6, 2022
Separate `inspect` and `list` on `write-cache` and `blobovnicza`
subcommands.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
cthulhu-rider pushed a commit that referenced this pull request Sep 6, 2022
Includes:
1. `inspect`
2. `list-garbage`
3. `list-graveyard`

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
cthulhu-rider pushed a commit that referenced this pull request Sep 6, 2022
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
aprasolova pushed a commit to aprasolova/neofs-node that referenced this pull request Oct 19, 2022
Separate `inspect` and `list` on `write-cache` and `blobovnicza`
subcommands.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
aprasolova pushed a commit to aprasolova/neofs-node that referenced this pull request Oct 19, 2022
Includes:
1. `inspect`
2. `list-garbage`
3. `list-graveyard`

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
aprasolova pushed a commit to aprasolova/neofs-node that referenced this pull request Oct 19, 2022
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
aprasolova pushed a commit to aprasolova/neofs-node that referenced this pull request Oct 19, 2022
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
@carpawell carpawell deleted the feat/add-meta-to-neofs-lens branch November 1, 2022 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improving existing functionality neofs-lens NeoFS Lens app issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants