Remove hard-coded record types #132

Merged
ashwin merged 17 commits from deep-stack/laconicd-deprecated:ng-rm-record-types into main 2024-01-15 04:20:39 +00:00
Member
  • Resolves #107 and is initial work on #108
    • Refactors the Record.Attributes from Any into a byte string and removes the hard-coded Protobuf record types.
    • Fixes EIP-712 bytes decoding.
  • Resolves #109
    • Rewords the graphql schema to be able to represent generic IPLD objects encoded as DAG-JSON.
- Resolves #107 and is initial work on #108 - Refactors the `Record.Attributes` from Any into a byte string and removes the hard-coded Protobuf record types. - Fixes EIP-712 bytes decoding. - Resolves #109 - Rewords the graphql schema to be able to represent generic IPLD objects encoded as DAG-JSON.
nabarun added 17 commits 2024-01-11 11:05:01 +00:00
rename types for clarity
this matches the change in follow up PR branch `graphql-to-ipld`
Fix protobuf lint error
Some checks failed
Build / cleanup-runs (pull_request) Has been cancelled
Build / build (pull_request) Has been cancelled
Lint / Run golangci-lint (pull_request) Has been cancelled
Lint / Run flake8 on python integration tests (pull_request) Has been cancelled
Protobuf / lint (pull_request) Has been cancelled
Protobuf / break-check (pull_request) Has been cancelled
CodeQL / Analyze (go) (pull_request) Has been cancelled
Dependency Review / dependency-review (pull_request) Has been cancelled
Deploy Contract / cleanup-runs (pull_request) Has been cancelled
Deploy Contract / deploy (pull_request) Has been cancelled
Pull Request Labeler / triage (pull_request) Has been cancelled
Run Gosec / Gosec (pull_request) Has been cancelled
Semgrep / Scan (pull_request) Has been cancelled
Tests / cleanup-runs (pull_request) Has been cancelled
Tests / test-unit-cover (pull_request) Has been cancelled
Tests / test-importer (pull_request) Has been cancelled
Tests / test-rpc (pull_request) Has been cancelled
Tests / sdk_tests (pull_request) Has been cancelled
10210aea31
dboreham requested review from telackey 2024-01-11 14:02:55 +00:00
Member

I built and deployed laconicd, built the new laconic-sdk, and then built the CLI to use the new SDK.

After all that, I am getting some errors:

> laconic -c ~/.laconic/config.yml cns record list

[
  {
    message: 'strconv.ParseFloat: parsing "-": invalid syntax',
    path: [ 'queryRecords' ]
  }
]
❯ laconic -c ~/.laconic/local.yml cns record get --id bafyreibctvtieli3gqs7zkaxmwt4wbtakcrurjgrvd44c3mepr3h2qo2ju

[
  {
    message: 'Invalid byte while expecting start of value: 0x3f',
    path: [ 'getRecordsByIds' ]
  }
]
# Note: should be several records

❯ laconic -c ~/.laconic/local.yml cns record list --all --type ApplicationRecord
[]

What might I be doing wrong?

I built and deployed laconicd, built the new laconic-sdk, and then built the CLI to use the new SDK. After all that, I am getting some errors: ``` > laconic -c ~/.laconic/config.yml cns record list [ { message: 'strconv.ParseFloat: parsing "-": invalid syntax', path: [ 'queryRecords' ] } ] ``` ``` ❯ laconic -c ~/.laconic/local.yml cns record get --id bafyreibctvtieli3gqs7zkaxmwt4wbtakcrurjgrvd44c3mepr3h2qo2ju [ { message: 'Invalid byte while expecting start of value: 0x3f', path: [ 'getRecordsByIds' ] } ] ``` ``` # Note: should be several records ❯ laconic -c ~/.laconic/local.yml cns record list --all --type ApplicationRecord [] ``` What might I be doing wrong?
Member

I deleted the existing registry data and recreated it from scratch, and I was able to get working responses. So apparently this is a completely breaking change for existing deployments. That's probably OK, just good to note.

I did see something quirky though. I am not sure if the is a CLI or server issue, but laconic cns record list now shows all records even when --all is not specified if no other filters are included.

If any filter is included, it reverts to the old behavior and only shows results with names, unless --all is set explicitly. This is rather confusing, but also comparatively minor.

I deleted the existing registry data and recreated it from scratch, and I was able to get working responses. So apparently this is a completely breaking change for existing deployments. That's probably OK, just good to note. I did see something quirky though. I am not sure if the is a CLI or server issue, but `laconic cns record list` now shows all records even when `--all` is not specified if no other filters are included. If any filter _is_ included, it reverts to the old behavior and only shows results with names, unless `--all` is set explicitly. This is rather confusing, but also comparatively minor.
telackey approved these changes 2024-01-11 22:53:00 +00:00
telackey left a comment
Member

Other than the "all" issue mentioned above, LGTM, and I am fine if we just open an issue for that to be fixed later.

Other than the "all" issue mentioned above, LGTM, and I am fine if we just open an issue for that to be fixed later.
Member

Since this is a breaking change, we probably want to merge it and the SDK PR and create new releases sooner rather than later, so that I can re-create the production registry deployment before it contains any valuable data.

Since this is a breaking change, we probably want to merge it and the SDK PR and create new releases sooner rather than later, so that I can re-create the production registry deployment before it contains any valuable data.
ashwin merged commit 776799ea02 into main 2024-01-15 04:20:39 +00:00
ashwin deleted branch ng-rm-record-types 2024-01-15 04:20:40 +00:00
Member

I did see something quirky though. I am not sure if the is a CLI or server issue, but laconic cns record list now shows all records even when --all is not specified if no other filters are included.

On checking locally, I see that command laconic cns record list without the --all flag returns all records even with previous laconicd and laconic-sdk versions (laconicd - 9c240f1a0c152d74a4bea57bfd6af7f323d44b5c, laconic-registry-cli - 6814707752c445ae9cfec9fd282a4f88adac08f8)

> I did see something quirky though. I am not sure if the is a CLI or server issue, but `laconic cns record list` now shows all records even when `--all` is not specified if no other filters are included. > On checking locally, I see that command `laconic cns record list` without the `--all` flag returns all records even with previous laconicd and laconic-sdk versions (laconicd - `9c240f1a0c152d74a4bea57bfd6af7f323d44b5c`, laconic-registry-cli - `6814707752c445ae9cfec9fd282a4f88adac08f8`)
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/laconicd-deprecated#132
No description provided.