Skip to content

Conversation

@ravilock
Copy link
Contributor

…mage command

@ravilock ravilock requested review from crgisch, nettoclaudio and wpjunior and removed request for crgisch and wpjunior October 17, 2025 18:52
@morpheu morpheu requested review from Copilot and removed request for nettoclaudio October 17, 2025 18:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds logic to prefer processes defined in tsuru.yaml over falling back to a platform Procfile/command, and introduces tests and testdata for this behavior.

  • Parse tsuru.yaml to detect defined processes and only fallback when both Procfile and tsuru.yaml processes are absent.
  • Add end-to-end test and Python app test data to validate tsuru.yaml hooks, processes, package installs, and Python version.
  • Switch YAML dependency to sigs.k8s.io/yaml and update Go/toolchain and several module versions.

Reviewed Changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
pkg/build/buildkit/build.go Adds tsuru.yaml process check, swaps YAML lib, adjusts permissions notation.
pkg/build/buildkit/build_test.go Renames existing test and adds new integration test for user-defined tsuru.yaml.
pkg/build/buildkit/testdata/python-tsuru-yaml/tsuru.yaml Provides tsuru.yaml with build hooks and a web process for testing.
pkg/build/buildkit/testdata/python-tsuru-yaml/requirements.txt Python requirements for the test app.
pkg/build/buildkit/testdata/python-tsuru-yaml/requirements.apt System packages for the test app.
pkg/build/buildkit/testdata/python-tsuru-yaml/app.py Minimal Flask app used in tests.
pkg/build/buildkit/testdata/python-tsuru-yaml/hook.py Auxiliary test script.
go.mod Updates Go/toolchain and dependencies, adds tsuru/types and sigs.k8s.io/yaml.

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@fbtravi
Copy link

fbtravi commented Oct 17, 2025

Hi @ravilock

This change covers the case where we have a tsuru.yaml file defined with processes, and the process does not have a start command.

processes:
  - name: web
    # Using the command from the Dockerfile
    command: npm start
    healthcheck:
      path: /health
      scheme: http
      allowed_failures: 3
      force_restart: true
      interval_seconds: 60
      timeout_seconds: 60
      deploy_timeout_seconds: 600

- Replaced usage of github.com/tsuru/tsuru types with local TsuruYamlData
  and related structs in pkg/build/types.go.
- Refactored buildkit build logic to use new tsuru.yaml parsing and
  process handling.
- Updated tests and testdata to support multiple processes and new
  tsuru.yaml structure.
- Added misc/local-dev.sh script for local loopback IP setup/cleanup.
- Improved Makefile with setup/cleanup targets and Docker Compose
  detection.
- Removed tsuru dependency from go.mod/go.sum and added new indirect
  dependencies.
@ravilock ravilock force-pushed the fix/check-for-tsuru-yaml-before-image-command-fallback branch from d59ea3a to e3f0a12 Compare October 21, 2025 01:31
Copy link
Member

@crgisch crgisch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Would be nice to add on README how to run/test locally using new Makefile commands :)

@ravilock ravilock merged commit 38cdaaa into tsuru:main Oct 22, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants