Skip to content

build: Source archive doesn't include JS bundles for Db Console #75137

@koorosh

Description

@koorosh

Describe the problem

The way JS assets embedded into GO binaries was changed from using go-bindata to //go:embed directive and this change requires to copy JS bundled files (from pkg/ui/dist{ccl|oss}) into archive to make sure that:

  • user doesn't need to build JS assets from sources
  • JS assets are available during build to be embedded into GO binaries

To Reproduce

  1. run make build && make archive
  2. unzip archive generated with step 1 and cd into archive
  3. run make build from within archive
  4. run cluster ./cockroach start-single-node --insecure
  5. open Db Console in web browser
  6. and Db Console assets aren't loaded (bundle.js, vendor.dll.js, and protos.dll.js)

Expected behavior
Assets loaded and Db Console page is rendered

Environment:

  • CockroachDB version 22.1

Additional context
What was the impact?

  • It is regression issue. Before, JS assets were embedded with go-bindata and then it was switched to use //go:embed directive. It affected make archive target. (07e97b6)

Screenshot from 2022-01-18 19-09-35

Jira issue: CRDB-12482

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.no-issue-activity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions