Skip to content

Conversation

@derek10cloud
Copy link
Collaborator

@derek10cloud derek10cloud commented Oct 8, 2024

Description

This PR implements provider version pinning support with stackql_manifest.yml file for stackql-deploy, a feature necessary for determinism and better maintainability in deployment environments. Prior to this update, we couldn't set the version of providers(aws, gcp, azure and etc), so we used to pull only latest version of providers.

Fixes #43

1) Provider Version Pinning:

  • Users can now specify a provider version in the manifest file alongside the provider name.
  • If a version is provided (using the :: delimiter), stackql-deploy will download and use the exact version specified.
  • If no version is provided, the latest available version of the provider will be used (consistent with current behavior).
  • if a wrong version is specified or there is a typo, error will be thrown.

Test

As part of the testing process, I created a manifest file with various provider configurations, including providers with pinned versions, providers without specified versions, and invalid version numbers.
image

Manifest Configuration:

  1. Providers with specified latest version:
  • aws: v24.07.00246 (already installed, nothing happens)
  • awscc: v24.03.00220 (not installed before, installs latest)
  1. Providers with No Version Specified:
  • google: No version specified (already installed, nothing happens)
  • googleadmin: No version specified (not installed before, installs latest)
  1. Providers with Not Latest Version Installed:
  • azure: v23.01.00104 (not latest version but already installed, do nothing but throw warning not an error)
  • azure_extras: v23.03.00121 (not latest version, installs specified version, install specified version)
  1. Providers with Invalid Version:
  • digitalocean: v999.01.00103 (invalid version, error should be thrown)

Build Results:

The outcomes were observed during the stackql-deploy build process:
image

This ensures that the version pinning functionality works as expected, with appropriate logging and error handling in place.

Checklist

Please make sure that the following criteria are met:

  • The PR title is descriptive.
  • For example stacks, I have included a descriptive README.md in the example project directory, which describes the stack and includes instructions to deploy or test.
  • For example stacks, add your stack to the website template library at website/docs/template-library/.. which gets published to stackql-deploy.io (optional)
  • I have ⭐'ed the stackql and stackql-deploy repos.

Additional Notes

Provider Version Regression is not supported yet:

There is currently no in-app(stackql) way to revert to a previous provider version once a newer version has been installed. Users need to manually delete the current version folder outside of StackQL to switch back to an older version.

Add any additional information or context that might help the reviewers.

  • If you need any additional explanation about the code or test, please let me know any time. 👍

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

Successfully merging this pull request may close these issues.

Provider version pinning

2 participants