-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unresolved resource dependencies [ApiGatewayRestApi] in the Resources block #9
Comments
hmm are you using the latest version of the plugin? if so, does it stil
happens with the previous minor version?
…On Fri, Sep 22, 2017, 6:22 AM Hristo Georgiev ***@***.***> wrote:
Hey, I installed the plugin and when I try to deploy I get this:
Serverless: Invoke deploy
Serverless: Invoke package
Serverless: Invoke aws:common:validate
Serverless: Invoke aws:common:cleanupTempDir
Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Invoke aws:package:finalize
Serverless: [serverless-plugin-split-stacks]: Summary: 87 resources migrated in to 3 nested stacks
Serverless: [serverless-plugin-split-stacks]: Resources per stack:
Serverless: [serverless-plugin-split-stacks]: - (root): 125
Serverless: [serverless-plugin-split-stacks]: - APINestedStack: 24
Serverless: [serverless-plugin-split-stacks]: - PermissionsNestedStack: 31
Serverless: [serverless-plugin-split-stacks]: - VersionsNestedStack: 32
Serverless: Invoke aws:common:moveArtifactsToPackage
Serverless: Invoke aws:common:validate
Serverless: Merged stage variables into ApiGateway Deployment
Serverless: Invoke aws:deploy:deploy
Serverless: Uploading CloudFormation file to S3...
Serverless: Uploading artifacts...
Serverless: Uploading service .zip file to S3 (13.75 MB)...
Serverless: Validating template...
Error --------------------------------------------------
The CloudFormation template is invalid: Template format error: Unresolved resource dependencies [ApiGatewayRestApi] in the Resources block of the template
I am using serverless 1.21.1
Any ideas how can I fix this ?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#9>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAjzFI5KkEhStn4qh3VYDLNKyjVQko6Uks5sk4pogaJpZM4Pgg37>
.
|
@dougmoscrop I tried with 3991fb6 and cd6578a getting the same results. With: 4b14c6d I see different error:
I haven't specified IAM Role in the serverless file so I am not really sure where this is coming from. |
Hi, pulled the latest version and I also seem to get the same error (upgraded serverless to latest)
|
I'm getting this same error message. Was there any fix or workaround? |
Followup: Any chance it's an interaction with the serverless-aws-documentation plugin? |
Stuck on this bug ... any info on this? I'm using v1.3.1 of this plugin ... and I'm using the serverless-aws-documentation plugin, I'll try to hunt this down from the outside. |
any chance you could share your CF json? also does this happen when you deploy a fresh stage? there are certain configs of CF that simply can't be 'upgraded' from not using this plugin to using this plugin (you have to tear down / set up a new deployment) |
Yes, for sure ... Post-Nested Stacks.zip Couple of caveats:
I'm looking to, but up to now I don't see a problem - everything seems correct re: references to the output ApiGatewayRestApi, outputting it from one stack, uses in the others ... I'm sure you'll be able to see the issue faster than me. |
Here's the vanilla post-test: Same error message as before ... but now you can rule out any changes I made to stacks-map.js. Serverless plugins I'm using are:
I'm going to keep on debugging over here, let you know if I see anything. |
It's definitely something to do with the serverless-aws-documentation plugin. When I remove that from my plugins, then split-stacks works without errors. |
I think this in stacks-map.js:
May help. I'm hitting another problem with the autoscaler, so I can't confirm it's all smooth sailing ... I'm also thinking there is a more refined solution, but I can handle the API resources being in the main resource file for now. |
Is there any update with this issue? |
Sorry for not being more responsive. The documentation plugin is injecting resources during the deploy phase. I don't see why it needs to, or why you would want that. I would expect it to hook in to package. So yes there is at least one problem here, which is that the documentation plugin should move their resource injection to the package phase. |
@cdichiara - when you say problems with auto scale, do you mean to say that it's related to split-stacks? Or just that it's not working the way you want? |
@dougmoscrop Can you give me some guidance how to move documentation plugin's resource injection to package phase? Thanks in advance. |
I would try: https://github.com/9cookies/serverless-aws-documentation/blob/master/src/index.js#L22 Just make the first one |
@dougmoscrop Hey I don't think there's a |
Yeah, sorry - I mean something in that area. I haven't kept up on what they changed the names to! try |
@dougmoscrop Thank you for the help. |
@dougmoscrop Thanks for responding ... honestly I've forgotten what I was thinking back then. If I recall, I think serverless-dynamodb-autoscaling was producing quite a lot of resources per scaled database (extra IAM roles, along with the necessary alarms, etc) ... but I thought there was some other issue that made it fail when I attempted to move the resources to a substack with your stack splitter. Anyways, I "solved" it by commenting out parts of the deployment, deploying, uncommenting out parts, deploying, etc. until the full deployment was up, and now since everything is a delta on the big deployment, we're "OK". Thanks for asking. 😄 |
Hi @dougmoscrop I'm running into the same issue and not using the documentation plugin
|
Well that was quick! |
And just as quick: https://github.com/leftclickben/serverless-api-stage/blob/master/src/index.js#L7 It is injecting resources in deploy phase. |
@dougmoscrop thanks for the help. We resolved this by forking that plugin and changing that line to https://github.com/headnote/serverless-api-stage We did run into another issue with your latest version (1.4.0) though, issue here: #27 1.3.2 is working fine 👍 |
I dont know if I should revive this thread, also, dont know if I should post the issue under the split-stacks or documentation plugin but you've been really helpful (thanks!). I think I have found another bug between the plugins since I was able to deploy our serverless project before adding the split-stacks. It really is not much of a big deal since I found a workaround (took me some time to finally nail down the problem). I posted the issue under the PR fix for the documentation plugin. |
I am seeing the same issue: plugins:
Any idea how I can address this? |
+1, have this issue when also using serverless-aws-documentation. Commenting it out temporarily fixed that error, but then also I still can't deploy with a different error...
|
Fix described here- dougmoscrop/serverless-plugin-split-stacks#9
Using
getting the same error
Which plugin is doing something bad here? |
If anyone else runs into this error there is a simple fix:
This way the ApiGatewayRestApi is not moved into a nested stack and can still be accessed by |
This is only an issue if using
I know this might not be an option if you manage foundational infra using cfn on sls. In our case this is not an issue because we manage foundational infra using terraform. @dougmoscrop I was confused at first because the readme says perFunction takes precedence over perType. You might want to highlight perType still applies to other resources. |
Yep I can see how that would be confusing |
I just ran into this issue and thought it might be worth detailing why it happened here in case it helps anyone else. In my case I am trying to split a fairly large existing stack with a lot of custom resources and plugins (a couple of which depend on the ApiGatewayRestApi resource) which cannot be replaced (such as Cognito user pools, the replacement of which results in unrecoverable data loss) so I've gone down the Because I have a lot of existing functions and can't see a way to get existing resources related to those functions into the nested stacks, I temporarily removed all of the functions from The cause in my case was the fact that my placeholder function did not have an |
That helped me a lot. In a few words: I was tryng to deploy an empty stack with no functions. So I added a demo function and it worked! |
Hi @dougmoscrop, I am using the following plugins:
along with the split stacks plugin and suddenly from the last couple of days, I am getting this error - Update - The deployments are only failing for the latest version, downgrading to V1.9.3 is working fine |
Hi @dougmoscrop good day! |
Are you saying that this started with the latest version of this library? Have you tried locking to a previous version? |
Hello, @dougmoscrop - Thanks a lot for your quick reply. actually yes, I locked with a previous version, but since still was getting circular dependency error, I upgraded to latest version and then many time it worked. suddenly it isn't! |
Does your stack .json contain sensitive information, or can you share it? Can you share details about the full error message? |
hello @dougmoscrop Dough - sorry for being late response. Actually i was trying something and I managed to get rid of that error but now i'm getting a new error which is "Error: Missing required key 'restApiId' in params". Could you help please? Basically if possible, could you share your email which you monitor regularly so that we can have a back and forth in email? or your skype? |
Hi @dougmoscrop - i'm again getting the error: Unresolved resource dependencies . |
hello @dougmoscrop - need help please, i'm stuck from 3 weeks as of now and please let me know what files I need to share... |
I can't provide the level of support you want, but the error message should tell you what resources are involved. Then you look at the .JSON files in the .serverless directory Further, there has to be some new resources you're adding or changed config which prevents you from deploying - something changed since you last deployed. I would undo that change, and then start looking at deploying a second entire app that reuses resources from the first stack Post the error message |
Hi @dougmoscrop - Thanks for your reply! I've tried to deploy as you said. the last good code to a new stack. Following are the errors now: Error: |
You're being rate limited by the AWS API Gateway APIs. You can try this https://github.com/dougmoscrop/serverless-plugin-split-stacks?tab=readme-ov-file#concurrency but I didn't write that feature. You might want lower numbers of concurrency too I would use http proxy not rest APIs. |
@dougmoscrop - let me try |
and also - http proxy you mean the single function implementation? |
Yes |
Ohh that won't be possible in this case. the stakeholders don't want that |
@dougmoscrop - now getting this error: Error: |
Hey, I installed the plugin and when I try to deploy I get this:
I am using serverless 1.21.1
Any ideas how can I fix this ?
The text was updated successfully, but these errors were encountered: