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

all: add open-by-name functions to all APIs #1174

Closed
zombiezen opened this issue Jan 24, 2019 · 7 comments
Closed

all: add open-by-name functions to all APIs #1174

zombiezen opened this issue Jan 24, 2019 · 7 comments
Assignees
Labels
enhancement New feature or request P1

Comments

@zombiezen
Copy link
Contributor

(This grew out of #931 and is now a larger effort, so opening a bigger-scoped issue.)

A very common use case when developing a portable application is to want to use a local implementation for development and then use the real implementation in production. Commonly, developers don't want to have two different build configurations to do this: they just want to be able to change by command-line flag. Right now, this is difficult to do: every application using Go Cloud would have to develop their own mechanism for specifying which provider resource they want to use. (This would be similar to SQL connection strings, but I think we want to keep credentials explicitly passed.)

I'm going to iterate on the blob URL-opening API, and once that gets to a place we're happy with, then I'd like to duplicate the API for our other portable APIs (pub/sub, secrets, runtimevar, and SQL).

@zombiezen zombiezen added the enhancement New feature or request label Jan 24, 2019
@zombiezen zombiezen self-assigned this Jan 24, 2019
@zombiezen zombiezen added this to the Sprint 22 milestone Jan 24, 2019
@ijt
Copy link
Contributor

ijt commented Jan 25, 2019

Can you give a concrete example of what this would look like in a particular case?

@zombiezen
Copy link
Contributor Author

I do not have a design yet, but #1145 was one iteration of this idea. @ijt, can you be more specific about what information you're aiming to glean?

@ijt
Copy link
Contributor

ijt commented Jan 25, 2019

Right, #1145 looks like a useful example of this.

@ijt
Copy link
Contributor

ijt commented Jan 25, 2019

I didn't have anything specific in mind, just wanted to see an example.

@jba
Copy link
Contributor

jba commented Jan 25, 2019

I'm against doing this now, for several reasons:

  • It's just a convenience feature; it adds no new functionality.
  • No one has asked for it. The only known use is in Hugo, and that is just for blob. (I don't object to blob URLs.)
  • We'll spend a lot of time figuring out how to shoehorn everything into strings, avoiding global registries, and other design issues. (Evidence: we've already done so.) Ross, I think your time is better spent on Go Cloud Init, which has a much higher potential to get us users.
  • It will be a never-ending drag on our productivity. If we do it, then every time we add an option to any provider, we will have to figure out how to destringify it and what the flag/query-param name for it will be, and we'll have to hook it up.

@zombiezen
Copy link
Contributor Author

Unavailability of this feature blocks users who want to create a Twelve-Factor Application (specifically IV. Backing Services). They would need to roll their own solution, which I think would make supporting infrastructure around Go CDK-based applications hard to work with. I think Go CDK having an opinion helps here.

zombiezen added a commit to zombiezen/go-cloud that referenced this issue Jan 29, 2019
zombiezen added a commit to zombiezen/go-cloud that referenced this issue Feb 8, 2019
@vangent
Copy link
Contributor

vangent commented Feb 11, 2019

Per discussions, @zombiezen is doing this for blob, and @shantuo will do it for runtimevar, secrets, pubsub.

@vangent vangent added in progress This is being actively worked on P1 labels Feb 27, 2019
@vangent vangent removed this from the Sprint 23 milestone Mar 1, 2019
@go-cloud-bot go-cloud-bot bot removed the in progress This is being actively worked on label Mar 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P1
Projects
None yet
Development

No branches or pull requests

5 participants