Feature request: Add support for arbitrary parameters when binding services via manifest.yml

未关闭
#1,142 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
java
领域
api, cloud

调研方向

从 ApplicationManifestUtils 开始,重点查看 asList、asListOfString 和 toApplicationManifest,并使用提供的 manifest 作为复现用例。跟踪 service binding 参数的转换方式,并验证嵌套参数映射能够在不出现所报告的 ClassCastException 的情况下完成解析,同时保留其值。

由索引模型根据 Issue 内容生成。

描述

enhancement triaged

Hello,

I want to report this error when we push an app manifest with binding parameters. It seems that the manifest yaml doesn't get parsed correctly because the format is not supported

java.lang.ClassCastException: Cannot cast java.util.LinkedHashMap to java.lang.String
	at java.lang.Class.cast(Class.java:3369)
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485)
	at org.cloudfoundry.operations.applications.ApplicationManifestUtils.lambda$asList$2(ApplicationManifestUtils.java:160)
	at java.util.Optional.ifPresent(Optional.java:159)
	at org.cloudfoundry.operations.applications.ApplicationManifestUtils.as(ApplicationManifestUtils.java:131)
	at org.cloudfoundry.operations.applications.ApplicationManifestUtils.asList(ApplicationManifestUtils.java:157)
	at org.cloudfoundry.operations.applications.ApplicationManifestUtils.asListOfString(ApplicationManifestUtils.java:164)
	at org.cloudfoundry.operations.applications.ApplicationManifestUtils.toApplicationManifest(ApplicationManifestUtils.java:346)
	at org.cloudfoundry.operations.applications.ApplicationManifestUtils.lambda$doRead$9(ApplicationManifestUtils.java:236)
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566)
	at org.cloudfoundry.operations.applications.ApplicationManifestUtils.doRead(ApplicationManifestUtils.java:240)
	at org.cloudfoundry.operations.applications.ApplicationManifestUtils.read(ApplicationManifestUtils.java:73)
	at org.cloudfoundry.operations.applications.ApplicationManifestUtils$read.call(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
Manifest format:
--- 
applications: 
- name: my-app
  services:
  - name: my-service1
    parameters: 
      foo: bar
      herp: derp
  - name: my-service2
    parameters: 
      foo: bar
  For more details on the binding params please read: https://docs.cloudfoundry.org/devguide/services/application-binding.html#-binding-with-application-manifest

Best regards.

主要语言
Java
星标
334
派生
319
PR 合并指标
30 天内没有已合并 PR

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

cloudfoundry/cf-java-client 的其他 Issue

查看 cloudfoundry/cf-java-client 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。