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

Process interruption within preview creation #62

Open
7R41N33 opened this issue Apr 12, 2022 · 6 comments · Fixed by #65
Open

Process interruption within preview creation #62

7R41N33 opened this issue Apr 12, 2022 · 6 comments · Fixed by #65

Comments

@7R41N33
Copy link
Contributor

7R41N33 commented Apr 12, 2022

If a cli process stops within a preview creation it gives the following stacktrace:

bash-5.1# bundle exec uffizzi preview create
Preview created with name deployment-31
[✔] Creating containers...
Done
[⠸] Deploying preview...
  [⠙] nginx
  [✔] example-voting-app-vote
  [✔] example-voting-app-result
  [✔] example-voting-app-worker
  [✔] postgres
  [✔] redis
^C/gem/lib/uffizzi/cli/preview.rb:175:in `sleep': Interrupt
	from /gem/lib/uffizzi/cli/preview.rb:175:in `block in wait_containers_deploying'
	from /gem/lib/uffizzi/cli/preview.rb:166:in `loop'
	from /gem/lib/uffizzi/cli/preview.rb:166:in `wait_containers_deploying'
	from /gem/lib/uffizzi/cli/preview.rb:153:in `print_deployment_progress'
	from /gem/lib/uffizzi/cli/preview.rb:117:in `handle_succeed_create_response'
	from /gem/lib/uffizzi/cli/preview.rb:84:in `handle_create_command'
	from /gem/lib/uffizzi/cli/preview.rb:59:in `run'
	from /gem/lib/uffizzi/cli/preview.rb:25: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:69: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>'
@7R41N33 7R41N33 created this issue from a note in Working Project Board (Ready for Development) Apr 12, 2022
@moklidia moklidia moved this from Ready for Development to In Development in Working Project Board Apr 13, 2022
@moklidia moklidia linked a pull request Apr 13, 2022 that will close this issue
@moklidia moklidia moved this from In Development to In QA in Working Project Board Apr 13, 2022
@moklidia
Copy link
Collaborator

  • When a regular command is interrupted, the The command has been interrupted message is shown
  • When a preview creation is interrupted, CLI sends a request to disable the preview. If it was disabled successfully, the user sees the following message:
"The preview creation was interrupted. The preview #{deployment_name} has been disabled"

If it wasn't disabled successfully, the following message is shown:

"The preview creation was interrupted. Couldn't disable the deployment #{deployment_name} - please disable manually."

@NealArw
Copy link

NealArw commented Apr 14, 2022

TESTED - OK

bash-5.1# bundle exec uffizzi preview create -o=json test-compose/uffizzi-compose-webhook-docker.yml
[⠼] Creating containers...The preview creation was interrupted. The preview deployment-17 has been disabled.
bash-5.1# bundle exec uffizzi preview create -o=json test-compose/uffizzi-compose-webhook-docker.yml
[✔] Creating containers...
[⠧] Deploying preview...
  [⠧] webhooks-test-app
^CThe preview creation was interrupted. The preview deployment-18 has been disabled.
bash-5.1#

@NealArw
Copy link

NealArw commented Apr 14, 2022

TESTED - FAILED moved into #74

1.

  • Create preview by the command bundle exec uffizzi preview create -o=json test-compose/uffizzi-compose-webhook-docker.yml
  • Update preview by the command bundle exec uffizzi preview update deployment-14 test-compose/uffizzi-compose-webhook-docker-feature.yml
  • Interrupt uffizzi preview update command

Result:

  • Message The command was interrupted
  • Preview was updated from new compose file

Actual result:

  • Updating was interrupted.
  • Preview was still deployed from the old file.
  • Message, that updating was interrupted.

@NealArw NealArw moved this from In QA to Ready for Development in Working Project Board Apr 14, 2022
@NealArw NealArw moved this from Ready for Development to In QA in Working Project Board Apr 14, 2022
@NealArw
Copy link

NealArw commented Apr 14, 2022

Comment #62 (comment) will be implemented in the separate task #74

@NealArw NealArw moved this from In QA to Code Review in Working Project Board Apr 14, 2022
@7R41N33 7R41N33 moved this from Code Review to Staging in Working Project Board Apr 20, 2022
@7R41N33 7R41N33 moved this from Staging to Ready for Release in Working Project Board May 13, 2022
@7R41N33 7R41N33 moved this from Ready for Release to Released in Working Project Board May 13, 2022
@NealArw
Copy link

NealArw commented May 16, 2022

Do not work on production:

image

@NealArw
Copy link

NealArw commented May 16, 2022

Moved into #98

@NealArw NealArw moved this from Released to Verified on Production in Working Project Board May 16, 2022
@7R41N33 7R41N33 moved this from Verified on Production to Closed in Working Project Board May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

3 participants