-
Notifications
You must be signed in to change notification settings - Fork 3
Fix division by zero in Docker image upload progress callback #735
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
Conversation
…ss callback Co-authored-by: cdalar <62673+cdalar@users.noreply.github.com>
|
|
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
* feat: add guidelines for onctl CLI development and enhance command structure - Introduced development guidelines in `onctl-development.md` for Go best practices, error handling, testing, and CLI design patterns. - Updated `AGENTS.md` to include the new guidelines. - Enhanced `create`, `destroy`, `list`, `ssh`, and `vm` commands by registering them at the root level for easier access. - Implemented `deploy` command for deploying Docker images to remote VMs with progress tracking and architecture compatibility checks. - Improved error handling and logging in various commands and internal functions. - Added support for environment management with `env` command, allowing creation and destruction of environments from template files. * feat: enhance Docker image deployment process with Docker Hub checks and architecture validation * feat: add linting target to Makefile and improve error handling in commands * Update cmd/list.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix: correct typo in output flag usage and improve error handling in remote session closure * test: add comprehensive tests for deploy, env, AWS provider, and SCP functionalities * test: improve image sorting tests and handle nil creation dates gracefully * feat: add initial golangci-lint configuration for staticcheck * fix: correct version formatting in golangci-lint configuration * fix: improve error handling in SSH connection passphrase and private key parsing * Update internal/provideraws/common.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix publicIP * feat: add NSG client and implement NSG creation in Azure provider * Initial plan (#736) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> * Fix division by zero in Docker image upload progress callback (#735) * Initial plan * fix: add guard condition to prevent division by zero in upload progress callback Co-authored-by: cdalar <62673+cdalar@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: cdalar <62673+cdalar@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: cdalar <62673+cdalar@users.noreply.github.com>
Addresses review feedback on PR #732 regarding potential division by zero when uploading empty Docker images.
Changes
progressCallbackto return early whentotal == 0float64(current) / float64(total) * 100and progress bar width computationThe callback silently skips progress updates for zero-byte files rather than crashing.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.