adobe / aio-cli-plugin-app

Create, Build and Deploy Cloud Native Applications
Apache License 2.0
19 stars 35 forks source link

fix: handle mesh config 404 error #700

Closed MichaelGoberling closed 1 year ago

MichaelGoberling commented 1 year ago

Description

If the user has the api-mesh plugin installed and runs aio app pack on a project without an api-mesh config, packing will fail with a not found error. This PR proposes ignoring these errors and continuing to pack

Related Issue

Closes https://github.com/adobe/aio-cli-plugin-app/issues/699

Motivation and Context

So aio app pack works with all plugins installed

How Has This Been Tested?

Locally linked plugin, npm run test

Screenshots (if appropriate):

Types of changes

Checklist:

MichaelGoberling commented 1 year ago

@shazron @purplecabbage @moritzraho

Opening this up as a draft for now, because I'm wondering if there is a case where we should fail if the api-mesh is not found. For instance, can the user define the api-mesh config in app.config.yaml or in another local file and then when we go to fetch the api-mesh config that means there is a mismatch between the server and local config?

codecov[bot] commented 1 year ago

Codecov Report

Merging #700 (06ed805) into master (251f7bb) will not change coverage. The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master      #700   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           57        57           
  Lines         3146      3152    +6     
  Branches       587       589    +2     
=========================================
+ Hits          3146      3152    +6     
Files Changed Coverage Δ
src/commands/app/pack.js 100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

moritzraho commented 1 year ago

For now, apimesh is not exposed in app.config.yaml (would be good to add it eventually)