1.4.0 • Published 2 days ago

@fluid-tools/fetch-tool v1.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 days ago

@fluid-tools/fetch-tool

Connection using ODSP or routerlicious driver to dump the messages or snapshot information on the server. In order to connect to ODSP, the clientID and clientSecret must be set as environment variables loginmicrosoftclientId and loginmicrosoftsecret, respectively. If you have access to the keyvault this can be done by running this tool.

Usage

Usage: fluid-fetch [options] "URL"
URL: <ODSP joinSession URL>|<Routerlicious URL>
Options:
  --dump:rawmessage               : dump all messages
  --dump:rawmessage:overwrite     : dump all messages and overwrite existing        messages.json
  --dump:snapshotVersion          : dump a list of snapshot version
  --dump:snapshotTree             : dump the snapshot trees
  --dump:snapshotBlob             : dump the contents of snapshot blobs
  --forceRefreshToken             : Force refresh token (SPO only)
  --stat:message                  : show a table of message type counts and size
  --stat:snapshot                 : show a table of snapshot path and blob size
  --stat:dataType                 : show a table of data type
  --stat:channel                  : show a table of channel
  --filter:messageType <type>     : filter message by <type>
  --jwt <token>                   : token to be used for routerlicious URLs
  --numSnapshotVersions <number>  : Number of versions to load (default:10)
  --snapshotVersionIndex <number> : Index of the version to dump
  --saveDir <outdir>              : Save data of the snapshots and messages

Example Output

Messages Stats

--stat:message

105 total messages (103 delta storage, 2 initial ws messages, 0 dup)
Message Type (All)                                                       | Count      Bytes
----------------------------------------------------------------------------------------------------
join                                                                     |    19       7588
propose                                                                  |     1        269
noop                                                                     |    15       2806
attach                                                                   |     1        278
op                                                                       |    53      23854
leave                                                                    |    16       3810
----------------------------------------------------------------------------------------------------
Total                                                                    |   105      38605

--stat:dataType

107 total messages (105 delta storage, 2 initial ws messages, 0 dup)
Data Type (Operations only)                                              | Count      Bytes
----------------------------------------------------------------------------------------------------
map                                                                      |    28      13172
mergeTree                                                                |    20       7450
----------------------------------------------------------------------------------------------------
Total                                                                    |    48      20622

--stat:channel

109 total messages (107 delta storage, 2 initial ws messages, 0 dup)
Channel name (Operations only)                                           | Count      Bytes
----------------------------------------------------------------------------------------------------
[defaultDataStore]/root (map)                                            |     3       1232
[defaultDataStore]/0fb26504-369f-4234-ad97-0a303d3ec81f (map)            |     0          0
[defaultDataStore]/74577601-3af5-49a1-9ca5-db5d9ee128a8 (mergeTree)      |    20       7450
[defaultDataStore]/91ac6df2-dda6-409a-b5e3-be84ce9ab138 (map)            |    25      11940
[defaultDataStore]/92ebb388-68a0-4fc2-859e-5c01f12e992d (map)            |     0          0
----------------------------------------------------------------------------------------------------
Total                                                                    |    48      20622

Snapshot Stats

--stat:snapshot

Blob Path                                                                  | Bytes
----------------------------------------------------------------------------------------------------
!CONTAINER!/.attributes                                                    | 156
!CONTAINER!/.blobs                                                         | 4
!CONTAINER!/.gitmodules                                                    | 140
!CONTAINER!/deltas                                                         | 872
!CONTAINER!/quorumMembers                                                  | 220
!CONTAINER!/quorumProposals                                                | 4
!CONTAINER!/quorumValues                                                   | 184
[defaultDataStore]/.component                                              | 32
[defaultDataStore]/0fb26504-369f-4234-ad97-0a303d3ec81f/.attributes        | 64
[defaultDataStore]/0fb26504-369f-4234-ad97-0a303d3ec81f/header             | 4
[defaultDataStore]/74577601-3af5-49a1-9ca5-db5d9ee128a8/.attributes        | 72
[defaultDataStore]/74577601-3af5-49a1-9ca5-db5d9ee128a8/content/header     | 448
[defaultDataStore]/74577601-3af5-49a1-9ca5-db5d9ee128a8/content/catchupOps | 4
[defaultDataStore]/74577601-3af5-49a1-9ca5-db5d9ee128a8/header             | 180
[defaultDataStore]/91ac6df2-dda6-409a-b5e3-be84ce9ab138/.attributes        | 64
[defaultDataStore]/91ac6df2-dda6-409a-b5e3-be84ce9ab138/header             | 168
[defaultDataStore]/92ebb388-68a0-4fc2-859e-5c01f12e992d/.attributes        | 64
[defaultDataStore]/92ebb388-68a0-4fc2-859e-5c01f12e992d/header             | 4
[defaultDataStore]/root/.attributes                                        | 64
[defaultDataStore]/root/header                                             | 300
----------------------------------------------------------------------------------------------------
Total snapshot size                                                        | 3048

