-
Notifications
You must be signed in to change notification settings - Fork 361
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
Add management api for continuous export of branches #844
Conversation
- Remove a blank line - Override interfacer change that removes semantic information in exchange for a poorly-named irrelevant interface.
Codecov Report
@@ Coverage Diff @@
## master #844 +/- ##
==========================================
+ Coverage 42.90% 45.01% +2.10%
==========================================
Files 135 140 +5
Lines 10571 10842 +271
==========================================
+ Hits 4536 4881 +345
+ Misses 5444 5330 -114
- Partials 591 631 +40
Continue to review full report at Codecov.
|
catalog/cataloger_export.go
Outdated
if len(s) == 0 { | ||
return nil, nil | ||
} | ||
regexpParts := strings.Split(s, "|") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Known issue (working on it while you review): This split is much too deep, e.g if you disjunct "a|b" and "c" it breaks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed this, got rid of all the de-disjunctioning.
It is not possible to roundtrip generating and unparsing disjunctions from the database: the regexp parser optimizes and rewrites portions of the regexp. So we need a copy of the input array stored in the database. (Generating a regexp disjunction back from this array will be easy, a small part of the deleted code did just that.)
4d29c2e
to
07afe46
Compare
Not part of the server API so untested. But may be used internally so needs testing.
07afe46
to
b8ca672
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
api/api_controller.go
Outdated
|
||
deps.LogAction("set_continuous_export") | ||
|
||
if err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what err does this handle?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A long-gone err. Sorry. (But great flow analysis in the golang compiler)
catalog/cataloger_export.go
Outdated
if err = rows.StructScan(&rec); err != nil { | ||
return nil, fmt.Errorf("scan configuration %+v: %w", rows, err) | ||
} | ||
fmt.Printf("[DEBUG] row %+v\n", rec) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this still be here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No 😠
@@ -1258,54 +1287,6 @@ paths: | |||
schema: | |||
$ref: "#/definitions/error" | |||
|
|||
/repositories/{repository}/inventory/s3/import: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why was this removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is "auto-generated" by make build
(in the sense of "blindly copied because Go and WebPack each have their own uniquely correct view of the world, but that view is hopelessly naïve and wrong so we have to hack our away around it because explicit dependencies are very 1990s". @nopcoder can explain why it is committed.
The last person to touch swagger.yml just forgot to build it.
Mine is an exact copy:
ariels@ariels:~/Dev/lakeFS$ diff swagger.yml docs/assets/js/swagger.yml
ddl/000008_export_cfg.down.sql
Outdated
@@ -0,0 +1 @@ | |||
DROP TABLE catalog_branches_export; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IF EXISTS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see we do that everywhere, so did it here too. Not sure it makes anything safer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks; PTAL...
api/api_controller.go
Outdated
|
||
deps.LogAction("set_continuous_export") | ||
|
||
if err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A long-gone err. Sorry. (But great flow analysis in the golang compiler)
ddl/000008_export_cfg.down.sql
Outdated
@@ -0,0 +1 @@ | |||
DROP TABLE catalog_branches_export; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see we do that everywhere, so did it here too. Not sure it makes anything safer.
@@ -1258,54 +1287,6 @@ paths: | |||
schema: | |||
$ref: "#/definitions/error" | |||
|
|||
/repositories/{repository}/inventory/s3/import: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is "auto-generated" by make build
(in the sense of "blindly copied because Go and WebPack each have their own uniquely correct view of the world, but that view is hopelessly naïve and wrong so we have to hack our away around it because explicit dependencies are very 1990s". @nopcoder can explain why it is committed.
The last person to touch swagger.yml just forgot to build it.
Mine is an exact copy:
ariels@ariels:~/Dev/lakeFS$ diff swagger.yml docs/assets/js/swagger.yml
catalog/cataloger_export.go
Outdated
if err = rows.StructScan(&rec); err != nil { | ||
return nil, fmt.Errorf("scan configuration %+v: %w", rows, err) | ||
} | ||
fmt.Printf("[DEBUG] row %+v\n", rec) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No 😠
LGTM |
Thanks! |
Part of #534.