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

Implement a pulumi logs command #527

Closed
joeduffy opened this issue Nov 4, 2017 · 5 comments
Closed

Implement a pulumi logs command #527

joeduffy opened this issue Nov 4, 2017 · 5 comments
Assignees
Labels
area/cli UX of using the CLI (args, output, logs)
Milestone

Comments

@joeduffy
Copy link
Member

joeduffy commented Nov 4, 2017

We used to have this in the old service CLI, but I think it got lost in translation. This is one of the more important/useful commands for inspecting a live, running stack. We should bring this back "in the right way", using the new cloud.Backend interface.

@joeduffy joeduffy added area/cli UX of using the CLI (args, output, logs) kind/feature labels Nov 4, 2017
@joeduffy joeduffy added this to the 0.9 milestone Nov 4, 2017
@joeduffy
Copy link
Member Author

joeduffy commented Nov 5, 2017

Note that we should make sure this covers many resource types, which I assume requires doubling down on the operations provider and component model work.

As an example, I just spent a bunch of time debugging why a cloud.Service appeared dead and, after I got to the bottom of it, it should have been a "2 minute" pulumi logs thing to figure out why:

[17:10:16 INF] Starting web host
[17:10:18 FTL] Host terminated unexpectedly
System.FormatException: Could not parse the JSON file. Error on line number '33': '"useSSL":
},'. ---> Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: }. Path 'smtp.useSSL', line 33, position 2.
at Newtonsoft.Json.JsonTextReader.ParseValue()
at Newtonsoft.Json.Linq.JContainer.ReadContentFrom(JsonReader r, JsonLoadSettings settings)
at Newtonsoft.Json.Linq.JContainer.ReadTokenFrom(JsonReader reader, JsonLoadSettings options)
at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings)
at Microsoft.Extensions.Configuration.Json.JsonConfigurationFileParser.Parse(Stream input)
at Microsoft.Extensions.Configuration.Json.JsonConfigurationProvider.Load(Stream stream)
--- End of inner exception stack trace ---
at Microsoft.Extensions.Configuration.FileConfigurationProvider.Load(Boolean reload)
at Microsoft.Extensions.Configuration.ConfigurationRoot..ctor(IList`1 providers)
at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build()
at Microsoft.AspNetCore.Hosting.WebHostBuilder.BuildCommonServices(AggregateException& hostingStartupErrors)
at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()
at LearningMachine.CTS.API.Web.Program.Main(String[] args) in /service/CTS/API/API.Web/Program.cs:line 28

In fact, arguably our use of abstraction makes this harder to debug, because the ECS constituent parts like task definitions and the like are completely foreign and only loosely connected to the source Pulumi program.

@lukehoban
Copy link
Member

Big 👍 - @pulumi/cloud is effectively unusable in practice until we support this.

@lindydonna
Copy link

Definitely 👍 as well. This was one of my biggest pain points, as it was really hard to figure out which lambda went with which function in my code.

@ericrudder
Copy link
Member

ericrudder commented Nov 7, 2017 via email

@joeduffy
Copy link
Member Author

joeduffy commented Nov 7, 2017

I think we should take the time to get it right during M9. It would be a shame to do a half-hearted implementation that we need to reimplement and we now know what it takes to "do it right."

@lukehoban lukehoban assigned lukehoban and unassigned ellismg Nov 13, 2017
ellismg added a commit that referenced this issue Nov 14, 2017
This is the smallest possible thing that could work for both the local
development case and the case where we are targeting the Pulumi
Service.

Pulling down the pulumiframework and component packages here is a bit
of a feel bad, but we plan to rework the model soon enough to a
provider model which will remove the need for us to hold on to this
code (and will bring back the factoring where the CLI does not have
baked in knowledge of the Pulumi Cloud Framework).

Partially addresses #527
ellismg added a commit that referenced this issue Nov 14, 2017
This is the smallest possible thing that could work for both the local
development case and the case where we are targeting the Pulumi
Service.

Pulling down the pulumiframework and component packages here is a bit
of a feel bad, but we plan to rework the model soon enough to a
provider model which will remove the need for us to hold on to this
code (and will bring back the factoring where the CLI does not have
baked in knowledge of the Pulumi Cloud Framework).

Fixes #527
ellismg added a commit that referenced this issue Nov 14, 2017
This is the smallest possible thing that could work for both the local
development case and the case where we are targeting the Pulumi
Service.

Pulling down the pulumiframework and component packages here is a bit
of a feel bad, but we plan to rework the model soon enough to a
provider model which will remove the need for us to hold on to this
code (and will bring back the factoring where the CLI does not have
baked in knowledge of the Pulumi Cloud Framework).

Fixes #527
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli UX of using the CLI (args, output, logs)
Projects
None yet
Development

No branches or pull requests

5 participants