PTCInc / thingworx-gitbackup-extension

[Unofficial/Not supported] ThingWorx GitBackup Extension for storing your ThingWorx application code in a Git repository
MIT License
25 stars 11 forks source link

How to handle multiple developers? #11

Closed heteneik closed 2 years ago

heteneik commented 3 years ago

Hi @vrosu,

It's more like a question, but do you have any plans to somehow handle multiple developer using a single instance?

vrosu commented 3 years ago

Hi @heteneik , The answer depends on the perspective. If you think purely from an Extension perspective, I would say that the extension will not support such a scenario. I do not believe though the extension itself needs such a concept, because the platform itself will not allow two developers to work and subsequently keep different versions of the same entity in the same instance. You can do magic with names and suffixes, but I believe it's not really manageable. However, if you think from a platform perspective, if your developers work on the same platform and on separate entities, you can have two GitBackup things, each for a developer, both pointing to the same repository, but with different branches checked out. Just to make sure it's clear, this would involve each developer having his own branch setup in the git provider web interface first. Then they would be able to push separately their work - which should involve only the entities they work on, and sometime later when they finish their work, their work will get PR'ed in the feature/main branch.

Let me know if that makes sense .

heteneik commented 3 years ago

Hi @vrosu

Up to a certain point it does make sense yes, but if multiple people working on multiple projects for example, the git configuration is visible to everybody. Independently what they are working on.

Maybe I am missing a point here, but so far what I've seen is that I configured the git extension with my personal stash account the following happens:

On the other hand working on a single project with 2+ designer, even if it does not always efficient it is very much possible and in our case from CI/CD perspective it would be nice to see who did what exactly when they commit their changes.

The only workaround I'm having right now is that we are doing a single weekly commit with the team that is tied to one user and we are reviewing the the changes at once instead of reviewing pull requests.

EDIT: Are you actually talking about duplicating the entire extension for each user?

heteneik commented 3 years ago

Do you have any recommendation as to how to duplicate the extension? Without going and individually duplicate the entities?

vrosu commented 3 years ago

I was not referring to duplicating the extension, but to create a GitBackup Thing per developer. When you setup a GitBackup thing, one thing you will need to do each time is to provide a parameter called FileRepositoryPath: that is the local path in that specific File Repository where all your git folder and corresponding working directory will be stored. If you have two GitBackup things with different folder paths, then you effectively can have two or more GitBackup Things that each correspond to different branches. In terms of having the configuration known for each developer, that is to be expected since you are sharing the same instance, and presumably both in the Administrators group. Users in the Administrators Group have access to see all platform entities.

I just remembered, not sure if you've looked at this, but regardless of the user who is used to access the repository, each user can setup his own committer name and email when pushing a commit to a branch - different to the user setup in the GitBackup configuration. In this way you can have a single GitBackup thing. In this case, the user should be considered a technical user of sorts. The commits will in this case show up with who did them.

vrosu commented 3 years ago

Hi @heteneik . Did you have a chance to look at the message above? If so, can you share your feedback for the community?

Thanks!

heteneik commented 3 years ago

Hello @vrosu, I'm still evaluating the possibilities. What I can tell is that I have a solid process for a single developer / single environment to propagate changes from DEV to PROD, but I am still unsure how safe / usable this is going to be with multiple users using the DEV system. In my opinion if the dashboard / workspace would be tied to a user, that'd be the best, but I understand the complexity that would bring for you to develop it. I'll come back later to finish my thoughts :)