FrankYang0529 commented on PR #349: URL: https://github.com/apache/yunikorn-site/pull/349#issuecomment-1759419613
> > > looks good. > > > My understanding is, [apache/yunikorn-core#652](https://github.com/apache/yunikorn-core/pull/652) changes won't break any existing REST API consumers on parsing the response. Can you confirm this? > > > > > > Yeah, there is a bug. Created a PR [apache/yunikorn-core#672](https://github.com/apache/yunikorn-core/pull/672) to fix it. > > I don't think so. Otherwise, below assertions should have failed > > https://github.com/apache/yunikorn-core/blob/master/pkg/webservice/handlers_test.go#L510 https://github.com/apache/yunikorn-core/blob/master/pkg/webservice/handlers_test.go#L542 > > in the first place. _go embedded field is implicitly inlined_ (you can refer [this](https://pkg.go.dev/github.com/go-json-experiment/json#:~:text=A%20Go%20embedded%20field%20is,unnamed%20pointer%20to%20such%20types) ) . Even now, https://github.com/apache/yunikorn-core/pull/672/files has taken care only for yaml, not for json. Hence, let's leave as is. I think the test case can work is because we use the same struct. For main branch version, both don't have inline tag. For PR branch version, both have inline tag. May you check following issues and go playground, so we can see the different part. * https://github.com/go-yaml/yaml/issues/99 * https://github.com/go-yaml/yaml/issues/63 * https://go.dev/play/p/0Qa5Wcb94q9 -- 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]
