Open namkyu1999 opened 1 year ago
Hi @namkyu1999 what is the input you tried to give for environment name? currently we are moving towards human readable IDs
Hi @Saranya-jena , If user enters an environment id that already exists, it would be nice to have a popup that says "This id already exists". Currently, we can only see the error log in the console window without any further action.
Also, since we already have a human-readable name for each environment, is there any reason why the id should also be human readable? This is just a question.
@namkyu1999 @Saranya-jena, Can we adjust the unique constraint for environmentID
. Instead of enforcing global uniqueness, could we consider making it unique per project? MongoDB offers support for unique indexes spanning multiple columns, as detailed here: https://www.mongodb.com/docs/manual/core/index-unique/. Beyond database constraints, I'm wondering if any logic adjustments are necessary to accommodate this change?
Purely from a UX perspective, the current setup might lead to confusion when users attempt to create environments and encounter errors due to conflicting IDs, especially if they're unaware of other projects (they might not have access to all projects).
Let me know your thoughts
I believe the same thing can apply to probes https://github.com/litmuschaos/litmus/blob/master/chaoscenter/graphql/server/pkg/database/mongodb/init.go#L277-L283.
Sounds to be a good suggestion @smitthakkar96 , will make the resources unique across projects. Please let us know if you would like to contribute to this.
Question
In Litmus 3.0, The environment name and ID are the same.
Updating the environment name does not change the environment ID. This can cause problems when users try to create a new environment with the old name. Is there a reason to use environment names instead of UUIDs in env id?