Skip to content
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

How do we update services with new versions? #53

Open
AndrewBarba opened this issue May 25, 2023 · 18 comments
Open

How do we update services with new versions? #53

AndrewBarba opened this issue May 25, 2023 · 18 comments

Comments

@AndrewBarba
Copy link

I'm currently trying to use this in SST which is a wrapper around CDK. I'm able to create the initial service, backend and domain on first deploy but then a bunch of issues crop up:

  1. On initial deploy there is no way to activate the version
  2. On subsequent updates, everything fails because nothing creates a new version and keeps trying to edit the attrLatestVersionId

Is it even possible to use this in its current state? My guess is we need to add a Fastly::Services::Version construct, or any update to an underlying service Fastly::Services::*** needs to know to create a new version first and set it as the latest version. Additionally, we need some way to then activate the latest version once all changes are reconciled and added to the new version

@LucasQChen
Copy link

@AndrewBarba let me discuss with some folks about this and what the approach should be. We'll also evaluate adding the new resource.

@AndrewBarba
Copy link
Author

Excellent @CloudChoom thanks a lot. And while I have you here, some other key ones I need:

@LucasQChen
Copy link

Thanks @AndrewBarba We'll have a look at those as well. Working with the team to get an estimate on each of those. Out of curiosity, are there other 3rd party providers you're looking to use other than Fastly?

@AndrewBarba
Copy link
Author

AndrewBarba commented May 26, 2023

My favorite backend stack:

  • DNS - Cloudflare
  • CDN - Fastly
  • Compute - AWS
  • Database - PlanetScale / Upstash / MongoDB Atlas
  • Logging - Axiom / BetterStack

@LucasQChen
Copy link

FYI in case you haven't already seen, we do have CFN resources available for Cloudflare and MongoDB Atlas as well.

https://github.com/aws-ia/cloudformation-cloudflare-resource-providers
https://www.mongodb.com/developer/code-examples/bash/get-started-atlas-aws-cloudformation/

@LucasQChen
Copy link

Quick update on the Fastly resource, we think the Fastly::Services::Versions resource makes sense, we're still investigating how we can automate the activation of the version.

If you have requests for more CloudFormation resources in the future, in addition to submitting them here, I encourage you to also speak to the partners (Fastly, CloudFlare, etc) as well so that they're aware of your demand for them. That will help fuel collaboration on both sides.

@AndrewBarba
Copy link
Author

Awesome that's great to hear. And if you look at the other resources I asked for they all rely on a version so I think the version resource sets us up nicely for everything after.

And yes activating the version seemed tricky, I wasn't sure how that plays with the CF model / what special case would be needed for that.

@LucasQChen
Copy link

For my knowledge, if we don't have a good way to automate the activation, the version resource type will still be useful for your use case, right?

@AndrewBarba
Copy link
Author

AndrewBarba commented May 31, 2023

Activating the version is definitely critical, but I won't stop you from working on the Version resource. Wondering if we could have an additional Fastly::Services::ActivateVersion resource thats basically always the last thing defined and fully controls activating the version. This would also make activation opt in and give people more control if for some reason they dont want to activate a version right away

@LucasQChen
Copy link

LucasQChen commented Jun 6, 2023

Discussed with the team and we're planning to add both a Version and ActiveVersion resource. The ActiveVersion resource will behave how you described, it will deactivate the existing version and activate a new version. Also we deviated from calling it ActivateVersion and will call it ActiveVersion because we typically name resource types as nouns instead of verbs.

Development on both of these will start soon. I'll provide more updates here.

@LucasQChen
Copy link

Quick update: PR is up and being reviewed #54

After it's merged, we'll work on publishing these to the CloudFormation Registry.

@LucasQChen
Copy link

We're happy to announce Fastly::Service::ActiveVersion and Fastly::Service::Version resources are now available for use in the Registry! Please give it a try and let us know if anyone has any feedback.

We'll go ahead and close this issue.

@AndrewBarba
Copy link
Author

Awesome thank you. Do you have docs on using those as well?

@AndrewBarba
Copy link
Author

Yup just read these, makes sense! Will test these out and open new issue if needed. Thanks a ton

@AndrewBarba
Copy link
Author

@CloudChoom We're close but other resources depend on versionId: string and they need to be converted to versionId: number

Example on Backend:

CDN Fastly::Services::Backend UPDATE_FAILED Properties validation failed for resource apibackend with message:
#/VersionId: expected type: String, found: Integer

@AndrewBarba AndrewBarba reopened this Aug 11, 2023
@LucasQChen
Copy link

The team is looking into this and planning the fix as we speak.

@LucasQChen
Copy link

@AndrewBarba the versionId type mistmatch issue should be resolved now for the other resources.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants