-
Notifications
You must be signed in to change notification settings - Fork 18
Fix/golang with tsuru yaml #13
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
Update post_deploy to only copy default Procfile if neither Procfile nor tsuru.yml/yaml exist in CURRENT_DIR. Adjust formatting for diff output and case statement for clarity and consistency.
Refactor os_dependencies to use keyrings for APT repositories, replacing the deprecated apt-key with gpg and signed-by options. Improve repository and PPA handling for security and maintainability. Expand and clarify BATS tests to cover deb, deb-src, ppa, and ppa with fingerprint scenarios, ensuring robust verification of sources and keyrings.
Replace the pogo-dev PPA with the graphics-drivers PPA in the test for adding extra APT repositories from repositories.apt. The new PPA is widely available and maintained across Ubuntu 20.04, 22.04, 24.04, and latest, ensuring better reliability and compatibility for CI runs.
Refactor post_deploy to better determine when to copy the default Procfile. Now, if a Procfile is missing, the script checks for a tsuru.yml or tsuru.yaml file and inspects it for a valid 'processes' section with at least one process definition (both 'name' and 'command'). Only if no such process is found does it copy the default Procfile. This prevents unnecessary Procfile creation when the tsuru config already defines processes.
Add BATS tests to verify that the default Procfile is copied when `tsuru.yml` does not define processes, and not copied when processes are defined in `tsuru.yaml`. This ensures correct Procfile handling during deployment.
morpheu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes Golang deployment compatibility with tsuru.yml configuration files by improving the logic for determining when to use default Procfiles and updating APT repository management to use modern GPG key handling.
- Enhanced post-deploy logic to check for process definitions in both tsuru.yml and tsuru.yaml files before using default Procfile
- Modernized APT repository key management by replacing deprecated apt-key with gpg keyring management
- Improved test coverage for various APT repository formats and tsuru configuration scenarios
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| base/deploy | Enhanced post_deploy function to parse tsuru.yml/yaml files and conditionally use default Procfile |
| base/rc/os_dependencies | Modernized APT key management using gpg keyrings instead of deprecated apt-key |
| test/tests.bats | Added comprehensive tests for tsuru.yml process detection and updated APT repository tests |
| .github/workflows/ci.yaml | Added pull_request trigger to CI workflow |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
No description provided.