Skip to content

Add the Snowflake Next application samples - #23

Open
lazarkanelov wants to merge 2 commits into
mainfrom
add-snowflake-next-sample-apps
Open

lazarkanelov wants to merge 2 commits into
mainfrom
add-snowflake-next-sample-apps

Conversation

@lazarkanelov

Copy link
Copy Markdown

Motivation

Consolidates the samples from localstack/snowflake-next-sample-apps into this repository, now that the existing samples run on Snowflake Next, so there is one place for Snowflake samples.

Changes

Eight new samples as top-level directories, covering Python, Java, Go and C#/.NET with the official Snowflake drivers:

Sample What it shows
claims-service Java 21 Spring Boot service with stored procedures, a Java UDF and Testcontainers integration tests
fleet-telemetry ASP.NET Core telemetry ingestion with FLATTEN, window functions and a dynamic table
metering-api Go usage-metering and invoicing service: idempotent ingestion, transactional invoice close, async rollups
migrate-and-swap Zero-downtime schema releases with schemachange: clone, validate, swap, roll back
order-to-cash-cdc Kafka change events into current-state and history tables with streams, tasks and dynamic tables
phi-guardrails Governance as code: tag-based masking, row access policies, a tested access matrix
slim-ci-lab dbt Core Slim CI pull-request pipeline: state selection, defer, per-PR schemas
tenantboard Multi-tenant FastAPI + React app with tenant isolation and PII masking via Snowflake policies

To fit this repository's conventions:

  • Each new sample's Makefile gets install, start and stop targets (plus logs where missing), so the existing CI matrix drives them like the other samples. Their READMEs keep documenting make up, make test and make down.
  • main.yml:
    • adds the eight samples to the matrix
    • sets up uv, JDK 21, Go or .NET only when the sample has uv.lock, pom.xml, go.mod or global.json
    • adds a nightly run (03:17 UTC) against the newest localstack/snowflake-next image, which now covers all samples
  • LOCALSTACK_AUTH_TOKEN is also passed to the test and log steps: claims-service and fleet-telemetry start their own emulator with Testcontainers during make test, and docker compose logs refuses compose files that require the token. It stays out of the install step.
  • metering-api's Go module is renamed to this repository's path, and the samples/ prefix is dropped from the READMEs.
  • .gitignore ignores the throwaway key pairs make up generates (.secrets/, *.p8, *.pem) and Node, Maven and dbt output; .gitattributes pins line endings for scripts, mvnw and mvnw.cmd.
  • The root README lists the new samples, their toolchains, make test-cloud and the nightly run.

Not carried over: the source repo's docs check and validate-all scripts, its sample conventions doc, Dependabot config and changed-samples-only CI filter. Happy to add any of them in a follow-up.

Testing

  • go build, go vet (including the integration tag) and the metering-api unit tests pass with the new module path
  • actionlint passes on the workflow; make -n install start stop logs resolves in all eight samples
  • The samples passed against the emulator in the source repo's CI; this PR's CI is their first run here

After merge, localstack/snowflake-next-sample-apps can be archived with a pointer to this repository.

Move the eight samples from localstack/snowflake-next-sample-apps into this
repository as top-level directories: claims-service, fleet-telemetry,
metering-api, migrate-and-swap, order-to-cash-cdc, phi-guardrails,
slim-ci-lab and tenantboard.

- add install, start, stop (and logs where missing) targets so the existing
  CI matrix drives them like the other samples
- extend the CI workflow with the uv, Java, Go and .NET toolchains, a nightly
  run against the newest snowflake-next image, and the auth token for the test
  and log steps (Testcontainers starts its own emulator)
- rename the Go module of metering-api to this repository's path
- ignore generated key pairs and toolchain output, and pin line endings for
  scripts, mvnw and mvnw.cmd

@hovaesco hovaesco left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@whummer

whummer commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Kudos @lazarkanelov for driving this! 🚀 Btw, I've noticed I am still in the CODEOWNERS file in this repo - I've pushed a commit directly to this branch to remove myself, 👍 hope that's ok. :) /cc @hovaesco

@sabir-akhadov-localstack sabir-akhadov-localstack left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

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.

4 participants