Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui: ./dev ui watch fails on missing protobuf files #129374

Open
dhartunian opened this issue Aug 20, 2024 · 0 comments
Open

ui: ./dev ui watch fails on missing protobuf files #129374

dhartunian opened this issue Aug 20, 2024 · 0 comments
Labels
branch-master Failures and bugs on the master branch. C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. P-2 Issues/test failures with a fix SLA of 3 months T-observability

Comments

@dhartunian
Copy link
Collaborator

dhartunian commented Aug 20, 2024

This appears to be related to the complex bazel rules that govern the protos.d.ts and protos.js files that we generate for the UI. These are copied correctly into working directories in bazel, but not into the sandboxes as expected.

❯ ./dev ui watch
Scope: all 8 workspace projects
Lockfile is up to date, resolution step is skipped
Already up to date
Done in 804ms
$ bazel build //pkg/ui/workspaces/cluster-ui:cluster-ui-lib //pkg/ui/workspaces/db-console/ccl/src/js:crdb-protobuf-client-ccl-lib
INFO: Invocation ID: 1b376255-a29a-449b-b6bf-86df76a3072a
INFO: Analyzed 2 targets (2262 packages loaded, 11279 targets configured).
INFO: Found 2 targets...
INFO: Elapsed time: 6.849s, Critical Path: 0.07s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
failed to arrange files for watchers: open /private/var/tmp/_bazel_davidh/d61affdd093572eb0c41c4220c20a747/execroot/com_github_cockroachdb_cockroach/bazel-out/darwin_arm64-fastbuild/bin/pkg/ui/workspaces/db-console/src/js/protos.js: no such file or directory

I've tried running a number of bazel rules manually to make these files appear but none of them seem to do the trick.

The issue seems to be that the arrangeFilesForWatchers function doesn't look for the files in the right place. The files in the bazel sandbox are under the crdb-protobuf-client subdirectory.

However, there's still more to investigate here as the ccl directory doesn't contain the expected libs after the oss ones are built.

❯ tree
.
├── ccl
│   └── src
│       └── js
│           ├── _crdb-protobuf-client-ccl__proto_pbjs__js_binary.sh
│           ├── _crdb-protobuf-client-ccl__proto_pbjs__js_binary_node_bin
│           │   └── node
│           ├── _crdb-protobuf-client-ccl__proto_pbts__js_binary.sh
│           ├── _crdb-protobuf-client-ccl__proto_pbts__js_binary_node_bin
│           │   └── node
│           ├── node_modules
│           │   ├── chalk -> ../../../../../../node_modules/.aspect_rules_js/[email protected]/node_modules/chalk
│           │   ├── escodegen -> ../../../../../../node_modules/.aspect_rules_js/[email protected]/node_modules/escodegen
│           │   ├── espree -> ../../../../../../node_modules/.aspect_rules_js/[email protected]/node_modules/espree
│           │   ├── estraverse -> ../../../../../../node_modules/.aspect_rules_js/[email protected]/node_modules/estraverse
│           │   ├── glob -> ../../../../../../node_modules/.aspect_rules_js/[email protected]/node_modules/glob
│           │   ├── jsdoc -> ../../../../../../node_modules/.aspect_rules_js/[email protected]/node_modules/jsdoc
│           │   ├── minimist -> ../../../../../../node_modules/.aspect_rules_js/[email protected]/node_modules/minimist
│           │   ├── protobufjs -> ../../../../../../node_modules/.aspect_rules_js/[email protected]/node_modules/protobufjs
│           │   ├── semver -> ../../../../../../node_modules/.aspect_rules_js/[email protected]/node_modules/semver
│           │   ├── tmp -> ../../../../../../node_modules/.aspect_rules_js/[email protected]/node_modules/tmp
│           │   └── uglify-js -> ../../../../../../node_modules/.aspect_rules_js/[email protected]/node_modules/uglify-js
│           └── package.json
└── src
    └── js
        ├── _crdb-protobuf-client__proto_pbjs__js_binary.sh
        ├── _crdb-protobuf-client__proto_pbjs__js_binary_node_bin
        │   └── node
        ├── _crdb-protobuf-client__proto_pbts__js_binary.sh
        ├── _crdb-protobuf-client__proto_pbts__js_binary_node_bin
        │   └── node
        ├── crdb-protobuf-client
        │   ├── package.json
        │   ├── protos.d.ts
        │   └── protos.js
        ├── crdb-protobuf-client_config.json
        ├── node_modules
        │   ├── chalk -> ../../../../../node_modules/.aspect_rules_js/[email protected]/node_modules/chalk
        │   ├── escodegen -> ../../../../../node_modules/.aspect_rules_js/[email protected]/node_modules/escodegen
        │   ├── espree -> ../../../../../node_modules/.aspect_rules_js/[email protected]/node_modules/espree
        │   ├── estraverse -> ../../../../../node_modules/.aspect_rules_js/[email protected]/node_modules/estraverse
        │   ├── glob -> ../../../../../node_modules/.aspect_rules_js/[email protected]/node_modules/glob
        │   ├── jsdoc -> ../../../../../node_modules/.aspect_rules_js/[email protected]/node_modules/jsdoc
        │   ├── minimist -> ../../../../../node_modules/.aspect_rules_js/[email protected]/node_modules/minimist
        │   ├── protobufjs -> ../../../../../node_modules/.aspect_rules_js/[email protected]/node_modules/protobufjs
        │   ├── semver -> ../../../../../node_modules/.aspect_rules_js/[email protected]/node_modules/semver
        │   ├── tmp -> ../../../../../node_modules/.aspect_rules_js/[email protected]/node_modules/tmp
        │   └── uglify-js -> ../../../../../node_modules/.aspect_rules_js/[email protected]/node_modules/uglify-js
        └── package.json

34 directories, 14 files

Jira issue: CRDB-41509

Epic CRDB-42448

@dhartunian dhartunian added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. branch-master Failures and bugs on the master branch. T-observability labels Aug 20, 2024
@exalate-issue-sync exalate-issue-sync bot added the P-2 Issues/test failures with a fix SLA of 3 months label Aug 20, 2024
@exalate-issue-sync exalate-issue-sync bot assigned nkodali and unassigned nkodali Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch-master Failures and bugs on the master branch. C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. P-2 Issues/test failures with a fix SLA of 3 months T-observability
Projects
None yet
Development

No branches or pull requests

2 participants