crossplane-contrib / crossplane-contrib/function-go-templating
ExtraResources kind does not produce any debugging info during run
- Dominant language
- Go
- Stars
- 100
- Forks
- 65
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 9
Description
### What happened?
Debug output is not being provided for ExtraResources kind
### How can we reproduce it?
```
mode: Pipeline
pipeline:
- step: pull-extra-resources-gotemplate
functionRef:
name: function-go-templating
input:
apiVersion: meta.gotemplating.fn.crossplane.io/v1alpha1
kind: ExtraResources
requirements:
some-foo-by-name:
# Resources can be requested either by name
apiVersion: example.com/v1beta1
kind: Pod
matchName: "some-extra-foo"
some-foo-by-labels:
# Or by label.
apiVersion: example.com/v1beta1
kind: API
matchLabels:
claim-namespace: crossplane-demo
```
Function config
```
apiVersion: pkg.crossplane.io/v1
kind: Function
metadata:
name: function-go-templating
spec:
package: .../crossplane-contrib/function-go-templating:v0.10.0
runtimeConfigRef:
name: enable-debug-function
---
apiVersion: pkg.crossplane.io/v1beta1
kind: DeploymentRuntimeConfig
metadata:
name: enable-debug-function
spec:
deploymentTemplate:
spec:
selector: {}
template:
spec:
containers:
- name: package-runtime
args:
- --debug
```
Output of function does not produce any debug information
```
2025-05-21T17:29:59.777Z INFO fn/fn.go:56 Running Function {"tag": ""}
2025-05-21T17:30:29.702Z INFO fn/fn.go:56 Running Function {"tag": ""}
2025-05-21T17:30:29.728Z INFO fn/fn.go:56 Running Function {"tag": ""}
2025-05-21T17:30:29.750Z INFO fn/fn.go:56 Running Function {"tag": ""}
2025-05-21T17:30:59.727Z INFO fn/fn.go:56 Running Function {"tag": ""}
2025-05-21T17:31:29.739Z INFO fn/fn.go:56 Running Function {"tag": ""}
2025-05-21T17:31:59.752Z INFO fn/fn.go:56 Running Function {"tag": ""}
```
### What environment did it happen in?
Function version: 0.10.0
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the issue with the ExtraResources example and the DeploymentRuntimeConfig that passes --debug. Start by tracing ExtraResources processing and the function's debug logging, then compare the emitted logs with the expected debugging information. Done means ExtraResources runs produce useful debug output when debug mode is enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100