Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: env management commands #37

Open
wants to merge 25 commits into
base: main
Choose a base branch
from

Conversation

35C4n0r
Copy link

@35C4n0r 35C4n0r commented Nov 24, 2024

Closes #18
/claim #18

@gemanor
Copy link
Collaborator

gemanor commented Nov 25, 2024

@35C4n0r the lint has some errors..

@gemanor
Copy link
Collaborator

gemanor commented Nov 29, 2024

Hey, some functional comments:

  1. When running env select commands, and there's only one workspace or one project, it should skip the selection. For now, even if one project/environment is presented, it let's the user choose between them. Please ensure if there's only one element in a select step, it gets skipped.
  2. In copy command, it is hard to get the env id. We should keep it in the same way we did with other commands. Using the select element. Please use the same SelectEnvironment that allows the user to select the environment they want to copy from a select element. Then, just ask for the name of the new environment and copy it.
  3. In general, this ink-form makes things complex. The default should be copied to a new environment, and the form is just a wizard, the same as we do with other commands. Only in case that --existing argument is passed will the existing ID be asked for and copied.
  4. Also, in the member command, please just use a wizard as we did in the login and such. The form is making the experience complex. If someone want's a form, then they can use it in the UI.

@gemanor
Copy link
Collaborator

gemanor commented Nov 29, 2024

Please merge from main

@gemanor
Copy link
Collaborator

gemanor commented Dec 1, 2024

Hey, @35C4n0r, the copy command does not work for me. Can you please test that?

@35C4n0r
Copy link
Author

35C4n0r commented Dec 1, 2024

@gemanor, pushed a change that fixes the issue, It now handles the case when --env-name is not passed as a cli option

@gemanor
Copy link
Collaborator

gemanor commented Dec 1, 2024

@35C4n0r, the scope is redundnat (just use the default), and the description/strategy should be also in the wizard, not only as variables

@35C4n0r
Copy link
Author

35C4n0r commented Dec 1, 2024

@gemanor done!

@gemanor
Copy link
Collaborator

gemanor commented Dec 2, 2024

The tests are failing now. Also, the success message is missing from the copy command.
Please make sure it is all passed and that you're running sanity tests on all the commands before asking review.

@gemanor
Copy link
Collaborator

gemanor commented Dec 2, 2024

There are also many linting warning. Please ensure you're fixing the useEffect dependencies problems. Just use the standard practices like useCallback/useMemo and pure functions to avoid such.

@35C4n0r
Copy link
Author

35C4n0r commented Dec 2, 2024

@gemanor fixed the error

@35C4n0r
Copy link
Author

35C4n0r commented Dec 2, 2024

As for the warnings, if I don't want something to be the dependency of a useEffect, why should I add it in the dependency array?

@35C4n0r
Copy link
Author

35C4n0r commented Dec 2, 2024

@gemanor, fixed the warnings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Permit Environment Management Commands
2 participants