129: Index multivalued attributes. #128

Merged
telackey merged 4 commits from telackey/tags into main 2023-12-19 06:55:12 +00:00
Member

This fixes #129, by indexing each value of a multivalued attribute.

This handles at least the most common use case, so that we can search on a single value of the attribute.

❯ laconic -c ~/.laconic/local.yml cns record list --all --type ApplicationDeploymentRequest --tags b
[
  {
    "id": "bafyreidrp4pylixp44rkxu5il72qhwwc4ir5ctdnssps5rnelstloxivwm",
    "names": null,
    "owners": [
      "FCCE01FCC2472AEDBCF33902907F33262445AC2C"
    ],
    "bondId": "4ef470a9207f00fc07663623d092a14c310794b616eb53b085cfe6976e82f56d",
    "createTime": "2023-12-18T22:13:23Z",
    "expiryTime": "2024-12-17T22:13:23Z",
    "attributes": {
      "type": "ApplicationDeploymentRequest",
      "version": "1.0.6",
      "application": "crn://cerc-io/applications/test-progressive-web-app@0.1.1",
      "config": {
        "env": {
          "CERC_WEBAPP_DEBUG": "57588a9d"
        }
      },
      "tags": [
        "a",
        "b",
        "c"
      ]
    }
  }
]
This fixes #129, by indexing each value of a multivalued attribute. This handles at least the most common use case, so that we can search on a single value of the attribute. ``` ❯ laconic -c ~/.laconic/local.yml cns record list --all --type ApplicationDeploymentRequest --tags b [ { "id": "bafyreidrp4pylixp44rkxu5il72qhwwc4ir5ctdnssps5rnelstloxivwm", "names": null, "owners": [ "FCCE01FCC2472AEDBCF33902907F33262445AC2C" ], "bondId": "4ef470a9207f00fc07663623d092a14c310794b616eb53b085cfe6976e82f56d", "createTime": "2023-12-18T22:13:23Z", "expiryTime": "2024-12-17T22:13:23Z", "attributes": { "type": "ApplicationDeploymentRequest", "version": "1.0.6", "application": "crn://cerc-io/applications/test-progressive-web-app@0.1.1", "config": { "env": { "CERC_WEBAPP_DEBUG": "57588a9d" } }, "tags": [ "a", "b", "c" ] } } ] ```
telackey added 1 commit 2023-12-18 22:24:34 +00:00
Index multivalued attributes.
Some checks failed
Build / cleanup-runs (pull_request) Failing after 3s
Deploy Contract / cleanup-runs (pull_request) Failing after 3s
Deploy Contract / deploy (pull_request) Failing after 24s
Dependency Review / dependency-review (pull_request) Failing after 42s
Pull Request Labeler / triage (pull_request) Successful in 12s
Build / build (pull_request) Failing after 1m11s
Lint / Run flake8 on python integration tests (pull_request) Failing after 38s
Lint / Run golangci-lint (pull_request) Failing after 41s
Run Gosec / Gosec (pull_request) Failing after 18s
Tests / cleanup-runs (pull_request) Failing after 11s
Semgrep / Scan (pull_request) Failing after 13s
Tests / test-importer (pull_request) Failing after 53s
Tests / test-rpc (pull_request) Failing after 51s
Tests / test-unit-cover (pull_request) Failing after 1m1s
Tests / sdk_tests (pull_request) Failing after 1m45s
CodeQL / Analyze (go) (pull_request) Failing after 4m19s
58789fbf62
telackey self-assigned this 2023-12-18 22:24:44 +00:00
telackey changed title from 127: Index multivalued attributes. to 129: Index multivalued attributes. 2023-12-18 22:29:01 +00:00
telackey requested review from dboreham 2023-12-18 22:34:11 +00:00
telackey added 1 commit 2023-12-18 22:35:01 +00:00
Remove debugging lines
Some checks failed
Build / cleanup-runs (pull_request) Successful in 7s
Deploy Contract / cleanup-runs (pull_request) Successful in 5s
CodeQL / Analyze (go) (pull_request) Successful in 29s
Deploy Contract / deploy (pull_request) Failing after 37s
Pull Request Labeler / triage (pull_request) Successful in 21s
Build / build (pull_request) Successful in 1m19s
Dependency Review / dependency-review (pull_request) Successful in 1m19s
Lint / Run flake8 on python integration tests (pull_request) Failing after 23s
Run Gosec / Gosec (pull_request) Successful in 19s
Semgrep / Scan (pull_request) Failing after 18s
Tests / cleanup-runs (pull_request) Successful in 23s
Lint / Run golangci-lint (pull_request) Successful in 1m44s
Tests / test-importer (pull_request) Successful in 1m4s
Tests / test-unit-cover (pull_request) Successful in 1m7s
Tests / test-rpc (pull_request) Successful in 1m11s
Tests / sdk_tests (pull_request) Failing after 3m26s
61169a43c0
telackey added 1 commit 2023-12-18 22:37:51 +00:00
if instead of switch
Some checks failed
Build / cleanup-runs (pull_request) Failing after 2s
Build / build (pull_request) Successful in 39s
Deploy Contract / cleanup-runs (pull_request) Failing after 5s
Dependency Review / dependency-review (pull_request) Successful in 1m24s
CodeQL / Analyze (go) (pull_request) Successful in 1m45s
Pull Request Labeler / triage (pull_request) Successful in 19s
Deploy Contract / deploy (pull_request) Failing after 1m2s
Lint / Run flake8 on python integration tests (pull_request) Failing after 23s
Run Gosec / Gosec (pull_request) Successful in 27s
Tests / cleanup-runs (pull_request) Failing after 2s
Lint / Run golangci-lint (pull_request) Successful in 36s
Semgrep / Scan (pull_request) Failing after 16s
Tests / test-importer (pull_request) Successful in 1m14s
Tests / test-unit-cover (pull_request) Successful in 1m18s
Tests / test-rpc (pull_request) Successful in 1m15s
Tests / sdk_tests (pull_request) Failing after 2m24s
911f4ec252
telackey added 1 commit 2023-12-18 23:53:40 +00:00
Add test case
Some checks failed
Build / cleanup-runs (pull_request) Successful in 5s
Deploy Contract / cleanup-runs (pull_request) Successful in 6s
Deploy Contract / deploy (pull_request) Failing after 42s
Build / build (pull_request) Successful in 55s
Dependency Review / dependency-review (pull_request) Successful in 53s
CodeQL / Analyze (go) (pull_request) Successful in 1m1s
Pull Request Labeler / triage (pull_request) Successful in 10s
Semgrep / Scan (pull_request) Failing after 10s
Run Gosec / Gosec (pull_request) Successful in 19s
Tests / cleanup-runs (pull_request) Successful in 8s
Lint / Run golangci-lint (pull_request) Successful in 55s
Lint / Run flake8 on python integration tests (pull_request) Failing after 52s
Tests / test-rpc (pull_request) Successful in 50s
Tests / test-importer (pull_request) Successful in 1m48s
Tests / test-unit-cover (pull_request) Successful in 1m56s
Tests / sdk_tests (pull_request) Failing after 2m17s
a310c375ab
telackey merged commit ae07fc0147 into main 2023-12-19 06:55:12 +00:00
telackey deleted branch telackey/tags 2023-12-19 06:55:12 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 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#128
No description provided.