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

workload_to_resource_function does nothing for resources from docker_compose or dc_resource #6324

Open
kinland opened this issue Mar 5, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@kinland
Copy link
Contributor

kinland commented Mar 5, 2024

Expected Behavior

If you have workload_to_resource_function in your Tiltfile, it should work on resources from docker_compose and dc_resource

Current Behavior

workload_to_resource_function appears to have no effect on either the automatic resources from docker_compose or manual resources via dc_resource

Steps to Reproduce

  1. git clone git@github.com:tilt-dev/tilt-example-docker-compose.git
  2. add the following to the top (or bottom) of the Tiltfile:
def resource_name(id):
  return 'foo' + '-' + id.name
workload_to_resource_function(resource_name)
  1. run tilt up
  2. hit CTRL+C
  3. comment out the dc_resource lines in the Tiltfile
  4. run tilt up

Context

tilt doctor Output

Click to `tilt doctor` output
$ tilt doctor
Tilt: v0.33.11, built 2024-02-15
System: linux-amd64
---
Docker
- Host: unix:///var/run/docker.sock
- Server Version: 25.0.3
- API Version: 1.44
- Builder: 2
- Compose Version: v2.24.5-desktop.1
---
Kubernetes
- Env: eks
- Context: arn:aws:eks:us-west-2:**********
- Cluster Name: arn:aws:eks:us-west-2:**********
- Namespace: default
- Cluster Local Registry: none
---

About Your Use Case

I've got a project with a bunch of resources which all have long names. #4614 added resize, which is great, but I'd like to manually rename the resources in the UI to omit the prefix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant