Commit Graph

1300 Commits

Author SHA1 Message Date
ea30697b50 Use custom KV store gas config for all laconic txs
Some checks failed
Deploy Contract / deploy (pull_request) Successful in 1m25s
Build / build (pull_request) Successful in 2m25s
Tests / test-rpc (pull_request) Successful in 5m47s
Tests / test-importer (pull_request) Successful in 16m25s
Tests / test-unit (pull_request) Successful in 6m43s
Tests / sdk_tests (pull_request) Successful in 9m36s
Lint / Run golangci-lint (pull_request) Failing after 4m21s
Lint / Run flake8 on python integration tests (pull_request) Successful in 1m43s
2024-04-03 11:46:15 +05:30
4531d9238f Use custom KV store gas config for set record operation 2024-04-03 10:09:02 +05:30
1ea6d6b647 Remove unicode character
All checks were successful
Lint / Run flake8 on python integration tests (push) Successful in 2m43s
Lint / Run golangci-lint (push) Successful in 5m37s
Tests / test-rpc (push) Successful in 4m26s
Tests / test-importer (push) Successful in 20m54s
Tests / sdk_tests (push) Successful in 8m13s
Tests / test-unit (push) Successful in 6m34s
2024-02-12 13:27:48 +00:00
d65dcce302 Split up SDK tests. (#143)
All checks were successful
Lint / Run flake8 on python integration tests (push) Successful in 3m47s
Lint / Run golangci-lint (push) Successful in 5m32s
Tests / test-rpc (push) Successful in 6m8s
Tests / test-importer (push) Successful in 10m2s
Tests / test-unit (push) Successful in 6m56s
Tests / sdk_tests (push) Successful in 16m20s
Reviewed-on: cerc-io/laconicd#143
Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com>
Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
2024-01-23 18:41:04 +00:00
1833b14e25 Disable .github workflows. (#141)
Some checks failed
Lint / Run flake8 on python integration tests (push) Successful in 2m48s
Lint / Run golangci-lint (push) Successful in 5m2s
Tests / test-rpc (push) Failing after 6m5s
Tests / test-unit (push) Failing after 5m52s
Tests / sdk_tests (push) Failing after 8m56s
Tests / test-importer (push) Has been cancelled
Reviewed-on: cerc-io/laconicd#141
Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com>
Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
2024-01-23 18:02:48 +00:00
02991c7135 Split tests (#139)
All checks were successful
Lint / Run flake8 on python integration tests (push) Successful in 3m21s
Lint / Run golangci-lint (push) Successful in 5m26s
Tests / test-rpc (push) Successful in 6m3s
Tests / test-importer (push) Successful in 9m57s
Tests / test-unit (push) Successful in 5m47s
Tests / sdk_tests (push) Successful in 21m32s
Split up the test workflows.

Reviewed-on: cerc-io/laconicd#139
Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com>
Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
2024-01-23 07:19:09 +00:00
348ae680c6 Revert to GH-version
Some checks failed
Lint / Run flake8 on python integration tests (push) Successful in 3m30s
Lint / Run golangci-lint (push) Successful in 6m46s
Tests / test-rpc (push) Successful in 5m49s
Tests / test-unit (push) Failing after 6m31s
Tests / test-importer (push) Successful in 20m18s
Tests / sdk_tests (push) Successful in 21m10s
2024-01-23 00:03:28 -06:00
965d7dbb66 Minimal set of working Gitea workflows. (#138)
Some checks failed
Tests / test-rpc (push) Waiting to run
Tests / sdk_tests (push) Waiting to run
Lint / Run flake8 on python integration tests (push) Successful in 3m24s
Tests / test-unit (push) Has been cancelled
Lint / Run golangci-lint (push) Has been cancelled
Tests / test-importer (push) Has been cancelled
As a first step on cerc-io/laconicd#116, provide a minimal set of actions which are either already working or expected to work on Gitea.

Reviewed-on: cerc-io/laconicd#138
Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com>
Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
2024-01-23 05:58:12 +00:00
e7bab9b971 Restore CMD rather than ENTRYPOINT (#136)
Some checks failed
Pull Request Labeler / triage (push) Successful in 5s
Lint / Run golangci-lint (push) Successful in 29s
CodeQL / Analyze (go) (push) Has been cancelled
Lint / Run flake8 on python integration tests (push) Has been cancelled
Run Gosec / Gosec (push) Has been cancelled
Tests / cleanup-runs (push) Has been skipped
Tests / test-importer (push) Has been cancelled
Tests / test-rpc (push) Has been cancelled
Tests / sdk_tests (push) Has been cancelled
Tests / test-unit-cover (push) Has been cancelled
Switching to ENTRYPOINT broke the SO fixturenet stack.

I think there are arguments both ways as to whether ENTRYPOINT or CMD is more appropriate in this case, but in general I lean towards not breaking something that was working without a strong reason.

Reviewed-on: cerc-io/laconicd#136
Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com>
Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
2024-01-22 23:19:08 +00:00
28b9207bbe Restore waiting for the server to be up before launching tests. (#135)
Some checks failed
CodeQL / Analyze (go) (push) Successful in 42s
Pull Request Labeler / triage (push) Successful in 30s
Lint / Run golangci-lint (push) Successful in 1m9s
Tests / cleanup-runs (push) Has been skipped
Tests / test-unit-cover (push) Successful in 44s
Lint / Run flake8 on python integration tests (push) Failing after 1m55s
Tests / test-importer (push) Successful in 36s
Run Gosec / Gosec (push) Successful in 2m3s
Tests / test-rpc (push) Successful in 1m17s
Tests / sdk_tests (push) Failing after 7m14s
Reviewed-on: cerc-io/laconicd#135
Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com>
Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
2024-01-22 22:24:14 +00:00
055cfb2255 Clean up test suite (#134)
Some checks failed
Pull Request Labeler / triage (push) Successful in 8s
CodeQL / Analyze (go) (push) Failing after 1m24s
Run Gosec / Gosec (push) Failing after 36s
Tests / cleanup-runs (push) Has been skipped
Lint / Run flake8 on python integration tests (push) Failing after 1m54s
Lint / Run golangci-lint (push) Successful in 4m40s
Tests / test-unit-cover (push) Failing after 7m27s
Tests / test-rpc (push) Successful in 5m24s
Tests / test-importer (push) Successful in 8m53s
Tests / sdk_tests (push) Failing after 12m8s
This attempts to simplify tests, and make them generally more usable:
- simplifies CI jobs
- makefile tweaks, init.sh clean up
- small dockerfile, compose, etc. improvements
- removes sdk-tester dockerfile, the sdk repo has it
- removes redundant test scripts, improve run-tests
- simplifies and removes redundant logic in test suite. covers ignored errors
- adds logging context, doc updates

Co-authored-by: Roy Crihfield <roy@manteia.ltd>
Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
Reviewed-on: cerc-io/laconicd#134
Reviewed-by: Thomas E Lackey <telackey@noreply.git.vdb.to>
Co-authored-by: Prathamesh Musale <prathamesh@noreply.git.vdb.to>
Co-committed-by: Prathamesh Musale <prathamesh@noreply.git.vdb.to>
2024-01-22 10:27:08 +00:00
776799ea02 Remove hard-coded record types (#132)
Some checks failed
Pull Request Labeler / triage (push) Successful in 58s
Run Gosec / Gosec (push) Failing after 2m29s
Tests / cleanup-runs (push) Has been skipped
Lint / Run flake8 on python integration tests (push) Failing after 4m48s
Tests / test-unit-cover (push) Failing after 8m52s
Tests / sdk_tests (push) Failing after 22s
Tests / test-rpc (push) Failing after 1m18s
Lint / Run golangci-lint (push) Successful in 15m15s
Tests / test-importer (push) Successful in 11m6s
CodeQL / Analyze (go) (push) Failing after 3m14s
Semgrep / Scan (push) Failing after 47s
- 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.

Co-authored-by: Roy Crihfield <roy@manteia.ltd>
Co-authored-by: neeraj <neeraj.rtly@gmail.com>
Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
Reviewed-on: cerc-io/laconicd#132
Reviewed-by: Thomas E Lackey <telackey@noreply.git.vdb.to>
Co-authored-by: Nabarun <nabarun@deepstacksoft.com>
Co-committed-by: Nabarun <nabarun@deepstacksoft.com>
2024-01-15 04:20:38 +00:00
9c240f1a0c Add comment to script. (#133)
Some checks failed
Pull Request Labeler / triage (push) Successful in 6s
Run Gosec / Gosec (push) Successful in 23s
Tests / cleanup-runs (push) Has been skipped
Lint / Run golangci-lint (push) Successful in 1m32s
CodeQL / Analyze (go) (push) Successful in 1m37s
Lint / Run flake8 on python integration tests (push) Failing after 1m58s
Tests / test-unit-cover (push) Successful in 1m43s
Tests / test-importer (push) Successful in 1m23s
Tests / test-rpc (push) Successful in 1m28s
Tests / sdk_tests (push) Failing after 2m30s
```
##
## This script generates a new account keypair, transfers funds to it, and creates
## a bond with those funds.  The amount of can be optionally specified, else a
## default value estimated to be sufficient for about 5000 records.
##
## The `laconic` CLI and a valid config file for it are required.  The default location
## for the config file is `~/.laconic/config.yml`, but this can be controlled with
## the environment variable LACONIC_CONFIG.  A `userKey` for a source account with
## sufficient funds available must be present in this file for the funds transfer
## to succeed.
##
## Example:
##
## ❯ scripts/create-and-fund-account.sh 1000000000
## {
##   "name": "68334d7175fd4f86befa4902657e5270",
##   "type": "local",
##   "address": "ethm15r5x94km0swq55aszwd7hnr9wksq7wmr38xes7",
##   "pubkey": "AuKqlSldJJXj4gYMFt2HeX9DJ3aUosYA7n6zBz9Tg7/i",
##   "mnemonic": "umbrella bean special unaware accident giant distance mix ghost feel possible cost road grant endless man maple derive rebuild learn mask water attract resist",
##   "bond": "3d3a73f09115d289d330781455e6eac217305dc4a20e19bde808011fe3775a93",
##   "balance": 1000000000,
##   "privkey": "480880fde7aff1461da584b436cb3a84692413c84623fda78e127bb4e704ce76"
## }
##
```

Reviewed-on: cerc-io/laconicd#133
Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com>
Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
2024-01-11 23:26:44 +00:00
ec70c9f36b Add a script to simplify creating and funding a new account. (#131)
Some checks failed
Pull Request Labeler / triage (push) Successful in 23s
Run Gosec / Gosec (push) Successful in 25s
Tests / cleanup-runs (push) Has been skipped
CodeQL / Analyze (go) (push) Successful in 1m26s
Tests / test-unit-cover (push) Successful in 1m38s
Lint / Run golangci-lint (push) Successful in 2m42s
Tests / test-importer (push) Successful in 1m28s
Lint / Run flake8 on python integration tests (push) Failing after 2m56s
Tests / test-rpc (push) Successful in 1m3s
Tests / sdk_tests (push) Failing after 1m59s
Add a script for creating funded test accounts simply.

```
❯ scripts/create-and-fund-account.sh
{
  "name": "68334d7175fd4f86befa4902657e5270",
  "type": "local",
  "address": "ethm15r5x94km0swq55aszwd7hnr9wksq7wmr38xes7",
  "pubkey": "AuKqlSldJJXj4gYMFt2HeX9DJ3aUosYA7n6zBz9Tg7/i",
  "mnemonic": "umbrella bean special unaware accident giant distance mix ghost feel possible cost road grant endless man maple derive rebuild learn mask water attract resist",
  "bond": "3d3a73f09115d289d330781455e6eac217305dc4a20e19bde808011fe3775a93",
  "balance": 5000000000,
  "privkey": "480880fde7aff1461da584b436cb3a84692413c84623fda78e127bb4e704ce76"
}
```

Reviewed-on: cerc-io/laconicd#131
Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com>
Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
2024-01-10 23:04:53 +00:00
ed81bba3ed Add ApplicationDeploymentRemovalRequests (#130)
Some checks failed
Pull Request Labeler / triage (push) Successful in 24s
Lint / Run flake8 on python integration tests (push) Failing after 30s
CodeQL / Analyze (go) (push) Failing after 57s
Tests / cleanup-runs (push) Has been skipped
Lint / Run golangci-lint (push) Successful in 5m11s
Run Gosec / Gosec (push) Failing after 7m1s
Tests / test-unit-cover (push) Failing after 7m1s
Tests / sdk_tests (push) Failing after 2m6s
Tests / test-rpc (push) Failing after 4m24s
Tests / test-importer (push) Successful in 8m39s
```
message ApplicationDeploymentRemovalRequest {
  string type           = 1 [(gogoproto.moretags) = "json:\"type\" yaml:\"type\""];
  string version        = 2 [(gogoproto.moretags) = "json:\"version\" yaml:\"version\""];
  string deployment     = 3 [(gogoproto.moretags) = "json:\"deployment\" yaml:\"deployment\""];
  string request        = 4 [(gogoproto.moretags) = "json:\"request\" yaml:\"request\""];
  string meta           = 20 [(gogoproto.moretags) = "json:\"meta\" yaml:\"meta\""];
  repeated string tags  = 21 [(gogoproto.moretags) = "json:\"tags\" yaml:\"tags\""];
}

message ApplicationDeploymentRemovalRecord {
  string type           = 1 [(gogoproto.moretags) = "json:\"type\" yaml:\"type\""];
  string version        = 2 [(gogoproto.moretags) = "json:\"version\" yaml:\"version\""];
  string deployment     = 3 [(gogoproto.moretags) = "json:\"deployment\" yaml:\"deployment\""];
  string request        = 4 [(gogoproto.moretags) = "json:\"request\" yaml:\"request\""];
  string meta           = 20 [(gogoproto.moretags) = "json:\"meta\" yaml:\"meta\""];
  repeated string tags  = 21 [(gogoproto.moretags) = "json:\"tags\" yaml:\"tags\""];
}
```

Reviewed-on: cerc-io/laconicd#130
Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com>
Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
2023-12-21 21:21:03 +00:00
ae07fc0147 129: Index multivalued attributes. (#128)
Some checks failed
Pull Request Labeler / triage (push) Successful in 6s
Lint / Run flake8 on python integration tests (push) Failing after 15s
Tests / cleanup-runs (push) Has been skipped
CodeQL / Analyze (go) (push) Failing after 2m16s
Lint / Run golangci-lint (push) Successful in 5m57s
Run Gosec / Gosec (push) Failing after 9m59s
Tests / test-unit-cover (push) Failing after 10m7s
Tests / test-rpc (push) Failing after 4m27s
Tests / sdk_tests (push) Failing after 2m45s
Tests / test-importer (push) Successful in 11m36s
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"
      ]
    }
  }
]
```

Reviewed-on: cerc-io/laconicd#128
Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com>
Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
2023-12-19 06:55:11 +00:00
588c52c0b2 Register ApplicationArtifact proto. (#126)
Some checks failed
Pull Request Labeler / triage (push) Successful in 18s
CodeQL / Analyze (go) (push) Failing after 1m14s
Lint / Run flake8 on python integration tests (push) Failing after 33s
Tests / cleanup-runs (push) Has been skipped
Run Gosec / Gosec (push) Failing after 32s
Tests / test-rpc (push) Failing after 4m56s
Tests / sdk_tests (push) Failing after 2m19s
Tests / test-unit-cover (push) Failing after 7m49s
Tests / test-importer (push) Successful in 11m14s
Lint / Run golangci-lint (push) Successful in 13m18s
Register the new ApplicationArtifact type.

Reviewed-on: cerc-io/laconicd#126
Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com>
Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
2023-12-14 02:54:57 +00:00
c407145c31 Make 'repository' a repeated value and add ApplicationArtifact type. (#125)
Some checks failed
Pull Request Labeler / triage (push) Successful in 2s
CodeQL / Analyze (go) (push) Failing after 1m19s
Lint / Run flake8 on python integration tests (push) Failing after 1m17s
Tests / cleanup-runs (push) Has been skipped
Lint / Run golangci-lint (push) Successful in 4m50s
Tests / test-unit-cover (push) Failing after 6m33s
Run Gosec / Gosec (push) Failing after 7m42s
Tests / sdk_tests (push) Failing after 2m29s
Tests / test-rpc (push) Failing after 4m3s
Tests / test-importer (push) Successful in 10m55s
Make 'repository' a repeated value and ApplicationArtifact type.

Reviewed-on: cerc-io/laconicd#125
Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com>
Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
2023-12-13 20:51:33 +00:00
8077a7a85a The attribute name should be deployment, not crn
Some checks failed
Pull Request Labeler / triage (push) Successful in 4s
Run Gosec / Gosec (push) Failing after 12s
Tests / cleanup-runs (push) Has been skipped
Lint / Run flake8 on python integration tests (push) Failing after 17s
CodeQL / Analyze (go) (push) Failing after 1m50s
Tests / test-rpc (push) Failing after 4m25s
Tests / test-unit-cover (push) Failing after 7m1s
Tests / sdk_tests (push) Failing after 3m50s
Tests / test-importer (push) Successful in 10m45s
Lint / Run golangci-lint (push) Successful in 14m7s
Semgrep / Scan (push) Failing after 16s
2023-12-07 22:35:40 -06:00
47d086111d Add DnsRecord and ApplicationDeploymentRequest (#124)
Some checks failed
Pull Request Labeler / triage (push) Successful in 3s
Lint / Run flake8 on python integration tests (push) Failing after 27s
Tests / cleanup-runs (push) Has been skipped
Lint / Run golangci-lint (push) Successful in 3m44s
Tests / test-importer (push) Failing after 1m28s
Tests / sdk_tests (push) Failing after 3m12s
Run Gosec / Gosec (push) Failing after 8m26s
Tests / test-rpc (push) Failing after 5m22s
Tests / test-unit-cover (push) Failing after 8m46s
CodeQL / Analyze (go) (push) Failing after 1m57s
> Note: This has a breaking protobuf change, but that is known and OK, as the previous release has not been deployed externally.

```
message DnsRecord {
  string type           = 1 [(gogoproto.moretags) = "json:\"type\" yaml:\"type\""];
  string name           = 2 [(gogoproto.moretags) = "json:\"name\" yaml:\"name\""];
  string version        = 3 [(gogoproto.moretags) = "json:\"version\" yaml:\"version\""];
  string resource_type  = 4 [(gogoproto.moretags) = "json:\"resourceType\" yaml:\"resourceType\""];
  string value          = 5 [(gogoproto.moretags) = "json:\"value\" yaml:\"value\""];
  string meta           = 20 [(gogoproto.moretags) = "json:\"meta\" yaml:\"meta\""];
  repeated string tags  = 21 [(gogoproto.moretags) = "json:\"tags\" yaml:\"tags\""];
}

message ApplicationDeploymentRequest {
  string type           = 1 [(gogoproto.moretags) = "json:\"type\" yaml:\"type\""];
  string name           = 2 [(gogoproto.moretags) = "json:\"name\" yaml:\"name\""];
  string version        = 3 [(gogoproto.moretags) = "json:\"version\" yaml:\"version\""];
  string application    = 4 [(gogoproto.moretags) = "json:\"application\" yaml:\"application\""];
  string dns            = 5 [(gogoproto.moretags) = "json:\"dns\" yaml:\"dns\""];
  string config         = 6 [(gogoproto.moretags) = "json:\"config\" yaml:\"config\""];
  repeated string crn   = 7 [(gogoproto.moretags) = "json:\"crn\" yaml:\"crn\""];
  string meta           = 20 [(gogoproto.moretags) = "json:\"meta\" yaml:\"meta\""];
  repeated string tags  = 21 [(gogoproto.moretags) = "json:\"tags\" yaml:\"tags\""];
}
```

Also rename WebAppDeploymentRecord to ApplicationDeploymentRecord.

Reviewed-on: cerc-io/laconicd#124
Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com>
Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
2023-12-07 22:19:10 +00:00
880367d5df 122: Fix attribute index key collision (#123)
Some checks failed
CodeQL / Analyze (go) (push) Failing after 2m13s
Lint / Run flake8 on python integration tests (push) Failing after 16s
Run Gosec / Gosec (push) Failing after 6m55s
Tests / cleanup-runs (push) Has been skipped
Lint / Run golangci-lint (push) Successful in 13m47s
Tests / test-unit-cover (push) Failing after 7m10s
Tests / test-rpc (push) Failing after 4m27s
Tests / sdk_tests (push) Failing after 2m29s
Tests / test-importer (push) Failing after 12m41s
Pull Request Labeler / triage (push) Successful in 3s
Fix #122, where the structure of the index key allowed unintended collisions (see below).

This also adds a test cases which _fails_ under the old scheme, but passes now:

**Before:**

```
--- FAIL: TestKeeperTestSuite (0.31s)
    --- FAIL: TestKeeperTestSuite/TestGrpcGetRecordLists (0.09s)
        grpc_query_test.go:143:
                Error Trace:    /home/telackey/cerc/laconicd/x/registry/keeper/grpc_query_test.go:143
                                                        /home/telackey/cerc/laconicd/x/registry/keeper/suite.go:91
                Error:          Not equal:
                                expected: 0
                                actual  : 1
                Test:           TestKeeperTestSuite/TestGrpcGetRecordLists
        --- FAIL: TestKeeperTestSuite/TestGrpcGetRecordLists/Case_Filter_with_typ_(cerc-io/laconicd#122)_ (0.00s)
            testing.go:1490: test executed panic(nil) or runtime.Goexit: subtest may have called FailNow on a parent test
FAIL
FAIL    github.com/cerc-io/laconicd/x/registry/keeper   0.765s
FAIL
make: *** [Makefile:333: run-tests] Error 1

❯ laconic cns record list --all --typ eWebsiteRegistrationRecord
[
  {
    "id": "bafyreies5he2mxyrjso2quewwlmh6cisekkjnf7yijpd2742wrzxgzuazi",
    "names": null,
    "owners": [
      "FC9B9FB065D70DBB10C8F511348421C16669B37D"
    ],
    "bondId": "a9c7161fc154cf44ee61efc699a59c8a27c804bb23ce4c8a7ffa0a39fcc540b1",
    "createTime": "2023-11-28T19:09:03Z",
    "expiryTime": "2024-11-27T19:09:03Z",
    "attributes": {
      "url": "https://hello-urbit.laconic.com",
      "repo_registration_record_cid": "QmTZQ8ZJS6mALjEM2wY71msFno6zzxFftVCiZELj9xREPx",
      "build_artifact_cid": "~lostex-rabdur-labtul-moltev/hello-urbit",
      "tls_cert_cid": "QmR1acEmQt7Tjmhp9cFtymie2eFcrHURQKt9kGto1TQTW1",
      "type": "WebsiteRegistrationRecord",
      "version": "0.2.4"
    }
  }
...

❯ laconic cns record list --all --type WebsiteRegistrationRecord
[
  {
    "id": "bafyreies5he2mxyrjso2quewwlmh6cisekkjnf7yijpd2742wrzxgzuazi",
    "names": null,
    "owners": [
      "FC9B9FB065D70DBB10C8F511348421C16669B37D"
    ],
    "bondId": "a9c7161fc154cf44ee61efc699a59c8a27c804bb23ce4c8a7ffa0a39fcc540b1",
    "createTime": "2023-11-28T19:09:03Z",
    "expiryTime": "2024-11-27T19:09:03Z",
    "attributes": {
      "url": "https://hello-urbit.laconic.com",
      "repo_registration_record_cid": "QmTZQ8ZJS6mALjEM2wY71msFno6zzxFftVCiZELj9xREPx",
      "build_artifact_cid": "~lostex-rabdur-labtul-moltev/hello-urbit",
      "tls_cert_cid": "QmR1acEmQt7Tjmhp9cFtymie2eFcrHURQKt9kGto1TQTW1",
      "type": "WebsiteRegistrationRecord",
      "version": "0.2.4"
    }
  }
...
```

**After:**

```
ok      github.com/cerc-io/laconicd/x/registry/keeper   1.573s

❯ laconic cns record list --all --typ eWebsiteRegistrationRecord
[]

❯ laconic cns record list --all --type WebsiteRegistrationRecord
[
  {
    "id": "bafyreies5he2mxyrjso2quewwlmh6cisekkjnf7yijpd2742wrzxgzuazi",
    "names": null,
    "owners": [
      "FC9B9FB065D70DBB10C8F511348421C16669B37D"
    ],
    "bondId": "a9c7161fc154cf44ee61efc699a59c8a27c804bb23ce4c8a7ffa0a39fcc540b1",
    "createTime": "2023-11-28T19:09:03Z",
    "expiryTime": "2024-11-27T19:09:03Z",
    "attributes": {
      "url": "https://hello-urbit.laconic.com",
      "repo_registration_record_cid": "QmTZQ8ZJS6mALjEM2wY71msFno6zzxFftVCiZELj9xREPx",
      "build_artifact_cid": "~lostex-rabdur-labtul-moltev/hello-urbit",
      "tls_cert_cid": "QmR1acEmQt7Tjmhp9cFtymie2eFcrHURQKt9kGto1TQTW1",
      "type": "WebsiteRegistrationRecord",
      "version": "0.2.4"
    }
  }
...
```

Reviewed-on: cerc-io/laconicd#123
Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com>
Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
2023-11-29 00:05:56 +00:00
0adc932400 118: queryRecords should return [] when no matching records exist, not an error (#121)
Some checks failed
Pull Request Labeler / triage (push) Successful in 7s
Lint / Run flake8 on python integration tests (push) Failing after 31s
Tests / cleanup-runs (push) Has been skipped
CodeQL / Analyze (go) (push) Failing after 2m29s
Lint / Run golangci-lint (push) Successful in 5m43s
Run Gosec / Gosec (push) Failing after 7m38s
Tests / test-unit-cover (push) Failing after 7m49s
Tests / test-rpc (push) Failing after 3m53s
Tests / sdk_tests (push) Failing after 3m14s
Tests / test-importer (push) Failing after 13m15s
Whenever a key is used which doesn't exist in the DB at all, an error is returned like this:

```
[
  {
    message: `rpc error: code = Unknown desc = store doesn't have key: "\\atypeApplicationRecord"`,
    path: [ 'queryRecords' ]
  }
]
```

That doesn't make any sense, as it is not an error to find out that the thing you asked for does not exist.  This changes it to return an empty list.

Reviewed-on: cerc-io/laconicd#121
Reviewed-by: David Boreham <dboreham@noreply.git.vdb.to>
Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com>
Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
2023-11-28 20:41:28 +00:00
d57743bfd5 119: Disable "stale" workflow. (#120)
Some checks failed
Pull Request Labeler / triage (push) Successful in 3s
Run Gosec / Gosec (push) Successful in 13s
Tests / cleanup-runs (push) Has been skipped
Lint / Run flake8 on python integration tests (push) Failing after 17s
CodeQL / Analyze (go) (push) Successful in 44s
Tests / test-unit-cover (push) Successful in 58s
Tests / test-importer (push) Successful in 58s
Lint / Run golangci-lint (push) Successful in 1m31s
Tests / test-rpc (push) Successful in 1m2s
Tests / sdk_tests (push) Failing after 1m36s
Remove the workflow that automatically marks PRs and issues as stale.

Reviewed-on: cerc-io/laconicd#120
Reviewed-by: David Boreham <dboreham@noreply.git.vdb.to>
Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com>
Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
2023-11-28 19:06:10 +00:00
20a6828bb5 Make init.sh re-runnable safely. (#117)
Some checks failed
Pull Request Labeler / triage (push) Successful in 4s
Lint / Run flake8 on python integration tests (push) Failing after 14s
Tests / cleanup-runs (push) Has been skipped
CodeQL / Analyze (go) (push) Successful in 53s
Lint / Run golangci-lint (push) Successful in 1m1s
Tests / test-unit-cover (push) Successful in 1m25s
Run Gosec / Gosec (push) Successful in 1m45s
Tests / test-rpc (push) Successful in 1m15s
Tests / test-importer (push) Successful in 1m7s
Tests / sdk_tests (push) Failing after 2m33s
Make it possible to re-run init.sh safely.  If you really want to wipe an existing DB, run `init.sh clean` .

Reviewed-on: cerc-io/laconicd#117
Reviewed-by: David Boreham <dboreham@noreply.git.vdb.to>
Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com>
Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
2023-11-22 17:31:15 +00:00
976a97234f Fix lint errors (which are actually bugs in linting dependencies) (#114)
Some checks failed
Pull Request Labeler / triage (push) Successful in 2s
Lint / Run flake8 on python integration tests (push) Failing after 38s
CodeQL / Analyze (go) (push) Failing after 2m7s
Tests / cleanup-runs (push) Has been skipped
Run Gosec / Gosec (push) Failing after 1m31s
Lint / Run golangci-lint (push) Successful in 4m48s
Tests / test-rpc (push) Failing after 4m15s
Tests / sdk_tests (push) Failing after 1m45s
Tests / test-unit-cover (push) Failing after 8m38s
Tests / test-importer (push) Successful in 8m58s
Work around bug https://github.com/golangci/golangci-lint/issues/3906 and https://github.com/cachix/install-nix-action/issues/161 and address other lint/CI issues.

Reviewed-on: cerc-io/laconicd#114
Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com>
Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
2023-11-21 04:57:52 +00:00
072b174c9b Add new record types ApplicationRecord, WebAppDeploymentRecord, GeneralRecord (#113)
Some checks failed
Pull Request Labeler / triage (push) Successful in 8s
Lint / Run flake8 on python integration tests (push) Failing after 57s
Tests / cleanup-runs (push) Has been skipped
CodeQL / Analyze (go) (push) Failing after 1m2s
Run Gosec / Gosec (push) Failing after 7m16s
Tests / test-unit-cover (push) Failing after 6m50s
Tests / sdk_tests (push) Failing after 2m9s
Tests / test-importer (push) Successful in 9m6s
Tests / test-rpc (push) Failing after 4m10s
Lint / Run golangci-lint (push) Failing after 13m16s
See also: WIP: cerc-io/laconic-sdk#44

```
message ApplicationRecord {
  string type           = 1 [(gogoproto.moretags) = "json:\"type\" yaml:\"type\""];
  string name           = 2 [(gogoproto.moretags) = "json:\"name\" yaml:\"name\""];
  string description    = 3 [(gogoproto.moretags) = "json:\"description\" yaml:\"description\""];
  string version        = 4 [(gogoproto.moretags) = "json:\"version\" yaml:\"version\""];
  string homepage       = 5 [(gogoproto.moretags) = "json:\"homepage\" yaml:\"homepage\""];
  string license        = 6 [(gogoproto.moretags) = "json:\"license\" yaml:\"license\""];
  string author         = 7 [(gogoproto.moretags) = "json:\"author\" yaml:\"author\""];
  string repository     = 8 [(gogoproto.moretags) = "json:\"repository\" yaml:\"repository\""];
  string repository_tag = 9 [(gogoproto.moretags) = "json:\"repositoryTag\" yaml:\"repositoryTag\""];
  string app_version    = 10 [(gogoproto.moretags) = "json:\"appVersion\" yaml:\"appVersion\""];
  string app_type       = 11 [(gogoproto.moretags) = "json:\"appType\" yaml:\"appType\""];
  string meta           = 20 [(gogoproto.moretags) = "json:\"meta\" yaml:\"meta\""];
  repeated string tags  = 21 [(gogoproto.moretags) = "json:\"tags\" yaml:\"tags\""];
}

message WebAppDeploymentRecord {
  string type           = 1 [(gogoproto.moretags) = "json:\"type\" yaml:\"type\""];
  string name           = 2 [(gogoproto.moretags) = "json:\"name\" yaml:\"name\""];
  string description    = 3 [(gogoproto.moretags) = "json:\"description\" yaml:\"description\""];
  string version        = 4 [(gogoproto.moretags) = "json:\"version\" yaml:\"version\""];
  string application    = 5 [(gogoproto.moretags) = "json:\"application\" yaml:\"application\""];
  string url            = 6 [(gogoproto.moretags) = "json:\"\" yaml:\"name\""];
  string meta           = 20 [(gogoproto.moretags) = "json:\"meta\" yaml:\"meta\""];
  repeated string tags  = 21 [(gogoproto.moretags) = "json:\"tags\" yaml:\"tags\""];
}

message GeneralRecord {
  string type           = 1 [(gogoproto.moretags) = "json:\"type\" yaml:\"type\""];
  string name           = 2 [(gogoproto.moretags) = "json:\"name\" yaml:\"name\""];
  string description    = 3 [(gogoproto.moretags) = "json:\"description\" yaml:\"description\""];
  string version        = 4 [(gogoproto.moretags) = "json:\"version\" yaml:\"version\""];
  string category       = 5 [(gogoproto.moretags) = "json:\"category\" yaml:\"category\""];
  string value          = 6 [(gogoproto.moretags) = "json:\"value\" yaml:\"value\""];
  string meta           = 20 [(gogoproto.moretags) = "json:\"meta\" yaml:\"meta\""];
  repeated string tags  = 21 [(gogoproto.moretags) = "json:\"tags\" yaml:\"tags\""];
```

Reviewed-on: cerc-io/laconicd#113
Reviewed-by: David Boreham <dboreham@noreply.git.vdb.to>
Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com>
Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
2023-11-20 22:01:03 +00:00
Zach
a5681191a5
Merge pull request #102 from cerc-io/murali/ipld-prime
upgrade IPLD prime
2023-03-22 09:43:52 -04:00
0xmuralik
1cdf15595e change comment 2023-03-20 11:18:13 +05:30
0xmuralik
2cc5df02e0 semgrep ignore testutil/network/network.go 2023-03-16 12:15:01 +05:30
0xmuralik
703f146c5b Merge branch 'main' of github.com:cerc-io/laconicd into murali/ipld-prime 2023-03-16 10:37:33 +05:30
Murali Krishna Komatireddy
763dab712f
fix lint (#101)
* sdkerrors.Wrap

* sdkerrors.Wrap

* upgrade dependenices
2023-03-15 11:22:35 -04:00
0xmuralik
e2178894ef upgrade go-ipld-prime 2023-03-15 15:52:27 +05:30
0xmuralik
dca3ccb47c upgrade dependenices 2023-03-15 11:34:29 +05:30
0xmuralik
2c883282bc sdkerrors.Wrap 2023-03-15 10:30:41 +05:30
0xmuralik
b8d6300e4d sdkerrors.Wrap 2023-03-15 10:22:38 +05:30
Murali Krishna Komatireddy
42fdc97c1c
replace CIDFromJSONBytes (#97)
* replace fn

* fix unit test CID

* rename func
2023-03-14 11:21:23 +05:30
iszubok
5f6a9f56bb
Merge pull request #98 from cerc-io/update-validator-doc-v0.8.0
update validator doc for v0.8.0 and laconic_81337-6
2023-03-10 08:49:01 +02:00
Ivan Zubok
71c15cd2eb update validator doc for v0.8.0 and laconic_81337-6 2023-03-10 06:35:33 +00:00
Michael
c227a38e9a
tests must be run against different chain configurations (#91)
* tests must be run against different chain configurations

* compose args order matters

* x bit not set on auction tests shell script

* always run docker compose down... possibly to avoid insufficient funds error after a failed run

* add arg to docker compose down for auction and nameservice-expiry

* switch to main branch
2023-02-10 14:44:27 -05:00
Zach
15c9ade06d
Merge pull request #90 from cerc-io/Delete-security.md
Delete SECURITY.md
2023-02-06 08:30:58 -05:00
A. F. Dudley
4b318822d9
Delete SECURITY.md 2023-02-04 19:00:17 +04:00
Michael
c61f268329
run all tests (#89)
* run all tests

* run all tests

* bad env arg passing... done through docker compose environment now

* auction nameservice tests branch of sdk

* only run nameservice test

* documentation did not match script

* run all
2023-02-02 17:00:42 -05:00
Michael
facd64a14b
All test stuff (#88)
* first pass use tests/sdk-tests/run-tests.sh in github action

* - -> _

* diagnostic env step

* diagnostic env step

* diagnostic env step does not support cwd

* checkout not preserved between actions

* ./ missing

* start built containers

* missing unmarshalling of content bytes before encoding and generation of CID

* unchecked error complaint from linter

* golang linting is really picky

* utils/json test for comparing known, but deprecated method to new implementation

* try curl (retval 0) instead of wget (retval 8) for 404 that is returned

* missing curl for health check

* use feature branch for laconic-sdk... UNDO THIS LATER

* checkout is done from inside of container, rather than copied in from filesystem. checking out dev branch for now

* docker network inspect for diagnostic

* docker network inspect for diagnostic missing arg

* listen on 0.0.0.0 specfically

* trying localhost

* try host mode network

* host mode breaks name resolution of containers

* manual service check in laconicd container for diagnostic

* revert ListenAndServe

* sleep and docker logs... appears endpoint is not coming up maybe?

* disable fail_ci on codecov error... it is unstable

* turn codecov back to fail on error true to avoid invisible failure.

* Cleanup for whitespace and require.NoError in test

* new json util test, turning off codecov fails CI, and gitignore for test artifacts
2023-01-30 16:59:13 -05:00
iszubok
6945792aea
Merge pull request #84 from cerc-io/0-7-0-upgrade-guide
v0.6.0 -> v0.7.0 upgrade guide
2023-01-20 09:25:25 +02:00
Ivan Zubok
5af22471a8 review changes 2023-01-18 18:50:22 +00:00
Ivan Zubok
5e7a890adb 0.6.0 -> 0.7.0 upgrade guide 2023-01-18 17:19:15 +00:00
Zach
9ec237e41f
Merge pull request #80 from cerc-io/zramsay-patch-1
Update README with ##Usage
2023-01-11 19:18:16 -05:00
b57ad7d5fa
Merge pull request #76 from cerc-io/murali/sdk-integration-tests
sdk-integration: fix private key command
2023-01-11 08:32:08 -07:00
Zach
c3138a2615
Update README.md 2023-01-11 09:11:37 -05:00
02e9080094
Changes to run laconic-console app with laconicd (#75)
* Add cors middleware for GQL requests (#65)

* Implement loading query from URL in GQL playground (#66)

* Implement loading GQL query from URL

* Fix variable name lint error

* Load record names in `getRecordsByIds` GQL query (#67)

* Fix variable rename

* Load names in getRecordsByIds GQL query

* CI Review fixes

* Make init script executable
2023-01-11 13:06:42 +05:30