Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Powergate 2.0 #296

Merged
merged 5 commits into from
Jan 21, 2021
Merged

Powergate 2.0 #296

merged 5 commits into from
Jan 21, 2021

Conversation

asutula
Copy link
Member

@asutula asutula commented Jan 19, 2021

Description

Updates for Powergate 2.0 bindings.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Local testing, thorough integration tests have been updated.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Signed-off-by: Aaron Sutula <hi@asutula.com>
Signed-off-by: Aaron Sutula <hi@asutula.com>
Signed-off-by: Aaron Sutula <hi@asutula.com>
@asutula asutula changed the title asutula/pow-2.0 Powergate 2.0 Jan 19, 2021
@asutula asutula self-assigned this Jan 19, 2021
Signed-off-by: Aaron Sutula <hi@asutula.com>
package.json Outdated
@@ -69,9 +69,9 @@
}
},
"dependencies": {
"@textile/grpc-powergate-client": "^1.2.1",
"@textile/grpc-powergate-client": "2.0.0-rc1",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will update this to the official powergate release when it happens.

* @returns Pinned cids information of hot-storage.
*/
pinnedCids: () => Promise<PinnedCidsResponse.AsObject>
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These methods were added in a previous powergate update but never added to the js client.

* @returns An object containing a list of storage info.
*/
list: (userIds?: string[], cids?: string[]) => Promise<ListStorageInfoResponse.AsObject>
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New API for getting StorageInfo data which describes the current storage state of data in powergate (data that is already/currenlty actually stored, not processing, queued, etc)

* @param opts Optional ListOptions to control the behavior of listing jobs.
* @returns An object containing a list of storage jobs.
*/
list: (opts?: AdminListOptions) => Promise<ListStorageJobsResponse.AsObject>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New list api which gives historical access and different options about how to query.

* @param cids A list of cids to filter the results by.
* @returns An object containing a list of cid summary info.
*/
cidSummary: (...cids: string[]) => Promise<CidSummaryResponse.AsObject>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New API to get a summary of cids in Powergate

@@ -190,9 +156,100 @@ describe("pow", () => {
await waitForBalance(pow, res1.address, bal)
})
})

describe("data", () => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Been keeping this integration test file up to date. It is a very thorough test of all the endpoints.

Comment on lines +17 to +25
/**
* Allows to import active on-chain deals to the Cid deals information.
*/
importDealIds?: number[]

/**
* Allows to configure if a Job should ensure the new storage configuration.
*/
noExec?: boolean
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New options for importing deals and deferring job execution now supported in js client.

* @returns An object containing a list of storage info.
*/
list: (...cids: string[]) => Promise<ListStorageInfoResponse.AsObject>
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New StorageInfo apis at the user level (previous comment about StorageInfo was for admin apis).

*/
latestSuccessful: (...cids: string[]) => Promise<LatestSuccessfulStorageJobsResponse.AsObject>
list: (opts?: ListOptions) => Promise<ListStorageJobsResponse.AsObject>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

StorageJob listing at user level.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This replaces many of the old apis deleted here.

Signed-off-by: Aaron Sutula <hi@asutula.com>
@asutula asutula merged commit d131758 into master Jan 21, 2021
@asutula asutula deleted the asutula/pow-2.0 branch January 21, 2021 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants