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

Provide Library Metadata #588

Open
cari-lynn opened this issue Jan 18, 2022 · 1 comment
Open

Provide Library Metadata #588

cari-lynn opened this issue Jan 18, 2022 · 1 comment
Labels
enhancement This issue is a feature request priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.

Comments

@cari-lynn
Copy link
Contributor

cari-lynn commented Jan 18, 2022

Use cases

  • Using the feature to inspect data values schema as OpenAPIv3 schema I want to provide the info metadata such as version and title of the schema. (Currently these are populated with basic default values) Issue: Generate OpenAPI info from annotation #539
  • As a ytt library maintainer, I want to provide metadata to consumers of the library. (eg: Package name, version) So they may verify a minimum version is used or include the metadata in the output.
  • Add your use case ⬇️

Describe the solution you'd like
I want a way to provide metadata for a library. This could be through an annotation:
#@schema/library-title "spellchecker" or
#@library/metadata {'title': 'spellchecker', 'version': '0.2.0'} or
#@schema/info {'title': 'spellchecker', 'version': '0.2.0'}

or through a flag:
--library-meta title=spellchecker

Anything else you would like to add:
We don't currently have any library metadata features except for the version module.
This could belong in the same file as the minimum required version. These two concepts both belong to the concept of a library.
version.require_at_least("0.26.0")

🤔 A consideration is how this would play with kapp-controller Packages which are often used with ytt, and have a concept of metadata and versions. Is there a way to ensure the same version of a ytt library and a package? Do these two things need distinct metadata?

🤔 What do other languages/programs use to provide metadata? Some things that come to mind are go.mod, helm, java, or goland..


Vote on this request

This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.

👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"

We are also happy to receive and review Pull Requests if you want to help working on this issue.

@cari-lynn cari-lynn added enhancement This issue is a feature request carvel triage This issue has not yet been triaged for relevance priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. and removed carvel triage This issue has not yet been triaged for relevance labels Jan 18, 2022
@pivotaljohn
Copy link
Contributor

Another approach is to capture this library-wide information in a fixed-named configuration file:

.ytt-info

---
name: spell-checker
description: Checks yer spelling
version: 0.0.1
minimum_ytt: 0.38.0
deprecated: false

ytt looks for an loads this file as a part of building a workspace.Library and checks the current version.Version a la:

https://github.com/vmware-tanzu/carvel-ytt/blob/9cc6a8b8bbf979a8980c4764d42b63e544f2a045/pkg/yttlibrary/version.go#L61

@aaronshurley aaronshurley moved this to To Triage in Carvel Aug 18, 2022
@pivotaljohn pivotaljohn moved this from To Triage to Unprioritized in Carvel Sep 27, 2022
@github-project-automation github-project-automation bot moved this to To Triage in Carvel Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This issue is a feature request priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
Status: To Triage
Development

No branches or pull requests

2 participants