snowflakedb / native-apps-examples

Public-facing example applications built using the Snowflake Native App Framework
Apache License 2.0
26 stars 5 forks source link

SNOW-1621763: na+spcs tutorial #14

Closed sfc-gh-yxu closed 3 days ago

sfc-gh-yxu commented 3 days ago

This tutorial is based on the existing tutorial(https://docs.snowflake.com/en/developer-guide/native-apps/tutorials/na-spcs-tutorial) and it focuses on the na+spcs upgrade. It will be used for our tech writer Steven Leslie to convert into a public doc.

The purpose of this branch is to record discussion and track the changes, and it may not merge into the main branch.

@sfc-gh-tvanderkooy Could you please confirm it covered the major use cases of the na+spcs upgrades

@sfc-gh-bdufour I was told that we prefer to using snowsql in our tutorial, could you please help.

This guide walks through managing versions of a Snowflake Native App with Snowpark Container Services:

  1. Setup Version v1.0: An application package is created, along with schemas, roles, and procedures. A Docker-based echo service and UDF are deployed.

  2. Upgrade to Version v1.1 (Hotfix): A hotfix changes the service endpoint from public to private. The service's YAML file is updated, and a version upgrade applies the fix.

  3. Simulate Upgrade Failure (Version v2.0): The guide simulates an upgrade failure by introducing an error in the setup script. The system automatically reverts to version v1.1, keeping the service operational.

  4. Fix the Error (Version v2.1): After fixing the error, the app is successfully upgraded to version v2.1.

  5. Upgrade to Version v3.0: To create version v3.0, version v1 is dropped (since only two active versions are allowed), and the upgrade is completed.

This tutorial demonstrates managing lifecycle upgrades, dealing with failures, and ensuring service continuity.