Skip to content

Commit c3d2799

Browse files
author
Patrick J. McNerthney
committed
Fix issue when BaseComposite is imported.
1 parent 919fac4 commit c3d2799

7 files changed

Lines changed: 9 additions & 8 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ kind: Function
5757
metadata:
5858
name: function-pythonic
5959
spec:
60-
package: ghcr.io/fortra/function-pythonic:v0.0.9
60+
package: ghcr.io/fortra/function-pythonic:v0.0.10
6161
```
6262
## Composed Resource Dependencies
6363
@@ -362,7 +362,7 @@ metadata:
362362
annotations:
363363
render.crossplane.io/runtime: Development
364364
spec:
365-
package: ghcr.io/fortra/function-pythonic:v0.0.9
365+
package: ghcr.io/fortra/function-pythonic:v0.0.10
366366
```
367367
In one terminal session, run function-pythonic:
368368
```shell
@@ -464,7 +464,7 @@ kind: Function
464464
metadata:
465465
name: function-pythonic
466466
spec:
467-
package: ghcr.io/fortra/function-pythonic:v0.0.9
467+
package: ghcr.io/fortra/function-pythonic:v0.0.10
468468
runtimeConfigRef:
469469
name: function-pythonic
470470
---

crossplane/pythonic/function.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ async def run_function(self, request):
8989
return response
9090
for field in dir(module):
9191
value = getattr(module, field)
92-
if inspect.isclass(value) and issubclass(value, BaseComposite):
92+
if inspect.isclass(value) and issubclass(value, BaseComposite) and value != BaseComposite:
9393
if clazz:
9494
logger.error('Composite script has multiple BaseComposite classes')
9595
crossplane.function.response.fatal(response, 'Composite script has multiple BaseComposite classes')

examples/eks-cluster/functions.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ metadata:
55
annotations:
66
render.crossplane.io/runtime: Development
77
spec:
8-
package: ghcr.io/fortra/function-pythonic:v0.0.9
8+
package: ghcr.io/fortra/function-pythonic:v0.0.10

examples/filing-system/function.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ kind: Function
33
metadata:
44
name: function-pythonic
55
spec:
6-
package: ghcr.io/iciclespider/function-pythonic:v0.0.0-20250811193238-f8d5c82deb9b
6+
package: ghcr.io/fortra/function-pythonic:v0.0.10
77
runtimeConfigRef:
88
apiVersion: pkg.crossplane.io/v1beta1
99
kind: DeploymentRuntimeConfig

examples/helm-copy-secret/functions.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ metadata:
55
annotations:
66
render.crossplane.io/runtime: Development
77
spec:
8-
package: ghcr.io/fortra/function-pythonic:v0.0.9
8+
package: ghcr.io/fortra/function-pythonic:v0.0.10

scripts/setup-local.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ kind: Function
196196
metadata:
197197
name: function-pythonic
198198
spec:
199-
package: ghcr.io/fortra/function-pythonic:v0.0.9
199+
package: ghcr.io/fortra/function-pythonic:v0.0.10
200200
runtimeConfigRef:
201201
apiVersion: pkg.crossplane.io/v1beta1
202202
kind: DeploymentRuntimeConfig

tests/fn_cases/do-nothing.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
request:
22
input:
33
composite: |
4+
from crossplane.pythonic import BaseComposite
45
class DoNothingComposite(BaseComposite):
56
def compose(self):
67
pass

0 commit comments

Comments
 (0)