Skip to content

Replace runtime snapshot metadata fetch with CI-injected BuildConfig metadata #8

@hdcodedev

Description

@hdcodedev

Problem

The playground footer currently depends on runtime fetch/deserialization of metadata JSON. This creates failure modes from deploy skew, caching, and runtime serialization issues.

Proposal

Replace runtime metadata fetch entirely with CI-injected build-time markers in BuildConfig:

  • SOURCE_SHA
  • CHARTS_VERSION
  • PUBLISHED_AT

Populate them in publish workflow during build.

Non-Goal

  • No runtime fallback to metadata endpoint.
  • No runtime HTTP fetch for footer metadata.

Why

  • Eliminates runtime network dependency for footer
  • Eliminates schema drift/parsing issues in UI
  • Guarantees metadata matches the exact deployed JS bundle

Suggested Implementation

  1. Add BuildConfig fields in playground/build.gradle.kts with explicit local defaults.
  2. Pass CI values via Gradle properties/env in publish workflow.
  3. Remove metadata fetch from PlaygroundViewModel and related loading state/actions.
  4. Render footer directly from BuildConfig values.

Acceptance Criteria

  • Footer metadata renders with zero runtime HTTP calls.
  • Published snapshot footer always matches deploy commit/version/time.
  • Metadata endpoint availability has no effect on footer behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions