yin1999 commented on code in PR #290:
URL: https://github.com/apache/dubbo-kubernetes/pull/290#discussion_r1609506251
##########
app/dubboctl/internal/manifest/render/render.go:
##########
@@ -325,8 +325,10 @@ func renderManifest(valsYaml string, cht *chart.Chart,
builtIn bool, opts *Rende
if file == "" {
continue
}
+ // the formatted yaml file should terminate with a newline
separator
if !strings.HasSuffix(file, YAMLSeparator) {
Review Comment:
Edge case:
```yaml
apiVersion: dubbo.apache.org/v1alpha1
kind: ConditionRoute
metadata:
name: admin-cp-conditionroute
namespace: dubbo-system
spec:
enabled: true
force: true
scope: service
runtime: true
priority: 100
key: org.apache.dubbo.samples.CommentService
configVersion: v3.0
conditions:
- method=getComment => region=Hangzhou
--- # there is no EOF (that is `\n` here)
```
The `if` condition will never be true, as the `util.SpaceFilter()` will not
preserve the EOF line. Adding a new filter `ReserveEoFSpaceFilter` to resolve
it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]