Closed kadraman closed 9 months ago
I'm looking at this now, for now it seems like this issue is only present in the assessment-type list
command. The release get
and release download-fpr
commands seem to be able to resolve releases just fine.
Found the problem; it's AbstractFoDQualifiedReleaseNameOrIdResolverMixin::getReleaseId
that's broken. To fix #427, we now do client-side filtering on app, microservice, and release name. However, the getReleaseId
method requests only releaseId
field to be returned by FoD, so client-side filtering can't find any matching releases.
The easy fix would be to simply add the fields needed for client-side filtering in the getReleaseId
method, however the better fix is to handle this in FoDReleaseHelper::addFieldsParam
; if the fields
array contains any values, we should add applicationName
etcetera if they're not present.
@kadraman Can you take care of fixing this?
For proper behavior in all situations, if fields is not empty, the addFieldsParam
method should make sure that app/ms/release name fields are always being requested, but also releaseId
. Not applicable in this case, but if any command ever requests fields={'releaseName'}
for example, and then a user tries to look up a release by id, that would fail similarly because the returned records won't have the releaseId
field for client-side matching
Also, other helpers like FoDAppHelper
might be affected by the same issue. We need to find all references to FoDDataHelper::findUnique
; if the helper supports fields selection, the helper should ensure that all fields required for client-side filtering are included as well.
When trying to resolved a valid release, some FoD commands are failing, e.g.:
Using a release Id works fine, e.g.
so there is something wrong in resolving the name.
I believe it might be down to a change in
release\cli\helper\FoDQualifiedReleaseNameDescriptor
as I dont recognise: