question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deploy with attribute

See original GitHub issue

To deploy with pure command line argument is not convenient. I think we should have ability to just specified attribute to function we want to deployed and deploy command would just use reflection to specified other arguments

Instead of

gcloud functions deploy configuration-example \
  --runtime dotnet3 \
  --trigger-http \
  --allow-unauthenticated \
  --entry-point Google.Cloud.Functions.Examples.Configuration.Function

I wish we could just

namespace Google.Cloud.Functions.Examples.Configuration
{
    public class Function : IHttpFunction
    {
        private readonly DatabaseService _database;

        public Function(DatabaseService database) =>
            _database = database;

        [HttpTrigger("configuration-example",null,null)] // member and role as last two argument, be null for --allow-unauthenticated
        public async Task HandleAsync(HttpContext context)
        {
            await context.Response.WriteAsync($"Retrieving data from instance '{_database.Instance}', database '{_database.Database}'");
        }
    }
}

then

gcloud functions deploy --runtime dotnet3 \
  --entry-point Google.Cloud.Functions.Examples.Configuration.Function

And we could just drop entry point to deploy the whole file with every function specified in that file

gcloud functions deploy --runtime dotnet3

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jskeetcommented, Sep 10, 2020

I think it would be clearer to rewrite it in a non-dotnet-specific way to start with. Bear in mind that many of the readers of issues in that repo won’t have any .NET experience, so may not understand the example… whereas if you write it up in a technology-neutral way, I think it will be a far better feature request.

1reaction
jskeetcommented, Sep 10, 2020

(Sorry, the reopening was inadvertent - I still believe that raising an issue in https://github.com/GoogleCloudPlatform/functions-framework is a better approach.)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Deployment attribute groups and situations
You can use these attribute groups to create situations that notify you in the event of a failure or exceptional circumstance related to...
Read more >
Stack Configuration and Deployment Attributes
The stack configuration and deployment attributes are installed on every instance and can be accessed by recipes.
Read more >
Force attribute to deploy
The attribute to be forced in the deployment. Both parameters must be typed within double quotation marks. DO NOT use variables as parameters....
Read more >
How to Use the autoDeploy Attribute in Apache Tomcat ...
How to Use the autoDeploy Attribute in Apache Tomcat (Windows) · Open a text editor session on CATALINA_BASE/conf/server.xml ,e.g., c:/Tomcat8/conf/server.xml .
Read more >
App manifest attribute reference
This topic describes manifest formatting and provides a list of attributes available for app manifests. You can use it with Deploying with app ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found