-
Notifications
You must be signed in to change notification settings - Fork 367
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
Warn when setting up a system with local or mem block adapters #2002
Conversation
d029112
to
c8ff5d9
Compare
c8ff5d9
to
54c338b
Compare
cmd/lakefs/cmd/run.go
Outdated
░██ ██░██░██ ███████ ░██ ░ ░██ ░██░██ ░██ ░██░██ ░██░██ | ||
░████ ░░████ ██░░░░██ ░██ ░██ ░██░██ ░██ ░██░░██████░░ | ||
░██░ ░░░██░░████████░███ ███ ░██░██ ███ ░██ ░░░░░██ ██ | ||
░░ ░░ ░░░░░░░░ ░░░ ░░░ ░░ ░░ ░░░ ░░ █████ ░░ |
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 bit much, given our quickstart will also show this. I'd do without the big banner..
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.
Done. Let me know if you want a small figlet banner...
docs/assets/js/swagger.yml
Outdated
@@ -2821,3 +2844,20 @@ paths: | |||
$ref: "#/components/schemas/Config" | |||
401: | |||
$ref: "#/components/responses/Unauthorized" | |||
|
|||
/warnings: |
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.
We already have /config
: Since this is currently only used in the UI, why not have the warning be a client side feature? The startup message already doesn't depend on this API...
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.
Moved it to be part of the config. But still generating on the server side: not all warnings can be generated on the client. In any case the GUI client is pretty well tied to the server.
Thing is, now it requires auth so we cannot place it on /setup
. Will consult f2f where to place it.
|
||
export const Warning = (props) => | ||
<div className="warning"> |
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.
<div className="warning"> | |
<Alert variant="warning"> |
webui/src/lib/components/navbar.jsx
Outdated
<TopNavLink href="/repositories">Repositories</TopNavLink> | ||
<TopNavLink href="/auth">Administration</TopNavLink> | ||
</Nav> | ||
<> |
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?
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.
Hysterical raisins. Removed...
webui/src/pages/index.jsx
Outdated
</Route> | ||
</Switch> | ||
</Router> | ||
<> |
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?
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.
Same leftovers.
webui/src/pages/setup/index.jsx
Outdated
@@ -108,4 +126,9 @@ server: | |||
); | |||
}; | |||
|
|||
const SetupPage = () => <> | |||
<SetupWarnings/> |
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 think it looks a little out of place. At a minimum it should be on the same grid as the setup form (above it, below it, idc)
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.
As discussed F2F, anyway moved to:
- "Create repo" dialog
- "Objects" page
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.
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.
webui/src/styles/globals.css
Outdated
@@ -300,6 +300,16 @@ | |||
font-size: 0.85rem; | |||
} | |||
|
|||
.warning { |
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.
let's use the react-bootstrap component (<Alert variant="warning"/>
)
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.
Cool!
5982712
to
8d6f34b
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.
Thanks!
PTAL (commits mostly organized and non-overlapping, you might want to read them one at a time).
cmd/lakefs/cmd/run.go
Outdated
░██ ██░██░██ ███████ ░██ ░ ░██ ░██░██ ░██ ░██░██ ░██░██ | ||
░████ ░░████ ██░░░░██ ░██ ░██ ░██░██ ░██ ░██░░██████░░ | ||
░██░ ░░░██░░████████░███ ███ ░██░██ ███ ░██ ░░░░░██ ██ | ||
░░ ░░ ░░░░░░░░ ░░░ ░░░ ░░ ░░ ░░░ ░░ █████ ░░ |
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.
Done. Let me know if you want a small figlet banner...
docs/assets/js/swagger.yml
Outdated
@@ -2821,3 +2844,20 @@ paths: | |||
$ref: "#/components/schemas/Config" | |||
401: | |||
$ref: "#/components/responses/Unauthorized" | |||
|
|||
/warnings: |
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.
Moved it to be part of the config. But still generating on the server side: not all warnings can be generated on the client. In any case the GUI client is pretty well tied to the server.
Thing is, now it requires auth so we cannot place it on /setup
. Will consult f2f where to place it.
webui/src/lib/components/navbar.jsx
Outdated
<TopNavLink href="/repositories">Repositories</TopNavLink> | ||
<TopNavLink href="/auth">Administration</TopNavLink> | ||
</Nav> | ||
<> |
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.
Hysterical raisins. Removed...
webui/src/pages/index.jsx
Outdated
</Route> | ||
</Switch> | ||
</Router> | ||
<> |
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.
Same leftovers.
webui/src/styles/globals.css
Outdated
@@ -300,6 +300,16 @@ | |||
font-size: 0.85rem; | |||
} | |||
|
|||
.warning { |
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.
Cool!
webui/src/pages/setup/index.jsx
Outdated
@@ -108,4 +126,9 @@ server: | |||
); | |||
}; | |||
|
|||
const SetupPage = () => <> | |||
<SetupWarnings/> |
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.
As discussed F2F, anyway moved to:
- "Create repo" dialog
- "Objects" page
webui/src/pages/setup/index.jsx
Outdated
@@ -108,4 +126,9 @@ server: | |||
); | |||
}; | |||
|
|||
const SetupPage = () => <> | |||
<SetupWarnings/> |
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.
webui/src/pages/setup/index.jsx
Outdated
@@ -108,4 +126,9 @@ server: | |||
); | |||
}; | |||
|
|||
const SetupPage = () => <> | |||
<SetupWarnings/> |
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 pull request introduces 3 alerts when merging 2e843eda4740abcb15d66bb59d72d1eedbc186b3 into 18b9afc - view on LGTM.com new alerts:
|
These are fixed, see new report on LGTM.com. |
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'm worried about incompatible changes with #2056
api/swagger.yml
Outdated
@@ -681,6 +681,11 @@ components: | |||
type: string | |||
blockstore_namespace_ValidityRegex: | |||
type: string | |||
warnings: |
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 kind of conflicts with #2056 - I think we should fold both into a /config/storage
endpoint and forgo the server-side warnings API (for now).
webui/src/styles/globals.css
Outdated
@@ -300,6 +300,11 @@ | |||
font-size: 0.85rem; | |||
} | |||
|
|||
.unmarked-list { |
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.
for classes with no semantic meaning that simply want to apply a simple style, you can use Bootstrap's spacing classes (see https://getbootstrap.com/docs/4.0/utilities/spacing/#examples)
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.
Cool. Done!
e717b32
to
6164ae1
Compare
@ozkatz , I cannot pull this because:
Let's (finally...) close this tomorrow! |
6164ae1
to
fe4dee5
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.
Thanks!
Rebased on top of master
. @ozkatz , PT1FL ("please take one final look")...
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 great! thanks!
Currently only shows warning for using local or mem block storages.
Currently this warns when setting up with local or mem block adapter.
Not a huge banner.
Adding during branch development to add components but never removed.
Also use bootstrap alert warnings
Thanks, LGTM.com!
CSS properties in JSX should be whackyCapped, of course, not thread-cased.
ASI FTL :-(
6da3c48
to
9701ccc
Compare
Thanks! |
These are great for quick setup, but should not be used in production. Warn about it 3 ways:
UI
On the setup page:

Terminal
During startup:
Logs
Also write an error on startup: