-
Notifications
You must be signed in to change notification settings - Fork 56
Apparent bugs: Custom vod-helper FileTrigger function appears to break deployment & Admin UI + Data #248
Comments
I've also seen the following error:
|
Update: WHATEVER is causing this, it appears to only happen when enabling Admin UI. I can make all of the changes I want, without issue, if the Admin UI is NOT enabled for the backend. I have no idea why/how, since Admin UI console messages and CLI failures (failed to build models in the cloud) don't provide much context and there appear to be multiple open/outstanding issues across the amplify-cli, amplify-admin-ui, and amplify-js GitHub issues section. Currently ,I have a working/compiling/successfully push-ing backend with the following configuration:
|
So, here's what I've been able to deduce: If you leave the vodAsset + videoObject models in tact, but remove all other custom resources & evidence/references to the video category (amplify remove video, but leave models in-place), you can get DataStore/Amplify Admin UI (even the "Content"/CMS feature) working (just need to comment out the resolver for the tokenGen lambda function). When I add the video plugin resources (S3 buckets, Lambdas, CFN Distro, Media job template), that's when I start to see the following in my Chrome console when trying to access the Admin UI.
|
Describe the bug
Adding a custom trigger function (additional postfix for .mp3, .pcm, .wav...etc) appears to break deployment/Admin UI
I apologize for the length of the report, but I figured it would be more helpful to include everything that's relevant, and to be thorough. Uncertain where to draw the line between amplify VS amplify-video, but going to share here and wait for advice or direction.
To Reproduce
Steps to reproduce the behavior:
Step 1 - Init totally empty/non-custom Amplify app & backend
Step 2 - Add Auth
Step 3 - Add API
Step 4 - Add Video
Step 5: Custom Video resources (trigger + audio-only media job)
You can see the code for the handler + audio-only media job here: https://gist.github.com/armenr/38017cf3c316f956dd29b1549e945906
Step 6: Push & Check Amplify Admin UI
^^ Looks good, so far, right? :)
Admin UI Screenshot (yes, I did click on "dev" from the drop-down)
Step 7 (unbreak my heart...and the Admin UI)
Admin UI Screenshot after custom function removal:
Bonus: Step 8 (what happens if we re-deploy a custom function again, just for the sake of curiosity)?
Admin UI Screenshot after restoring custom function:
Deployed Lambdas list
Bonus Step 9 - Remove custom trigger function again, deploy with vanilla trigger
Admin UI Screenshot after removing custom function (again) - Note the browser console errors
Deployed Lambdas:
Step 10 Reset ALL THE THINGS!
Admin UI after (API data/models require a redeploy according to Admin UI)
Admin UI --> navigate to "Content" --> Content still says "Redeploy your models"
So...redeploy models
Step 11: Add video again (just for fun because it's Friday!)
...So, that didn't go well. Let's run some api/gql commands to see what happens next
Looks good. So, now what?
Admin UI after deploy of non-custom video category
friendlyname2
BUT - When I click on "Content" to quickly add sample data or inspect any data I may have inserted/added:
![Screen Shot 2021-04-23 at 11 11 19 AM](https://user-images.githubusercontent.com/7662191/115912791-a2ada900-a424-11eb-8c7a-6e2de4d4994e.png)
And Chrome console shows:
![Screen Shot 2021-04-23 at 11 12 02 AM](https://user-images.githubusercontent.com/7662191/115912965-d8eb2880-a424-11eb-8a2a-62c9ead934cb.png)
...So, back to Data we go:
![Screen Shot 2021-04-23 at 11 13 09 AM](https://user-images.githubusercontent.com/7662191/115913001-e4d6ea80-a424-11eb-9d53-b853d14b3d3a.png)
Deploy finishes:
Go to "Content" -->
Step 12 (because I like to be thorough) - Add back Custom Trigger + job template
<Everything seems to be updating/deploying well --> coming back complete>
<We get stuck here for at least 7 minutes> "Generating models in the cloud..."
Finally looks like it times out/fails:
Last step: What does Amplify Admin UI tell us? Same thing as the errors in Step 6 screenshot!
And at this point, I'm totally bewildered.
Expected behavior
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: