codice / ddf

DDF Distributed Data Framework - an open source, modular integration framework.
http://ddf.codice.org
Other
132 stars 181 forks source link

[2.26.x] Provide better transform failure message #6771

Closed derekwilhelm closed 11 months ago

derekwilhelm commented 11 months ago

What does this PR do?

When attempting to download a resource as part of a transform request, if the resource cannot be found or cannot be read for some reason, the transform endpoint will return a generic "Unable to transform Metacard. Try differen transformer" message. While this message may be valid in some cases, the resource transformer and any other transformer that requires the file data could provide a much better message considering this message usually ends up back to the user. In the case of a download from the UI, this is definitely true and shows within the browser window that opens. This PR checks the transformers failure cause and provides a better message for when the resource file can either not be found or not be read.

Who is reviewing it?

@jlcsmith @andrewkfiedler

Select relevant component teams:

@codice/core-apis @codice/ui

Ask 2 committers to review/merge the PR and tag them here.

@glenhein @jlcsmith

How should this be tested?

  1. Build and deploy DDF and add DDF-UI to it
  2. Using the UI, upload a file
  3. Create another metacard that doesn't have a file
  4. Go to the file system and move/delete the stored file
  5. Either using the UI or by going to the transform endpoint, attempt to retrieve the uploaded file using the resource transformer
  6. Verify that the response message indicates "Resource file is not available"
  7. Using the resource transformer and going to the metacard endpoint for the non-resource file metacard, verify that the response message indicates "Resource file is not available"

Any background context you want to provide?

What are the relevant tickets?

Fixes: #____

Screenshots

Checklist:

Notes on Review Process

Please see Notes on Review Process for further guidance on requirements for merging and abbreviated reviews.

Review Comment Legend:

derekwilhelm commented 11 months ago

build now

cxddfbot commented 11 months ago

Internal build has been started, your results will be available at build completion.

cxddfbot commented 11 months ago

Build FAILURE See the job results in legacy Jenkins UI or in Blue Ocean UI.

derekwilhelm commented 11 months ago

build now

cxddfbot commented 11 months ago

Internal build has been started, your results will be available at build completion.

cxddfbot commented 11 months ago

Build FAILURE See the job results in legacy Jenkins UI or in Blue Ocean UI.

derekwilhelm commented 11 months ago

build now

cxddfbot commented 11 months ago

Internal build has been started, your results will be available at build completion.

cxddfbot commented 11 months ago

Build FAILURE See the job results in legacy Jenkins UI or in Blue Ocean UI.

derekwilhelm commented 11 months ago

build now

cxddfbot commented 11 months ago

Internal build has been started, your results will be available at build completion.

cxddfbot commented 11 months ago

Build SUCCESS See the job results in legacy Jenkins UI or in Blue Ocean UI.