Git Product home page Git Product logo

Comments (7)

carolynvs avatar carolynvs commented on July 29, 2024

What is the best practice? I had thought that hard coding the id in scripts was discouraged and that looking up by name first was the way to go...

from rack.

rtgoodwin avatar rtgoodwin commented on July 29, 2024

@carolynvs This rabbit hole goes pretty deep :) We (by which I mean when I was the Servers/Images PM) DID generally discourage hard coding ID's in scripts IF your desire is always to have the latest image regardless of what changes/fixes/iterations we've made to it.

But the reality is that a UUID, being something that is fixed and will never go away (we don't delete old image UUIDs, just hide them from public listing), is what you want if you want an absolute guarantee that nothing has changed in your source image. (In fact Glance essentially enforces that all images, once created, are immutable).

So, then you ask, what is the way to do it if you don't specify the name? We had generally recommended either using the ID and auditing time to time, OR using additional metadata on the image to determine the distro, the version, and the creation date (or some other unique combination). The reality is that Glance doesn't have a great way to make this work out of the box, it requires client side caching, customized parsing, or just plain old user involvement, so I can't claim to offer a specific solution, only some guidance on things that have been proven to cause user issue in the past. I will defer to those teams for the UX they want for their products. Just didn't want to lose track of the concern. :)

from rack.

carolynvs avatar carolynvs commented on July 29, 2024

Thanks @rtgoodwin for the explanation!

from rack.

kenperkins avatar kenperkins commented on July 29, 2024

This is a followup for @rtgoodwin on communicating best practice here, but this doesn't appear to have any direct code ramification on rack.

from rack.

rtgoodwin avatar rtgoodwin commented on July 29, 2024

Bounced to Ari and Amanda for their feedback.

from rack.

rtgoodwin avatar rtgoodwin commented on July 29, 2024

Response from Images team:

"It really depends on what the customer is trying to do. If they always want to be guaranteed the exact same image then they should build via UUID or use a snapshot. Of course, this gives them a static image that will not be updated or patched. If they always want the latest most up-to-date version of their OS they can use the name, but they should be aware that the point release could change out from under them if they’re using RHEL/Cent, or their code could break if we remove their image from the base image list (e.g., removing Ubuntu 15.04 when 15.10 comes out). The best approach varies depending on what OS you’re using. "

So, we'll work it in our docs in conjunction with the Images team.

from rack.

kenperkins avatar kenperkins commented on July 29, 2024

Lets add a note to the docs saying that depending on the name for an image may result in unexpected changes. Images often are updated with security patches that may have the same Name.

from rack.

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.