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

Allow Input<T> on most/all input parameters on Service and other APIs #627

Closed
lukehoban opened this issue Oct 18, 2018 · 4 comments
Closed
Assignees
Labels
customer/feedback Feedback from customers kind/enhancement Improvements or new features resolution/wont-fix This issue won't be fixed
Milestone

Comments

@lukehoban
Copy link
Member

A concrete example from a user was the Docker build args parameter to new Service(). The following code doesn't work currently, but we should be able to support this:

export let apiEndpoint = deployment.invokeUrl.apply(url => url + deployment.stageName);

let nginxService = new cloudAws.Service("nginx", {
    containers: {
        nginx: {
            build: {
                context: "./nginx",
                args: {
                    "API_URL": apiEndpoint,
                    "FRONTEND_URL": frontendUrl
                }
            },
            memory: 256,
            ports: [{port: 443, external: true, protocol: "https"}]
        }
    },
    replicas: 3
});
@lukehoban lukehoban modified the milestones: 0.20, 0.19 Oct 18, 2018
@lukehoban lukehoban added the customer/feedback Feedback from customers label Oct 18, 2018
@lukehoban lukehoban modified the milestones: 0.19, 0.20 Nov 16, 2018
@lukehoban
Copy link
Member Author

A other concrete case that a customer ran into - allowing image to be an Input<string> so that it can be composed with new docker.Image(...) more easily.

@lukehoban lukehoban modified the milestones: 0.20, 0.19 Nov 19, 2018
@lukehoban
Copy link
Member Author

This was fixed for image: with #660. We'll tackle others in M20.

@lukehoban lukehoban modified the milestones: 0.19, 0.20 Nov 20, 2018
@lukehoban lukehoban modified the milestones: 0.20, 0.21 Dec 9, 2018
@CyrusNajmabadi
Copy link
Contributor

This is non-trivial currently due to the fact that build-args are used as part of our computation of the repository name we want to generate.

Potential solutions currently are:

  1. remove build-args from repo-name genertion. though this might mean potential collisions of docker builds where the args are different.
  2. allow build-args to be computed, but require the user to supply a repository-name option themselves if they are computed.
  3. Something else?

@lukehoban Any thoughts here on a preferred direction to go? Is there another option you think we could potentially take here?

@CyrusNajmabadi
Copy link
Contributor

Another approach we're taking is simply to remove the cachign layers provided here (i.e. we cache multiple docker builds that have the exact same build comamnd). With the knowledge that this means that consumers that want this sort of non-rebuilding logic would need to pull out that caching themselves.

@lukehoban lukehoban removed this from the 0.21 milestone Jan 28, 2019
@CyrusNajmabadi CyrusNajmabadi removed their assignment Jan 8, 2020
@lukehoban lukehoban added the kind/enhancement Improvements or new features label Jul 24, 2023
@mjeffryes mjeffryes added the resolution/wont-fix This issue won't be fixed label Jun 28, 2024
@mjeffryes mjeffryes self-assigned this Jun 29, 2024
@mjeffryes mjeffryes added this to the 0.107 milestone Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer/feedback Feedback from customers kind/enhancement Improvements or new features resolution/wont-fix This issue won't be fixed
Projects
None yet
Development

No branches or pull requests

3 participants