Git Product home page Git Product logo

Comments (10)

jorgemoralespou avatar jorgemoralespou commented on May 30, 2024

Still relevant. I can help with design, not with code, since now in Ruby :-P

from workshopper.

marekjelen avatar marekjelen commented on May 30, 2024

To enable this feature variable DYNAMIC_USER_NAME has to be defined.

User name will be USER_NAME variable suffixed with an auto-incrementing number.

If NUM_USERS variable is provided, the system will throw error when the generated number reaches the limit.

Password is static defined through the USER_PASSWORD variable.

from workshopper.

jorgemoralespou avatar jorgemoralespou commented on May 30, 2024

I would rather get these values in new variables, and make it possible to reassign to the existing ones.

Something like:
DYNAMIC_USER_NAME=user%02d (format for the number)

The previous format would allow to have the number formatted to 2 digits, 3 digits, ... depending on the size of the workshop.

And then, in the regular vars for the workshop, we could use, re-assignment:
USER_NAME={{DYNAMIC_USER_NAME}}

PASSWORD for the time being, as it's being static, would be possible kept as it is.

These would prevent breaking changes when the option is activated.

from workshopper.

marekjelen avatar marekjelen commented on May 30, 2024

I like the idea with formatting, and IMHO OK to enforce it, so that

if DYNAMIC_USER_NAME is defined then USER_NAME is going to behave as a template as per

https://ruby-doc.org/core-2.5.0/Kernel.html#method-i-sprintf

with one argument being passed in.

from workshopper.

siamaksade avatar siamaksade commented on May 30, 2024

DYNAMIC_USER_NAME var would be both the format for generating usernames and also the generated username?

Why do we need to cap the number of usernames generated?

from workshopper.

marekjelen avatar marekjelen commented on May 30, 2024

DYNAMIC_USER_NAME is just a marker to enable the behaviour

USER_NAME has the format

You do not have to, if NUM_USERS is not provided or is 0 then it will go till it OOMs.

from workshopper.

siamaksade avatar siamaksade commented on May 30, 2024

I don't think NUM_USERS is needed to be implemented. It should just act as a counter. How many users are available is not really relevant to workshopper.

Would that be implemented using an embedded db?

from workshopper.

marekjelen avatar marekjelen commented on May 30, 2024

@siamaksade we already have it, have just reused it.

https://github.com/openshift-labs/starter-guides/blob/master/_modules.yml#L27

from workshopper.

marekjelen avatar marekjelen commented on May 30, 2024

what's the state on this @siamaksade @jorgemoralespou ?

from workshopper.

jorgemoralespou avatar jorgemoralespou commented on May 30, 2024

@marekjelen, what do you mean? If this is still relevant? Yes. If there's been test? No, but if it's testable I'll go ahead and give feedback

from workshopper.

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.