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

missing Post-initialization hooks for init commands #88

Open
iomarcovalente opened this issue Oct 2, 2024 · 1 comment
Open

missing Post-initialization hooks for init commands #88

iomarcovalente opened this issue Oct 2, 2024 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@iomarcovalente
Copy link

iomarcovalente commented Oct 2, 2024

What problem are you facing?

as per the docs: https://docs.crossplane.io/latest/guides/write-a-composition-function-in-python/
and the tip, which I quote:

In v1.14 of the Crossplane CLI crossplane xpkg init just clones a template GitHub repository. A future CLI release will automate tasks like replacing the template name with the new function’s name. See Crossplane issue #4941 for details.

It would be ideal if this repo would provide scaffolding mechanism so that developers don't need to manually change parameters (package’s name is one) after the templated repo has been cloned.

Alternatively if this has been fixed already I guess the tip need to be removed from the docs and it should work via cli as I am using

ζ crossplane version                                                                                                                                                   
Client Version: v1.17.1
Server Version: v1.17.1-up.1

and it doesn't work when creating a new function command:

ζ crossplane xpkg init function-pop https://github.com/crossplane/function-template-python -d function-pop                                                                                
Initialized package "function-pop" in directory "/Users/huh/Documents/sandbox/crossplane/function-pop" from https://github.com/crossplane/function-template-python/tree/88ae9b958787096fc72415217807ad4cf6515ec6 (main)
ζ cat function-pop/package/crossplane.yaml                                                                                                                                               
---
apiVersion: meta.pkg.crossplane.io/v1beta1
kind: Function
metadata:
  name: function-template-python
spec: {}

How could this Function help solve your problem?

To improve developer experience and eventually prevent people from falling in a rabbit hole as the documentation link points at an issue that has been seemingly been solved but no clear resolution can be deducted from that

@iomarcovalente iomarcovalente added the enhancement New feature or request label Oct 2, 2024
@negz
Copy link
Member

negz commented Oct 10, 2024

I think we just need to add an init.sh to this repo, e.g.:

https://github.com/crossplane/function-template-go/blob/b6b56a69d16f10d63b93c260445167a1b3fc846a/init.sh

The docs are also out-of-date - this functionality was added in Crossplane v1.15.

@negz negz added good first issue Good for newcomers help wanted Extra attention is needed labels Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants