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

How should we manage platform api versions #525

Open
dwillist opened this issue Feb 11, 2021 · 3 comments
Open

How should we manage platform api versions #525

dwillist opened this issue Feb 11, 2021 · 3 comments
Labels
help wanted Need some extra hands to the this done. status/in-progress type/research Issue intended to be exploratory.

Comments

@dwillist
Copy link
Contributor

Summary

For every new field we add to a functional toml file, we will need to add some logic to do the following:

   if (field is set on previous api-version) {
      - zero out the field
      - warn/fail that data that was written by in old api is now functional
   }

Is there a better way to manage the structs that are used to produce toml so that we don't end up having to repeatedly add the above logic

From discussion on 2/11 here

@dwillist dwillist added status/triage type/bug Something isn't working labels Feb 11, 2021
@natalieparellano natalieparellano added type/chore and removed status/triage type/bug Something isn't working labels Apr 13, 2021
@natalieparellano
Copy link
Member

I think at one point this was leading us to consider potentially writing our own TOML parser (or extending an existing parser) to be API-aware.

The opt-in layer caching PR introduced a wrapper around encoding & decoding for a specific file: https://github.com/buildpacks/lifecycle/tree/a7428a55c2a14d8a37e84285b95dc63192e3264e/buildpack/v05

Probably the way we handle this problem will evolve, and common code should eventually be consolidated in one place. However at this point I'm not sure if there is a specific action to take, other than "this is a code refactor we'd like to do over time".

Thoughts?

@natalieparellano
Copy link
Member

#805 is a first pass at making this more manageable for logic in main / cmd. I plan to put forward a sub-team RFC proposing a lifecycle package organization & services pattern (in the spirit of #800) that could help with the lifecycle package.

@natalieparellano
Copy link
Member

buildpacks/rfcs#217 proposes some ideas for managing this problem.

@natalieparellano natalieparellano added the help wanted Need some extra hands to the this done. label Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Need some extra hands to the this done. status/in-progress type/research Issue intended to be exploratory.
Projects
None yet
Development

No branches or pull requests

2 participants