Skip to content

Clearer variable names #127

Description

@negz

What problem are you facing?

I'm new to KCL, but I'm pretty familiar with Crossplane functions. I'm taking a look at function-kcl for the first time and finding some of the variable names aren't very intuitive.

How could this Function help solve your problem?

Some early thoughts from my first time working with this function:

  • oxr, ocds, etc are great as optional abbreviations but something like observed.composite.resource makes what the variable is a lot clearer. See for example the Python SDK: https://docs.crossplane.io/v1.16/guides/write-a-composition-function-in-python/#edit-the-template-to-add-the-functions-logic
  • I believe updating items updates the desired resources, right? items is a pretty ambiguous name - could it be something that more clearly indicates that it's updating the desired composed resources?
  • I don't think any other function has the concept of params, which if I follow correctly can contain user supplied params from the function's input, but also has the observed XR etc injected into it. Would it make sense to break the "fixed" inputs like the observed XR out into top-level variables, rather than injecting them into the params?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions