Add functionality to deploy apps requested by sub authorities #10

Closed
opened 2024-08-14 13:29:15 +00:00 by zramsay · 8 comments
Member

Description:

Account A is a service provider who has registered a name authority. This account can deploy apps via the deployer as expected.

Account B is a user who wishes to publish a webapp to that service provider. This account doesn't have permission to do so. They must instead register a sub authority.

Account B must communicate to Account A that they wish to register a sub authority. Account B provides their chosen sub authority and laconic address to Account A.

Account B creates a bond.

Account A runs: laconic registry authority reserve me.lcn-example --owner laconicAccountB then,

Account B runs `laconic registry authority bond set met2.lcn-example <account_B_bond_id>

Account B can now configure a PWA repo via existing tooling to publish an ApplicationRecord and ApplicationDeploymentRequest, where the name field in package.json includes the sub authority (e.g., "name": "@met2.lcn-example/my-webapp")

The deployer run by Account A picks up this request: Generating name pwa-test-6-773ce7ac36 for request bafyreiejppbod2sqw5qtbxhz7gam4cwb7en6zakuwqlnf5z3q6jo5i5hcu. cerc-webapp-deployer: Found request bafyreiejppbod2sqw5qtbxhz7gam4cwb7en6zakuwqlnf5z3q6jo5i5hcu to run application lrn://met2.lcn-example/applications/pwa-test-6@0.1.22 on pwa-test-6-773ce7ac36.

but it does not build or deploy it, or do anything with this request. This issue is to address 1) build and deploy any ApplicationDeploymentRequest published as a sub authority (main priority) and 2) re-work the tooling to automate the granting of a sub authority.

Description: Account A is a service provider who has registered a name authority. This account can deploy apps via the deployer as expected. Account B is a user who wishes to publish a webapp to that service provider. This account doesn't have permission to do so. They must instead register a sub authority. Account B must communicate to Account A that they wish to register a sub authority. Account B provides their chosen sub authority and laconic address to Account A. Account B creates a bond. Account A runs: `laconic registry authority reserve me.lcn-example --owner laconicAccountB` then, Account B runs `laconic registry authority bond set met2.lcn-example <account_B_bond_id> Account B can now configure a PWA repo via existing tooling to publish an ApplicationRecord and ApplicationDeploymentRequest, where the name field in package.json includes the sub authority (e.g., "name": "@met2.lcn-example/my-webapp") The deployer run by Account A picks up this request: `Generating name pwa-test-6-773ce7ac36 for request bafyreiejppbod2sqw5qtbxhz7gam4cwb7en6zakuwqlnf5z3q6jo5i5hcu. cerc-webapp-deployer: Found request bafyreiejppbod2sqw5qtbxhz7gam4cwb7en6zakuwqlnf5z3q6jo5i5hcu to run application lrn://met2.lcn-example/applications/pwa-test-6@0.1.22 on pwa-test-6-773ce7ac36.` but it does not build or deploy it, or do anything with this request. This issue is to address 1) build and deploy any ApplicationDeploymentRequest published as a sub authority (main priority) and 2) re-work the tooling to automate the granting of a sub authority.
dboreham was assigned by AFDudley 2024-08-14 13:33:00 +00:00
Owner

This is required because we've had to change the testnet plan.

Given how close Zach's hacks were to completing this, it seems like Thomas should be able to complete this before friday, assuming he's working at all. It needs to be done by monday so @dboreham please assign this to Ashwin if you folks can't get it done in time. Thanks so much.

This is required because we've had to change the testnet plan. Given how close Zach's hacks were to completing this, it seems like Thomas should be able to complete this before friday, assuming he's working at all. It needs to be done by monday so @dboreham please assign this to Ashwin if you folks can't get it done in time. Thanks so much.
Owner

1 sounds straightforward. Which tooling are we describing in 2?

1 sounds straightforward. Which tooling are we describing in 2?
Owner

More log from Slack:

cerc-webapp-deployer: Generating name pwa-test-6-773ce7ac36 for request bafyreiejppbod2sqw5qtbxhz7gam4cwb7en6zakuwqlnf5z3q6jo5i5hcu.
cerc-webapp-deployer: Found request bafyreiejppbod2sqw5qtbxhz7gam4cwb7en6zakuwqlnf5z3q6jo5i5hcu to run application lrn://met2.lcn-example/applications/pwa-test-6@0.1.22 on pwa-test-6-773ce7ac36.
cerc-webapp-deployer: Skipping request bafyreihsu72hvy4bcghbsi27rruehxd2s76qk4lfo5hs4rdadtp6lu253y, cannot locate app.
More log from Slack: ``` cerc-webapp-deployer: Generating name pwa-test-6-773ce7ac36 for request bafyreiejppbod2sqw5qtbxhz7gam4cwb7en6zakuwqlnf5z3q6jo5i5hcu. cerc-webapp-deployer: Found request bafyreiejppbod2sqw5qtbxhz7gam4cwb7en6zakuwqlnf5z3q6jo5i5hcu to run application lrn://met2.lcn-example/applications/pwa-test-6@0.1.22 on pwa-test-6-773ce7ac36. cerc-webapp-deployer: Skipping request bafyreihsu72hvy4bcghbsi27rruehxd2s76qk4lfo5hs4rdadtp6lu253y, cannot locate app. ```
Owner

This error appears to be to do with the record with name lrn://met2.lcn-example/applications/pwa-test-6@0.1.22 not resolving in the registry.

This error appears to be to do with the record with name `lrn://met2.lcn-example/applications/pwa-test-6@0.1.22` not resolving in the registry.
Owner
lrn://met2.lcn-example/applications/pwa-test-6@0.1.22
``` lrn://met2.lcn-example/applications/pwa-test-6@0.1.22 ```
Author
Member
laconic -c config.yml registry name resolve lrn://met2.lcn-example/applications/pwa-test-6@0.1.22 
[
  {
    "id": "bafyreigq7p6dxmve627fvqittxbvmerrh43xksj6aqd6ykkokvmhus2p6y",
    "names": [
      "lrn://met2.lcn-example/applications/pwa-test-6",
      "lrn://met2.lcn-example/applications/pwa-test-6@0.1.22",
      "lrn://met2.lcn-example/applications/pwa-test-6@9971082a483b122e27cd8f4049c30433d101ad64"
    ],
    "owners": [
      "97B63F9B38B9C1D6A9D7177FA5E7D1DD470BD0BC"
    ],
    "bondId": "c2d298327a4fea642d780ee251696c495a591cb3d64f6e24ade0e1a2ef674e69",
    "createTime": "2024-08-14T01:33:13Z",
    "expiryTime": "2025-08-14T01:33:13Z",
    "attributes": {
      "app_type": "webapp",
      "app_version": "0.1.22",
      "name": "@met2.lcn-example/pwa-test-6",
      "repository": [
        "https://github.com/LaconicNetwork/loro-testnet-example-pwa"
      ],
      "repository_ref": "9971082a483b122e27cd8f4049c30433d101ad64",
      "type": "ApplicationRecord",
      "version": "0.0.1"
    }
  }
]

and

cerc-webapp-deployer:     super(AttrDict, self).__init__(*args, **kwargs)
cerc-webapp-deployer: TypeError: 'NoneType' object is not iterable
cerc-webapp-deployer: Generating name pwa-test-6-773ce7ac36 for request bafyreiejppbod2sqw5qtbxhz7gam4cwb7en6zakuwqlnf5z3q6jo5i5hcu.
cerc-webapp-deployer: Found request bafyreiejppbod2sqw5qtbxhz7gam4cwb7en6zakuwqlnf5z3q6jo5i5hcu to run application lrn://met2.lcn-example/applications/pwa-test-6@0.1.22 on pwa-test-6-773ce7ac36.
cerc-webapp-deployer: Skipping request bafyreihsu72hvy4bcghbsi27rruehxd2s76qk4lfo5hs4rdadtp6lu253y, cannot locate app.
cerc-webapp-deployer: ==============================================================
cerc-webapp-deployer: ########### UNDEPLOY ############
cerc-webapp-deployer: Found 0 unsatisfied request(s) to process.
cerc-webapp-deployer: ############ DEPLOY #############
``` laconic -c config.yml registry name resolve lrn://met2.lcn-example/applications/pwa-test-6@0.1.22 [ { "id": "bafyreigq7p6dxmve627fvqittxbvmerrh43xksj6aqd6ykkokvmhus2p6y", "names": [ "lrn://met2.lcn-example/applications/pwa-test-6", "lrn://met2.lcn-example/applications/pwa-test-6@0.1.22", "lrn://met2.lcn-example/applications/pwa-test-6@9971082a483b122e27cd8f4049c30433d101ad64" ], "owners": [ "97B63F9B38B9C1D6A9D7177FA5E7D1DD470BD0BC" ], "bondId": "c2d298327a4fea642d780ee251696c495a591cb3d64f6e24ade0e1a2ef674e69", "createTime": "2024-08-14T01:33:13Z", "expiryTime": "2025-08-14T01:33:13Z", "attributes": { "app_type": "webapp", "app_version": "0.1.22", "name": "@met2.lcn-example/pwa-test-6", "repository": [ "https://github.com/LaconicNetwork/loro-testnet-example-pwa" ], "repository_ref": "9971082a483b122e27cd8f4049c30433d101ad64", "type": "ApplicationRecord", "version": "0.0.1" } } ] ``` and ``` cerc-webapp-deployer: super(AttrDict, self).__init__(*args, **kwargs) cerc-webapp-deployer: TypeError: 'NoneType' object is not iterable cerc-webapp-deployer: Generating name pwa-test-6-773ce7ac36 for request bafyreiejppbod2sqw5qtbxhz7gam4cwb7en6zakuwqlnf5z3q6jo5i5hcu. cerc-webapp-deployer: Found request bafyreiejppbod2sqw5qtbxhz7gam4cwb7en6zakuwqlnf5z3q6jo5i5hcu to run application lrn://met2.lcn-example/applications/pwa-test-6@0.1.22 on pwa-test-6-773ce7ac36. cerc-webapp-deployer: Skipping request bafyreihsu72hvy4bcghbsi27rruehxd2s76qk4lfo5hs4rdadtp6lu253y, cannot locate app. cerc-webapp-deployer: ============================================================== cerc-webapp-deployer: ########### UNDEPLOY ############ cerc-webapp-deployer: Found 0 unsatisfied request(s) to process. cerc-webapp-deployer: ############ DEPLOY ############# ```
Owner

Update:

First, the deployment error probably has nothing to do with the registry namespace issues.

Second, deployer logging makes it hard to see but there are two deployment requests in play. One fails due to the app record not being found. This is expected. The second fails for unknown reasons. The only log output we have for that request is this:

cerc-webapp-deployer: Found request bafyreiejppbod2sqw5qtbxhz7gam4cwb7en6zakuwqlnf5z3q6jo5i5hcu to run application lrn://met2.lcn-example/applications/pwa-test-6@0.1.22 on pwa-test-6-773ce7ac36.

Nothing is logged after this point, although there is a log line to do with the subsequent request, implying that the deployer didn't outright crash.

Update: First, the deployment error probably has nothing to do with the registry namespace issues. Second, deployer logging makes it hard to see but there are two deployment requests in play. One fails due to the app record not being found. This is expected. The second fails for unknown reasons. The only log output we have for that request is this: ``` cerc-webapp-deployer: Found request bafyreiejppbod2sqw5qtbxhz7gam4cwb7en6zakuwqlnf5z3q6jo5i5hcu to run application lrn://met2.lcn-example/applications/pwa-test-6@0.1.22 on pwa-test-6-773ce7ac36. ``` Nothing is logged after this point, although there is a log line to do with the subsequent request, implying that the deployer didn't outright crash.
Owner
Deployer status: https://webapp-deployer-ui.pwa.realitynetwork.store/
Sign in to join this conversation.
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/webapp-deployment-status-api#10
No description provided.