Closed jemrobinson closed 4 months ago
@jemrobinson I'll take a look.
Do you know how this happens? The Pulumi output is being routed through our logger?
In ProjectManager
there are a couple of configurable things:
pulumi_extra_args
we make Pulumi really verbose if DEBUG logging is enableddestroy
, update
etc. commands we set on_output=self.logger.info
and color="always"
: we may not want these settingsThat makes sense, I think I might understand what is happening now.
Changing those should give us some options. We could,
I suppose the questions are,
hatch
will call pip
, does that information get captured in hatch logs or pip logs?I recommend against sending the Pulumi output to debug. I know it can be quite verbose, but it's also the only output that we produce for quite a long time (maybe 20-30 mins) and if there's nothing being printed to screen during that time I worry that users will think that the code has failed. Unless you can think of another way to indicate progress without using the Pulumi output?
This is happening because our default log level is NOTSET. Changing it to INFO or WARNING will reduce the verbosity.
IIRC, if you run with -vvv then you see the pip output in the hatch logs
Pulumi output already contains ANSI escape sequences. We may need to pre-process to get Rich to handle these correctly. Should be possible to do by changing the call to self.logger.info
to self.logger.process_pulumi
or some similar function.
I think we should send the default Pulumi output to INFO and the verbose output to DEBUG. If we can't separate the streams like this then do what we previously did (at default log-level send to INFO and at verbose log-level send to DEBUG).
:white_check_mark: Checklist
:strawberry: Suggested change
Since the recent logging changes in #1936, the output from Pulumi is (a) extremely verbose and (b) full of unescaped ANSI codes. This should be fixed.
<details
:steam_locomotive: How could this be done?