crossplane / upjet

A code generation framework and runtime for Crossplane providers
Apache License 2.0
296 stars 86 forks source link

Prevent resource skip-list relevant messages from appearing in the provider logs #81

Closed ulucinar closed 2 years ago

ulucinar commented 2 years ago

What problem are you facing?

We are employing a list to skip a set of Terraform resources in our various code generation pipelines. And relevant messages appear in the provider logs as we also load the resource configuration at runtime. This may be confusing for customers (as I would say it's our implementation detail, what's important is the set of CRDs (managed resources) available in our documentation): As reported by @luebken:

$ kubectl logs -n upbound-system
provider-aws-72c9a31335c5-54976c54d6-p45t7
Skipping resource aws_iam_role_policy because it is in SkipList
....

How could Terrajet help solve your problem?

We can prevent the relevant messages in the provider logs but keep them in the generator logs.

negz commented 2 years ago

My two cents: anything that would be useful in helping a developer debug these providers should be logged at debug level (such that it only shows up when the --debug flag is provided). I think it's fair game for things end users might not understand (like this) to show up there. It definitely shouldn't be logged by default / at info though.