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

cf push does not support service parameter #180

Open
hebelal opened this issue Nov 21, 2022 · 2 comments
Open

cf push does not support service parameter #180

hebelal opened this issue Nov 21, 2022 · 2 comments

Comments

@hebelal
Copy link

hebelal commented Nov 21, 2022

The following manifest.yml is not supported:

applications:

  • name: my-app
    services:
    • name: my-service1
      parameters:
      foo: bar
      herp: derp
    • name: my-service2
      parameters:
      foo: bar
@antechrestos
Copy link
Member

@hebelal From what I see , it throws error

Traceback (most recent call last):
  File "/home/ben/Documents/workspaces/Webrepos/cf-python-client/main/sandbox.py", line 8, in <module>
    manifests = ManifestReader.load_application_manifests("../test.yml")
  File "/home/ben/Documents/workspaces/Webrepos/cf-python-client/main/cloudfoundry_client/operations/push/validation/manifest.py", line 21, in load_application_manifests
    ManifestReader._validate_manifest(os.path.dirname(manifest_path), manifest)
  File "/home/ben/Documents/workspaces/Webrepos/cf-python-client/main/cloudfoundry_client/operations/push/validation/manifest.py", line 27, in _validate_manifest
    ManifestReader._validate_application_manifest(manifest_directory, app_manifest)
  File "/home/ben/Documents/workspaces/Webrepos/cf-python-client/main/cloudfoundry_client/operations/push/validation/manifest.py", line 40, in _validate_application_manifest
    raise AssertionError("One of path or docker must be set")
AssertionError: One of path or docker must be set

You must set the pathor dockerfield.

@hebelal
Copy link
Author

hebelal commented Dec 5, 2022

Hi,

I receive:

File "workspace/venv/lib/python3.9/site-packages/cloudfoundry_client/operations/push/push.py", line 33, in push
    self._push_application(organization, space, app_manifest, restart)
  File "workspace/venv/lib/python3.9/site-packages/cloudfoundry_client/operations/push/push.py", line 52, in _push_application
    self._bind_services(space, app, app_manifest.get("services", []))
  File "workspace/venv/lib/python3.9/site-packages/cloudfoundry_client/operations/push/push.py", line 326, in _bind_services
    service_instance_guid = service_name_to_instance_guid.get(service_name)
TypeError: unhashable type: 'dict'

I'm very confident that it is coming from my manifest.yml file which contains a parameterised service in my case:

---
applications:
  - name: app_name
    ...
    services:
      - name: service_name
        parameters: { "credential-type": "X509_GENERATED" }
    ...

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

No branches or pull requests

2 participants