Coder Social home page Coder Social logo

Allow dynamic selection of image about imagr HOT 12 CLOSED

imagr avatar imagr commented on July 18, 2024
Allow dynamic selection of image

from imagr.

Comments (12)

keeleysam avatar keeleysam commented on July 18, 2024

I think this could be broadened a bit to allow dynamic selection of any workflow.

DeployStudio does this by assigning each workflow a UUID, so you can have a workflow item which selects other (optionally hidden) workflows by running a script which outputs the UUID.

This could be useful for additional conditionals, and even optionally skipping imaging if you can test a volume to see if it is clean.

from imagr.

groob avatar groob commented on July 18, 2024

Assigning a UUID to each workflow also has the benefit of allowing third party tools to manage each workflow in imagr_config.plist independently of each other.

I do this server side in imagr-server to manage and store workflows as separate files.
Adding UUIDs to imagr_config.plist would be a good change, but it will probably break compatibility with current versions.

from imagr.

gregneagle avatar gregneagle commented on July 18, 2024

Adding new keys to a plist should not affect older software that is not expecting those keys; they would just be ignored.

from imagr.

grahamgilbert avatar grahamgilbert commented on July 18, 2024

I'm not too bothered about breaking existing functionality - the admin should update their NBI before implementing new features in their config plist. Anyway, I'm open to ideas about this. I'm not able to work on Imagr for the next month or so, but I'll happily merge in a PR that implements this.

from imagr.

grahamgilbert avatar grahamgilbert commented on July 18, 2024

Now included workflows are in, the next step is to extend that to allow for a script to determine the workflow name.

from imagr.

groob avatar groob commented on July 18, 2024

@grahamgilbert I see that a default workflow key was added in #114. The key uses the workflow name, making the requirement that names must be unique. It's not a problem, but also not ideal.

Before workflows-in-workflows are a stable release, would it be possible to make workflow reference other workflows use a UUID rather than a name?

from imagr.

grahamgilbert avatar grahamgilbert commented on July 18, 2024

UUIDs aren't going to happen. The requirement always has been that workflow names are unique. I see no benefit of introducing this additional complexity when you can just make workflow names unique. Why is it not ideal?

from imagr.

groob avatar groob commented on July 18, 2024

Even if names are unique, renaming a workflow will require changing the name everywhere it is referenced.

UUID's are a better solution because they allow for additional tooling and make references to other workflows/objects easier to write.

from imagr.

grahamgilbert avatar grahamgilbert commented on July 18, 2024

Even if names are unique, renaming a workflow will require changing the name everywhere it is referenced.

Search and replace in a text editor?

UUID's are a better solution because they allow for additional tooling and make references to other workflows/objects easier to write.

What? How? Convince me! This is significant work, so I'm not going to do it unless I'm convinced.

from imagr.

gregneagle avatar gregneagle commented on July 18, 2024

UUIDs would actually make things harder for people manually creating/editing their workflow plists as UUIDs aren't terribly human-friendly. I only need to know your name is "Victor", I don't need to know your Social Security Number as well in order to refer to you here.

With a dedicated workflow plist editor, separating the "human-readable name" from a "unique identifier" would have benefits, but I definitely understand Graham's reluctance to implement them without more convincing of the need.

from imagr.

groob avatar groob commented on July 18, 2024

I agree that if someone will be editing the imagr_config.plist file by hand, then using names is more user friendly.
Where I see UUIDs as important is supporting tools and addons on top of imagr - like a workflow editor.
It's not so hard to imagine given Imagr's quick adoption in the community, that someone will want to create a GUI or WebUI on top of editing workflows.

I agree that it's a lot of upfront work to do. I also see this as an inevitable change that someone will have to make in the future. Unfortunately, I don't have the bandwidth to create a PR for the UUID feature right now, so I'll stop arguing for it, but maybe someone else is interested.

from imagr.

grahamgilbert avatar grahamgilbert commented on July 18, 2024

We've got this now with the ability to select an included workflow based on the output of a script. WIN

from imagr.

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.