Code Monkey home page Code Monkey logo

Comments (6)

jkutner avatar jkutner commented on September 16, 2024 1

Because buildpack.id will be required in in buildpack.toml in v3, and is not used in Heroku's v2, I think the registry can infer schema version by looking for this field. In this way, we can "default" to the lowest version (or really the lowest appropriate major version) as @nebhale suggested a while back.

Curious if others think this is a safe approach.

from spec.

sclevine avatar sclevine commented on September 16, 2024

The schema is in the spec, so we could use a single version number to represent both. E.g.,

version = "v3.0.0-alpha1"

or just:

version = "v3alpha1"

from spec.

jkutner avatar jkutner commented on September 16, 2024

@sclevine when you say "schema is in the spec" do you mean that they should/would be versioned equivalently? Or do you mean there's a already a key in the spec?

I think versioning the schema with the spec is fine. I was probably just being paranoid when I thought of it.

The problem with a version key is that we already have buildpack.version which will be used to version the buildpack itself. My questions then are:

  • Does the compatibility version belong in metadata?
  • Do we need another top level key?
  • Is the compatibility version required?
  • Should the compatibility version be strict?

I've made a life choice not to get involved in version pattern arguments. So I'll leave that part to others :)

from spec.

sclevine avatar sclevine commented on September 16, 2024

Ah, sorry, I meant the schema is defined in a section of the spec, not that the spec already defines a field for the schema version.

Maybe we should version them separately, but then specify all the allowed the schema versions for each file in the spec? Then we won't end up with many different schema versions for a given file that refer to the same schema. It could be useful for defining compatibility between older and newer files when they are used together.

[metadata] was intended for buildpack-specific stuff, and nesting the schema version might make it more difficult to change the structure. Maybe we could use a top-level called field called schema or format? I'm okay with it being required, as long as we can support multiple versions of the files for a given version of the lifecycle/spec.

Format wise, I'm liking @jchesterpivotal's suggestion to use gclouds's API versioning format.

from spec.

jkutner avatar jkutner commented on September 16, 2024

Epiphany: if we bind the schema version to the compatibility version (i.e. the v3 version) then the registry can use this to distinguish v2 and v3 buildpacks.

from spec.

ekcasey avatar ekcasey commented on September 16, 2024

I believe #61 accomplishes the goal stated here. Feel free to reopen if there are any remaining concerns

from spec.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.