Debugging

If you would like to debug fetch-tool, you can create a unit test. Remember to add tsconfig.json and list mocha in devDependencies.

In the unit test, you can use setArguments() from fluidFetchArgs to pass in arguments you want to test. Then call the methods you want to run and you will be able to set breakpoints in vscode.

Example

describe("fetch tool", () => {
    it("can fetch messages", async () => {
        fluidFetchArgs.setArguments(your_args);
        const documentService = await fluidFetchInit(your_paramURL);
        await fluidFetchMessages(documentService, your_saveDir);
    });
});
2.0.0-rc.4.0.1

7 days ago

2.0.0-rc.4.0.0

9 days ago

2.0.0-rc.2.0.7

19 days ago

2.0.0-rc.3.0.3

23 days ago

2.0.0-rc.2.0.6

23 days ago

2.0.0-rc.2.0.5

27 days ago

2.0.0-rc.1.0.9

29 days ago

2.0.0-rc.3.0.2

29 days ago

2.0.0-rc.2.0.4

29 days ago

2.0.0-rc.2.0.3

1 month ago

2.0.0-rc.3.0.1

1 month ago

2.0.0-rc.3.0.0

1 month ago

1.4.0

1 month ago

2.0.0-rc.2.0.2

1 month ago

2.0.0-rc.1.0.8

2 months ago

2.0.0-rc.1.0.7

2 months ago

2.0.0-rc.1.0.6

2 months ago

2.0.0-rc.2.0.1

2 months ago

2.0.0-rc.1.0.5

2 months ago

2.0.0-rc.2.0.0

2 months ago

2.0.0-rc.1.0.4

3 months ago

2.0.0-rc.1.0.3

3 months ago

2.0.0-rc.1.0.2

3 months ago

2.0.0-rc.1.0.1

4 months ago

2.0.0-rc.1.0.0

4 months ago

1.3.7

9 months ago

1.3.6

1 year ago

1.2.8

1 year ago

1.4.0-121020

1 year ago

1.3.5-121405

1 year ago

1.3.5

1 year ago

1.3.4

1 year ago

1.4.0-111997

1 year ago

1.4.0-108057

2 years ago

1.4.0-106438

2 years ago

1.3.3

1 year ago

1.3.1

2 years ago

1.3.0

2 years ago

1.4.0-115997

1 year ago

1.3.2-112998

1 year ago

1.2.7

2 years ago

1.3.0-97515

2 years ago

1.3.0-100520

2 years ago

0.59.4003

2 years ago

1.2.6

2 years ago

0.59.2004

2 years ago

1.2.6-93452

2 years ago

1.0.2

2 years ago

1.2.0

2 years ago

1.0.1

2 years ago

1.2.5

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.3-83900

2 years ago

1.2.0-78837

2 years ago

1.1.0-76254

2 years ago

1.2.3-84921

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.1.2

2 years ago

0.59.4002

2 years ago

1.2.0-77818

2 years ago

1.1.0-75972

2 years ago

1.0.0

2 years ago

0.59.1001

2 years ago

0.59.2002

2 years ago

0.59.2003

2 years ago

0.59.3003

2 years ago

0.59.3001

2 years ago

0.59.3002

2 years ago

0.59.3000

2 years ago

0.59.3000-67119

2 years ago

0.59.4000-71130

2 years ago

0.59.4000-71128

2 years ago

0.59.4000

2 years ago

0.59.4001

2 years ago

0.59.2001

2 years ago

0.59.3000-66610

2 years ago

0.59.1001-62246

2 years ago

0.59.2000

2 years ago

0.59.2000-63294

2 years ago

0.59.1000-61898

2 years ago

0.59.1000

2 years ago

0.59.2000-61729

2 years ago

0.58.3000-61081

2 years ago

0.58.1000

2 years ago

0.58.1001

2 years ago

0.56.11

2 years ago

0.56.10

2 years ago

0.58.2000-58133

2 years ago

0.58.2000

2 years ago

0.58.2002

2 years ago

0.58.2001

2 years ago

0.56.5

2 years ago

0.56.6

2 years ago

0.57.2

2 years ago

0.55.4

2 years ago

0.56.3

2 years ago

0.56.4

2 years ago

0.57.0

2 years ago

0.55.2

2 years ago

0.56.1

2 years ago

0.54.3

2 years ago

0.57.1

2 years ago

0.55.3

2 years ago

0.56.2

2 years ago

0.55.0

2 years ago

0.54.1

2 years ago

0.58.0-55983

2 years ago

0.56.0

2 years ago

0.56.0-49831

2 years ago

0.55.1

2 years ago

0.54.2

2 years ago

0.54.0-47413

2 years ago

0.58.0-55561

2 years ago

0.56.9

2 years ago

0.56.7

2 years ago

0.56.8

2 years ago

0.57.0-51086

2 years ago

0.54.0

2 years ago

0.55.0-48551

2 years ago

0.53.0

2 years ago

0.53.0-46105

2 years ago