missing Post-initialization hooks for init commands

未关闭
#88 1 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
python

调研方向

首先查看链接的 Python composition-function 指南,并复现其中记录的 crossplane xpkg init 命令。检查生成的 package/crossplane.yaml,并根据 issue 和 Crossplane issue #4941 确定初始化后的预期行为。当初始化不再让模板包名称保持不变,或文档清楚地反映受支持的行为时,即视为完成。

由索引模型根据 Issue 内容生成。

描述

enhancement good first issue help wanted
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

主要语言
Python
星标
21
派生
13
平均合并
3 小时 1 分钟
30 天内合并 PR
1

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

crossplane/function-template-python 的其他 Issue

查看 crossplane/function-template-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。