ZupIT / ritchie-cli

Ritchie CLI is an open-source tool that allows to create, store and share any kind of automation, executing them through command lines, to run operations or start workflows βš™οΈ πŸ–₯ πŸ’‘
https://docs.ritchiecli.io
Apache License 2.0
560 stars 104 forks source link

Some feedback about Workspaces and updating repositories with new formulas #901

Closed theffc closed 3 years ago

theffc commented 3 years ago

Hey guys, I don't know exactly if this is a problem, or if I just misunderstood some commands, or if I couldn't find the right topic in the documentation. And so, I will try to describe what I wanted to do and how I approached it, so you can see if it makes sense and how to better handle similar cases πŸ˜…

Use case

I needed to add a new formula to an already created repository containing other formulas. Since the repository was not created by me, my machine didn't have the behavior of being able to locally edit my new formula while Ritchie automatically watches for those changes.

Approach

I tried to search in the documentation what I could possibly do to have that behavior, and I tried out 3 approaches for this, but they didn't actually solve the problem:

These 3 approaches seemed to be recommended by the docs, and since I thought neither worked out as expected, I decided to search for all available core commands. That was when I discovered rit add workspace, but unfortunately I couldn't get exactly what it does from reading the docs, or by using rit add workspace --help. Even so, I decided to try it out and it seems to be working like I wanted. I have experiencing some problems when I make specific changes (like renaming files, adding or removing files), but it can be solved by deleting and adding the workspace again.

Suggestions (if this use case makes sense)

As I said, I don't even know if I used the correct commands or if my use case is something important, and I have just started using Ritchie. That being said, the following suggestions could make sense and I could help implementing some of them:

Environment:

PS: sorry for this long text and thanks for your attention

GuillaumeFalourd commented 3 years ago

Hi @theffc , thank you for opening this ISSUE and for your feedback, it's very valuable to us! πŸš€

You're right, the documentation isn't clear about the workspaces features. We'll correct it asap.

Furthermore, it is a recent feature that still needs to be improved.

Regarding what you explained, currently the process as we see it should be like this:

Commands for repos and workspaces are similars, both will allow the CLI to "see" the formulas available. Workspaces basically just have a higher priority than Repos (if you uses both commands for the same formulas repositories, the workspaces formulas will be executed).

Observation: We still don't have a command to update workspaces, therefore to do it if the cloned repo is updated from a git tool, you currently have to delete the workspace and add it again.

henriquemoraeszup commented 3 years ago

Hey @theffc, thanks for the insight, we have been discussing for a while about unifying repos and workspaces to make it more clear. But Guillaume pretty much covered it up:

Nevertheless, we should update our documentation explaining this

theffc commented 3 years ago

Hey, thanks for the responses! I'm glad my approach was actually appropriate, and now I feel more comfortable with it πŸ˜… Also, if you need something else, just reach out πŸ‘

theffc commented 3 years ago

Oh, and I really liked the way @GuillaumeFalourd stated different use cases with questions (e.g: "want to execute a formula from a repository?") πŸ‘ Maybe that would actually be good questions to have in the documentation FAQ or somewhere else

henriquemoraeszup commented 3 years ago

Added documentation on the docs project https://github.com/ZupIT/docs-ritchie/pull/60

GuillaumeFalourd commented 3 years ago

I'm closing this ISSUE as a section about workspaces has been added to the documentation (the new one using Hugo, that will soon be online) in this PR: https://github.com/ZupIT/docs-ritchie/pull/88/files