Skip to content
This repository was archived by the owner on Jan 17, 2020. It is now read-only.

Adds metastore endpoints#65

Merged
kritzcreek merged 8 commits into
slamdata:masterfrom
kritzcreek:metastore-endpoints
Sep 28, 2017
Merged

Adds metastore endpoints#65
kritzcreek merged 8 commits into
slamdata:masterfrom
kritzcreek:metastore-endpoints

Conversation

@kritzcreek
Copy link
Copy Markdown
Contributor

@kritzcreek kritzcreek commented Aug 11, 2017

Also renders URLs through purescript-uri instead of munging together strings

I can't figure out how to make the tests go locally, so I hope they work on Travis

, permissions ∷ Array TokenHash
| r
}
type Config r = QuasarF.Config ( idToken ∷ Maybe IdToken, permissions ∷ Array TokenHash | r )
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is a question, what happened to basePath, I saw you put all this into one place from QuasarAF/Interpreter/Aff.purs which makes sense but then didn't understand if basePath was still needed 😄

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

from Quasar.QuasarF.Interpreter.Config:

type Config r = { basePath ∷ BasePath | r }

so we're just extending that here, which means we still have the basePath.

Copy link
Copy Markdown
Member

@garyb garyb left a comment

Choose a reason for hiding this comment

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

The only thing I think that actually needs changing here is the additions to Quasar.Advanced.QuasarAF, but I left a few other points for possible discussion.

Comment thread src/Quasar/Metastore.purs
show = case _ of
H2Metastore s → "(H2Metastore " <> show s <> ")"
PostgresMetastore { host, port, database } →
"(PostgresMetastore { host: " <> show host <> ", port: " <> show port <> ", database: " <> show database <> "})"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could derive generic and then show for this? I've been moving towards that in here, since show instances are the worst. 😄

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Oh, I guess not because of the extensible row.

Comment thread src/Quasar/Metastore.purs
~> "password" := password
~> jsonEmptyObject
)
~> jsonEmptyObject
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we use the codec stuff for this, or is it inconvenient to get the exact format without resorting to basicCodec anyway or something?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Again, I see, it's two different codecs because of the extensible row.

Comment thread src/Quasar/Mount/View.purs Outdated
toJSON ∷ Config → Json
toJSON config =
let uri = URI.printAbsoluteURI (toURI config)
let (uri ∷ String) = AbsoluteURI.print (toURI config)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is the annotation necessary here? I thought AbsoluteURI.print was monomorphic.

Comment thread src/Quasar/QuasarF.purs
putMetastore
∷ { initialize ∷ Boolean, metastore ∷ Metastore (password ∷ String) }
→ QuasarFE Unit
putMetastore ms = PutMetastore ms id
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should add the appropriate versions of these in Quasar.Advanced.QuasarAF too.

@kritzcreek
Copy link
Copy Markdown
Contributor Author

I think I addressed your feedback. We might want to coordinate merging and releasing this, since it requires everything in slamdata to be compatible with purescript-uri 4.0.0.

(for example: slamdata/purescript-leafletjs#5)

@kritzcreek
Copy link
Copy Markdown
Contributor Author

Btw, does this need changing with regards to https://github.com/quasar-analytics/quasar/pull/2767/files?

@garyb
Copy link
Copy Markdown
Member

garyb commented Sep 15, 2017

Hmm, good point. Have you tried using it / can we add a test case for it perhaps?

@garyb garyb removed the blocked label Sep 28, 2017
@kritzcreek kritzcreek merged commit af9478e into slamdata:master Sep 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants