Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

versions: Add versions database #114

Merged
merged 1 commit into from
Mar 27, 2018

Conversation

jodh-intel
Copy link
Contributor

Add a YAML format database that is the equivalent of the Clear
Containers versions.txt file [1].

The file defines the versions of important non-golang dependencies used
by this and other Kata repositories particularly for testing and packaging.

Defining all version details centrally in this file avoids duplication
and "bitrot" when versions need to be changed.

[1] - https://github.com/clearcontainers/runtime/blob/master/versions.txt

Fixes #11.

Signed-off-by: James O. D. Hunt james.o.hunt@intel.com

@jodh-intel
Copy link
Contributor Author

jodh-intel commented Mar 23, 2018

This is a "proof-of-concept" for what a YAML version of the Clear Containers versions.txt database might look like.

Note that being YAML:

  • it is structured
  • we can add comments
  • we can also add other details like URL's that are part of the database.
  • built-in handling of structure changes.
    Since it's possible we'll need to change the structure of this file if we do decide to use YAML, it's worth pointing out that YAML has builtin support for references. What this means is that we can redefine the structure of the file, but still keep backwards compatability for "clients" accessing it using yq for example!

Example of retaining compatability

If we started off with this fragment for storing golang details...

golang:
  versions:
    minimum: "1.8.3"
    version: "1.10"

... but then decided we want to move the entire golang block (array) below languages...

# XXX: retained for backwards compat!
golang:
  versions:
    minimum: *golang-versions-minimum
    version: *golang-versions-version

languages:
  golang:
    minimum: &golang-versions-minimum "1.8.3"
    version: &golang-versions-version "1.10"

... you can query the minimum golang version using either of the following queries:

$ yq read versions.yaml languages.golang.minimum
1.8.3
$ yq read versions.yaml golang.versions.minimum
1.8.3

/cc @grahamwhaley, @sboeuf, @jcvenegas, @erick0z, @chavafg, @bergwolf.

versions.yaml Outdated
- All sections *SHOULD* include a description where intent is
not clear.

- WARNING: Gotcha alert! Remember to double-quote all versions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you should double quote every version in this file ? No confusion this way

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call. It might be overkill, but I've gone for the nuclear option - all strings are quoted for maximum safety.

@jodh-intel jodh-intel force-pushed the add-version-database branch from 087a92f to fe1f72b Compare March 23, 2018 20:16
@jodh-intel
Copy link
Contributor Author

Branch updated. The contents of this file is basically verbatim what we had in CC. Although we might need to adjust (or even remove) some values subsequently, there is no harm in merging this.

@jodh-intel jodh-intel changed the title [DNM] versions: Add versions database versions: Add versions database Mar 23, 2018
@jodh-intel jodh-intel force-pushed the add-version-database branch from fe1f72b to 634d544 Compare March 26, 2018 11:55
@jodh-intel
Copy link
Contributor Author

Ping @kata-containers/runtime.

@jcvenegas
Copy link
Member

@jodh-intel this looks great, I wonder if we could generalize the format for all the dependencies and have a template in the comments. If we have an standar format. Then we could use it for our release notes.

<group>:
   description:<>
   <project>:
       url:<URL>
       commit:<commit>
       version:<>
       description:"<>"
       meta:
         <key>: "<val>"

@jodh-intel jodh-intel force-pushed the add-version-database branch from bcc59d4 to 146eca4 Compare March 26, 2018 17:51
@jodh-intel
Copy link
Contributor Author

@jcvenegas - I like it! Branch updated!

hypervisor:
description: "Component used to create virtual machines"

qemu:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sboeuf, @devimc, @erick0z - should this be named qemu-lite dyt? Or would it be better to add something like:

meta:
  variant: "qemu-lite"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@grahamwhaley grahamwhaley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice progression of our formalisation and automation...
lgtm

versions.yaml Outdated
url: "https://github.com/opencontainers/runtime-spec/releases"
version: "v1.0.0-rc5"

# vim:ts=2:expandtab:tw=70
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the vim line does no harm ;-) (and I am a vim user... )

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ick - I'd forgotten that was there - removing!

@jodh-intel jodh-intel force-pushed the add-version-database branch from 146eca4 to 07410aa Compare March 27, 2018 10:28
Add a YAML format database that is the equivalent of the Clear
Containers `versions.txt` file [1].

The file defines the versions of important non-golang dependencies used
by this and other Kata repositories particularly for testing and packaging.

Defining all version details centrally in this file avoids duplication
and "bit-rot" when versions need to be changed.

[1] - https://github.com/clearcontainers/runtime/blob/master/versions.txt

Fixes kata-containers#11.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
@jodh-intel jodh-intel force-pushed the add-version-database branch from 07410aa to a7c7f92 Compare March 27, 2018 10:36
@jodh-intel
Copy link
Contributor Author

Another thought... considering the golang versions and also docker versions (see #92), I wonder if we want to generalise this further and specify two versions for every entry. For example:

golang:
  min-version: "1.8.3"
  max-version: "1.10"

docker:
  min-version: "..."
  max-version: "..."

Iff we do that, we'll have to maintain both those versions though. And that would imply we'd need to test with both versions regularly. It also suggests we could abstract "version" into something like a Revision object:

# Representation of some form of software versions.
# Atleast one of the value must be specified.
!Revision {
  version: "..."
  release: "..."
  commit: "..."
}

We could then define entries like this:

docker:
  min-version: !Revision{version: "1.8.3"}

kernel:
  min-revision: !Revision {version: "v4.14.22-86.container",  release: "19790"}

This might be too much complexity though since the only two entries that currently specify multiple versions are docker (for swarm) and golang (and that meta entry could be dropped).

zklei pushed a commit to zklei/runtime that referenced this pull request Jun 13, 2019
grpc.WithTimeout deprecated. Replace it with DialContext and context.WithTimeout.
Fixes: kata-containers#114
Signed-off-by: Ruidong Cao <caoruidong@huawei.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants