Open gadkins opened 2 years ago
bundle exec uffizzi project create --name=test_1 --slug=slug_2 --description=desc_1
returns an error:bash-5.1# bundle exec uffizzi project create --name=test_1 --slug=slug_2 --description=desc_1
bundler: failed to load command: uffizzi (/bundle_cache/ruby/3.0.0/bin/uffizzi)
/gem/lib/uffizzi/clients/api/api_client.rb:32:in `create_project': undefined method `make_post_request' for Uffizzi::HttpClient:Class (NoMethodError)
from /gem/lib/uffizzi/cli/project.rb:72:in `handle_create_command'
from /gem/lib/uffizzi/cli/project.rb:47:in `run'
from /gem/lib/uffizzi/cli/project.rb:30:in `create'
from /bundle_cache/ruby/3.0.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
from /bundle_cache/ruby/3.0.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
from /bundle_cache/ruby/3.0.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
from /bundle_cache/ruby/3.0.0/gems/thor-1.2.1/lib/thor/invocation.rb:116:in `invoke'
from /bundle_cache/ruby/3.0.0/gems/thor-1.2.1/lib/thor.rb:243:in `block in subcommand'
from /bundle_cache/ruby/3.0.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
from /bundle_cache/ruby/3.0.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
from /bundle_cache/ruby/3.0.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
from /gem/lib/uffizzi/cli.rb:70:in `dispatch'
from /bundle_cache/ruby/3.0.0/gems/thor-1.2.1/lib/thor/base.rb:485:in `start'
from /gem/exe/uffizzi:5:in `<top (required)>'
from /bundle_cache/ruby/3.0.0/bin/uffizzi:25:in `load'
from /bundle_cache/ruby/3.0.0/bin/uffizzi:25:in `<top (required)>'
from /usr/local/lib/ruby/3.0.0/bundler/cli/exec.rb:58:in `load'
from /usr/local/lib/ruby/3.0.0/bundler/cli/exec.rb:58:in `kernel_load'
from /usr/local/lib/ruby/3.0.0/bundler/cli/exec.rb:23:in `run'
from /usr/local/lib/ruby/3.0.0/bundler/cli.rb:478:in `exec'
from /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
from /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
from /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
from /usr/local/lib/ruby/3.0.0/bundler/cli.rb:31:in `dispatch'
from /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
from /usr/local/lib/ruby/3.0.0/bundler/cli.rb:25:in `start'
from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.32/libexec/bundle:49:in `block in <top (required)>'
from /usr/local/lib/ruby/3.0.0/bundler/friendly_errors.rb:103:in `with_friendly_errors'
from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.32/libexec/bundle:37:in `<top (required)>'
from /usr/local/bundle/bin/bundle:23:in `load'
from /usr/local/bundle/bin/bundle:23:in `<main>'
bash-5.1#
The error was caused by qa conflicts
@gadkins Hi!
We have some questions:
uffizzi project create
? Both name
and slug
?slug
if the user does not specify it? Like in the UI version of the site?@NealArw Added automatic slug generation in case the slug option is missing
@gadkins Hi!
We add automatic slug generation in case the slug option is missing. I think we need to add this information in the help for the command?
p.s. Slug will be automatically generated in the format like in UI project_name-random_string
TESTED - OK
bash-5.1# bundle exec uffizzi project create --name=test_4 --slug=slug_4 --description=descr_4
Project test_4 was successfully created
bash-5.1# bundle exec uffizzi project create --name=test_5 --description=descr_5
Project test_5 was successfully created
bash-5.1# bundle exec uffizzi project list
test_5-tuffzf
slug_4
test_3-w0sahm
test_2-q8rn7e
test_1-tkrvq
test-lvqkhl
default
bash-5.1#
@NealArw We can add this line:
A URL-compatible name. Do not include whitespaces or special characters. Project slugs must be globally unique across all Uffizzi projects. If a slug is not provided, Uffizzi will automatically generate one.
@moklidia Please, add text from the https://github.com/UffizziCloud/uffizzi_cli/issues/77#issuecomment-1126092884
TESTED - OK
bash-5.1# bundle exec uffizzi project create --name=test_1
Project test_1 was successfully created
bash-5.1# bundle exec uffizzi project list
test_1-c9ccpe
default
bash-5.1# bundle exec uffizzi project create --name=test_2 --slug=test_2_slug
Project test_2 was successfully created
bash-5.1# bundle exec uffizzi project list
test_2_slug
test_1-c9ccpe
default
bash-5.1# bundle exec uffizzi project create --name=test_3 --description=test_3_description
Project test_3 was successfully created
bash-5.1# bundle exec uffizzi project list
test_3-ehubow
test_2_slug
test_1-c9ccpe
default
verified in production
Tell us about your request Implement support for creating projects via
$ uffizzi project create
subcommand.Which service(s) is this request for? uffizzi_cli
Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard? A user or automation (e.g. GitHub Action) should be able to create Uffizzi projects.
Describe the solution you'd like
Are you currently working around the issue? The user must use a single
default
projectAdditional context N/A