You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "HHoflittlefish777 (via GitHub)" <gi...@apache.org> on 2023/02/01 15:10:19 UTC
[GitHub] [skywalking-banyandb] HHoflittlefish777 opened a new pull request, #246: fix metadata bug
HHoflittlefish777 opened a new pull request, #246:
URL: https://github.com/apache/skywalking-banyandb/pull/246
relate issue:#9902
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking-banyandb] hanahmily commented on a diff in pull request #246: Fix metadata-relevant bugs
Posted by "hanahmily (via GitHub)" <gi...@apache.org>.
hanahmily commented on code in PR #246:
URL: https://github.com/apache/skywalking-banyandb/pull/246#discussion_r1094042537
##########
banyand/metadata/schema/measure.go:
##########
@@ -59,11 +61,21 @@ func (e *etcdSchemaRegistry) ListMeasure(ctx context.Context, opt ListOpt) ([]*d
}
func (e *etcdSchemaRegistry) CreateMeasure(ctx context.Context, measure *databasev1.Measure) error {
+ if measure.UpdatedAt != nil {
+ measure.UpdatedAt = timestamppb.Now()
+ }
+ if measure.GetInterval() != "" {
+ _, timeError := timestamp.ParseDuration(measure.GetInterval())
+ if timeError != nil {
+ return errors.New("format of interval filed error")
+ }
+ }
+ name := measure.GetMetadata().GetName()
Review Comment:
Why assign a local variable `name`? It seems not reused.
##########
banyand/metadata/schema/measure.go:
##########
@@ -59,11 +61,21 @@ func (e *etcdSchemaRegistry) ListMeasure(ctx context.Context, opt ListOpt) ([]*d
}
func (e *etcdSchemaRegistry) CreateMeasure(ctx context.Context, measure *databasev1.Measure) error {
+ if measure.UpdatedAt != nil {
+ measure.UpdatedAt = timestamppb.Now()
+ }
+ if measure.GetInterval() != "" {
+ _, timeError := timestamp.ParseDuration(measure.GetInterval())
+ if timeError != nil {
+ return errors.New("format of interval filed error")
Review Comment:
```suggestion
if _, err := timestamp.ParseDuration(measure.GetInterval()); err != nil {
return errors.Wrap(err, "interval is malformed")
```
##########
banyand/metadata/schema/measure.go:
##########
@@ -126,6 +138,12 @@ func (e *etcdSchemaRegistry) CreateMeasure(ctx context.Context, measure *databas
}
func (e *etcdSchemaRegistry) UpdateMeasure(ctx context.Context, measure *databasev1.Measure) error {
+ if measure.GetInterval() != "" {
+ _, timeError := timestamp.ParseDuration(measure.GetInterval())
+ if timeError != nil {
+ return errors.New("format of interval filed error")
+ }
Review Comment:
Same as above
##########
banyand/metadata/schema/property.go:
##########
@@ -86,10 +87,18 @@ func (e *etcdSchemaRegistry) ListProperty(ctx context.Context, container *common
func (e *etcdSchemaRegistry) ApplyProperty(ctx context.Context, property *propertyv1.Property, strategy propertyv1.ApplyRequest_Strategy) (bool, uint32, error) {
m := transformKey(property.GetMetadata())
+ group := m.GetGroup()
+ _, getGroupErr := e.GetGroup(ctx, group)
+ if getGroupErr != nil {
+ return false, 0, getGroupErr
Review Comment:
Wrap a relevant message around the error.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking-banyandb] codecov-commenter commented on pull request #246: Fix metadata-relevant bugs
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #246:
URL: https://github.com/apache/skywalking-banyandb/pull/246#issuecomment-1413153636
# [Codecov](https://codecov.io/gh/apache/skywalking-banyandb/pull/246?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#246](https://codecov.io/gh/apache/skywalking-banyandb/pull/246?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0bdfbeb) into [main](https://codecov.io/gh/apache/skywalking-banyandb/commit/c25160d0321d6596fb84891628beba4470cbab3d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (c25160d) will **decrease** coverage by `0.06%`.
> The diff coverage is `30.76%`.
```diff
@@ Coverage Diff @@
## main #246 +/- ##
==========================================
- Coverage 45.92% 45.86% -0.06%
==========================================
Files 87 87
Lines 8863 8900 +37
==========================================
+ Hits 4070 4082 +12
- Misses 4409 4434 +25
Partials 384 384
```
| [Impacted Files](https://codecov.io/gh/apache/skywalking-banyandb/pull/246?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [banyand/metadata/schema/measure.go](https://codecov.io/gh/apache/skywalking-banyandb/pull/246?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YmFueWFuZC9tZXRhZGF0YS9zY2hlbWEvbWVhc3VyZS5nbw==) | `5.98% <0.00%> (-0.55%)` | :arrow_down: |
| [banyand/metadata/schema/property.go](https://codecov.io/gh/apache/skywalking-banyandb/pull/246?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YmFueWFuZC9tZXRhZGF0YS9zY2hlbWEvcHJvcGVydHkuZ28=) | `0.00% <0.00%> (ø)` | |
| [banyand/metadata/schema/topn.go](https://codecov.io/gh/apache/skywalking-banyandb/pull/246?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YmFueWFuZC9tZXRhZGF0YS9zY2hlbWEvdG9wbi5nbw==) | `0.00% <0.00%> (ø)` | |
| [banyand/metadata/schema/group.go](https://codecov.io/gh/apache/skywalking-banyandb/pull/246?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YmFueWFuZC9tZXRhZGF0YS9zY2hlbWEvZ3JvdXAuZ28=) | `63.49% <100.00%> (+1.82%)` | :arrow_up: |
| [banyand/metadata/schema/index.go](https://codecov.io/gh/apache/skywalking-banyandb/pull/246?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YmFueWFuZC9tZXRhZGF0YS9zY2hlbWEvaW5kZXguZ28=) | `74.78% <100.00%> (+1.38%)` | :arrow_up: |
| [banyand/metadata/schema/stream.go](https://codecov.io/gh/apache/skywalking-banyandb/pull/246?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YmFueWFuZC9tZXRhZGF0YS9zY2hlbWEvc3RyZWFtLmdv) | `49.12% <100.00%> (+2.82%)` | :arrow_up: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking-banyandb] hanahmily merged pull request #246: Fix metadata-relevant bugs
Posted by "hanahmily (via GitHub)" <gi...@apache.org>.
hanahmily merged PR #246:
URL: https://github.com/apache/skywalking-banyandb/pull/246
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org