Skip to content

Commit

Permalink
Merge branch 'main' into bugfix/order_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
paulo-ocean committed Sep 25, 2024
2 parents 24945fb + eb6d84e commit 25c4488
Show file tree
Hide file tree
Showing 17 changed files with 437 additions and 289 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @mihaisc @kremalicious @alexcos20 @bogdanfazakas
* @mihaisc @alexcos20 @bogdanfazakas @paulo-ocean @mariacarmina @jamiehewitt15
47 changes: 24 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node-version: '16'
node-version: '20'
- name: Cache node_modules
uses: actions/cache@v2
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
Expand All @@ -35,11 +35,11 @@ jobs:

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node-version: '16'
node-version: '20'
- name: Cache node_modules
uses: actions/cache@v2
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
Expand Down Expand Up @@ -71,21 +71,21 @@ jobs:
ls -la "$HOME/.ocean/ocean-contracts/artifacts/"
- run: npm run build:metadata
- run: npm run test:unit:cover
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: coverage
name: coverage-unit
path: coverage/

test_integration:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node-version: '16'
node-version: '20'
- name: Cache node_modules
uses: actions/cache@v2
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
Expand Down Expand Up @@ -123,8 +123,7 @@ jobs:
docker image rm node:16-alpine
docker image rm node:18
docker image rm node:18-alpine
docker image rm buildpack-deps:buster
docker image rm buildpack-deps:bullseye
docker image rm node:20
docker image rm debian:10
docker image rm debian:11
docker image rm moby/buildkit:latest
Expand All @@ -144,9 +143,9 @@ jobs:
run: docker logs ocean_aquarius_1 && docker logs ocean_provider_1 && docker logs ocean_provider2_1 && docker logs ocean_computetodata_1
if: ${{ failure() }}
- name: Upload coverage
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: coverage
name: coverage-integration
path: coverage/

build:
Expand All @@ -156,15 +155,15 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node: ['15', '16']
node: ['20', '18']

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Cache node_modules
uses: actions/cache@v2
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
Expand All @@ -181,10 +180,12 @@ jobs:
if: ${{ success() && github.actor != 'dependabot[bot]' }}
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: coverage

name: coverage-unit
- uses: actions/download-artifact@v4
with:
name: coverage-integration
- uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
Expand All @@ -198,9 +199,9 @@ jobs:
needs: [test_unit, test_integration]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node-version: '16'
node-version: '20'

- name: checkout ocean.js repo
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: '16'
node-version: '20'
registry-url: https://registry.npmjs.org/
- run: npm ci

Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16
20
92 changes: 76 additions & 16 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,84 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [v3.3.3](https://github.com/oceanprotocol/ocean.js/compare/v3.3.3-next.1...v3.3.3)

- make service endpoint / service name check case insensitive [`#1832`](https://github.com/oceanprotocol/ocean.js/pull/1832)

#### [v3.3.3-next.1](https://github.com/oceanprotocol/ocean.js/compare/v3.3.3-next.0...v3.3.3-next.1)

> 1 July 2024
- wip: update compute status/stop to support `agreementId`, not `documentId`, sig fix [`#1822`](https://github.com/oceanprotocol/ocean.js/pull/1822)
- put timeout back and test order,mut be ipfs side temporary [`557289e`](https://github.com/oceanprotocol/ocean.js/commit/557289e5f2c3a667abb6645a07c8342be881c186)
- try swap tests order , debug [`fb50bee`](https://github.com/oceanprotocol/ocean.js/commit/fb50bee3804d943949da33cfdfb615449d6c39c1)
- remove console.logs [`4e0536a`](https://github.com/oceanprotocol/ocean.js/commit/4e0536a1f8a812e4002b437665ce5357fddccd22)

#### [v3.3.3-next.0](https://github.com/oceanprotocol/ocean.js/compare/v3.3.2...v3.3.3-next.0)

> 27 June 2024
- Release 3.3.3-next.0 [`6f13fe7`](https://github.com/oceanprotocol/ocean.js/commit/6f13fe796feb9f168f234c8edf5ed27bcc47ce82)
- wip: update to support agreementId [`9d58208`](https://github.com/oceanprotocol/ocean.js/commit/9d582082f05cab961915aef04e74f8e32fd7ba9c)
- update compute stop, document id is not needed, neither for operator service, neither used on signature check [`5105a4f`](https://github.com/oceanprotocol/ocean.js/commit/5105a4fdadbf5590ebf2954a1d6f3a12f77b235c)

#### [v3.3.2](https://github.com/oceanprotocol/ocean.js/compare/v3.3.1...v3.3.2)

> 25 June 2024
- Split coupled tests to fix timeout issues [`#1827`](https://github.com/oceanprotocol/ocean.js/pull/1827)
- Bump braces from 3.0.2 to 3.0.3 [`#1819`](https://github.com/oceanprotocol/ocean.js/pull/1819)
- Bump chai-spies and @types/chai-spies [`#1816`](https://github.com/oceanprotocol/ocean.js/pull/1816)
- Pontus x devnet config [`#1806`](https://github.com/oceanprotocol/ocean.js/pull/1806)
- Update CODEOWNERS [`#1824`](https://github.com/oceanprotocol/ocean.js/pull/1824)
- Sanitize service endpoint by adding/reving slash when needed. [`#1821`](https://github.com/oceanprotocol/ocean.js/pull/1821)
- Release 3.3.2 [`3ba3ccb`](https://github.com/oceanprotocol/ocean.js/commit/3ba3ccb6b5df9caa87e31dfb316a1c1c74a6740c)

#### [v3.3.1](https://github.com/oceanprotocol/ocean.js/compare/v3.3.0...v3.3.1)

> 9 May 2024
- Bump express from 4.18.2 to 4.19.2 [`#1813`](https://github.com/oceanprotocol/ocean.js/pull/1813)
- Bump typescript from 5.1.6 to 5.4.5 [`#1810`](https://github.com/oceanprotocol/ocean.js/pull/1810)
- Bump ejs from 3.1.7 to 3.1.10 [`#1812`](https://github.com/oceanprotocol/ocean.js/pull/1812)
- add sapphire [`#1808`](https://github.com/oceanprotocol/ocean.js/pull/1808)
- Bump typedoc from 0.25.1 to 0.25.13 [`#1809`](https://github.com/oceanprotocol/ocean.js/pull/1809)
- Bump ip from 1.1.5 to 1.1.9 [`#1804`](https://github.com/oceanprotocol/ocean.js/pull/1804)
- Bump es5-ext from 0.10.62 to 0.10.64 [`#1805`](https://github.com/oceanprotocol/ocean.js/pull/1805)
- Multiple fixes [`#1785`](https://github.com/oceanprotocol/ocean.js/pull/1785)
- Update ConfigHelper.ts [`#1807`](https://github.com/oceanprotocol/ocean.js/pull/1807)
- Release 3.3.1 [`1f4e433`](https://github.com/oceanprotocol/ocean.js/commit/1f4e4336dd64d8950a2b314a9de526b40fbe63f5)

#### [v3.3.0](https://github.com/oceanprotocol/ocean.js/compare/v3.2.3...v3.3.0)

> 5 February 2024
- fix using custom address file [`#1802`](https://github.com/oceanprotocol/ocean.js/pull/1802)
- Fix provider fee approval in order helper [`#1795`](https://github.com/oceanprotocol/ocean.js/pull/1795)
- Release 3.3.0 [`7c4da83`](https://github.com/oceanprotocol/ocean.js/commit/7c4da83ee3f8c0ff8fa417b7c41e3ae72924e960)

#### [v3.2.3](https://github.com/oceanprotocol/ocean.js/compare/v3.2.2...v3.2.3)

> 15 December 2023
- fix provider fee approval in order helper [`f8527d7`](https://github.com/oceanprotocol/ocean.js/commit/f8527d7a65e5af3f14fbaa5a4977ef72377e6569)
- Release 3.2.3 [`399f97e`](https://github.com/oceanprotocol/ocean.js/commit/399f97e841552bdfe0635f2f277ad6b5f4e8ac82)
- fix lint [`41f2ba7`](https://github.com/oceanprotocol/ocean.js/commit/41f2ba763d26c72b38f12f2c80b698e047f8922b)

#### [v3.2.2](https://github.com/oceanprotocol/ocean.js/compare/v3.2.1...v3.2.2)

> 14 December 2023
- fix sepolia [`#1794`](https://github.com/oceanprotocol/ocean.js/pull/1794)
- Release 3.2.2 [`da262f7`](https://github.com/oceanprotocol/ocean.js/commit/da262f7498f8d2a307d1815b64bd6aa2787e2974)

#### [v3.2.1](https://github.com/oceanprotocol/ocean.js/compare/v3.2.0...v3.2.1)

> 5 December 2023
- Fix for running c2d jobs with additional datasets [`#1792`](https://github.com/oceanprotocol/ocean.js/pull/1792)
- Use latest barge [`#1788`](https://github.com/oceanprotocol/ocean.js/pull/1788)
- Release 3.2.1 [`f92e2ff`](https://github.com/oceanprotocol/ocean.js/commit/f92e2ff09e3bf9fc570b8dcc01a5345842265f56)
- fix runner missing images [`e71159e`](https://github.com/oceanprotocol/ocean.js/commit/e71159e0a1c37e3793bbf4c990dd857ceb36964a)

#### [v3.2.0](https://github.com/oceanprotocol/ocean.js/compare/v3.1.5-next.0...v3.2.0)
Expand All @@ -34,29 +108,15 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- make sure we increment a number when working with nonces [`#1781`](https://github.com/oceanprotocol/ocean.js/pull/1781)
- Release 3.1.4 [`b2e2cf2`](https://github.com/oceanprotocol/ocean.js/commit/b2e2cf24293af07f597c25e3a3e392db9caa381a)

#### [v3.1.3](https://github.com/oceanprotocol/ocean.js/compare/v3.1.3-next.1...v3.1.3)
#### [v3.1.3](https://github.com/oceanprotocol/ocean.js/compare/v3.1.2...v3.1.3)

> 16 October 2023
- fix fs use & error handling [`#1777`](https://github.com/oceanprotocol/ocean.js/pull/1777)
- Bump postcss from 8.4.5 to 8.4.31 [`#1778`](https://github.com/oceanprotocol/ocean.js/pull/1778)
- Release 3.1.3 [`1bc5a39`](https://github.com/oceanprotocol/ocean.js/commit/1bc5a39fda217c91cf5c44f41c6275acd20740de)

#### [v3.1.3-next.1](https://github.com/oceanprotocol/ocean.js/compare/v3.1.3-next.0...v3.1.3-next.1)

> 11 October 2023
- update error handling [`aada8e9`](https://github.com/oceanprotocol/ocean.js/commit/aada8e92af9273ccc20e86dc00ea73bcb7e8dfdf)
- Release 3.1.3-next.1 [`40c22b9`](https://github.com/oceanprotocol/ocean.js/commit/40c22b9b1fa147fd4295da1bdd6248d7714a2b30)

#### [v3.1.3-next.0](https://github.com/oceanprotocol/ocean.js/compare/v3.1.2...v3.1.3-next.0)

> 6 October 2023
- Bump @types/crypto-js from 4.1.1 to 4.1.2 [`#1774`](https://github.com/oceanprotocol/ocean.js/pull/1774)
- Bump @types/chai-spies from 1.0.3 to 1.0.4 [`#1776`](https://github.com/oceanprotocol/ocean.js/pull/1776)
- fix fs use [`735dc2f`](https://github.com/oceanprotocol/ocean.js/commit/735dc2f62b976be683bc9fcd7f8940e715b18519)
- Release 3.1.3-next.0 [`5ac5d1f`](https://github.com/oceanprotocol/ocean.js/commit/5ac5d1f44a637b5d8d285757941b0393bb3a7983)
- Release 3.1.3 [`1bc5a39`](https://github.com/oceanprotocol/ocean.js/commit/1bc5a39fda217c91cf5c44f41c6275acd20740de)

#### [v3.1.2](https://github.com/oceanprotocol/ocean.js/compare/v3.1.1...v3.1.2)

Expand Down
5 changes: 4 additions & 1 deletion ComputeExamples.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ let resolvedDatasetDdo: DDO
let resolvedAlgorithmDdo: DDO

let computeJobId: string
let agreementId: string
```
### 4.3 Helper methods
Expand Down Expand Up @@ -661,6 +662,8 @@ Let's have 5 minute of compute access
Let's save the compute job it, we re going to use later
```Typescript
computeJobId = computeJobs[0].jobId
// eslint-disable-next-line prefer-destructuring
agreementId = computeJobs[0].agreementId

```

Expand All @@ -672,7 +675,7 @@ You can also add various delays so you see the various states of the compute job
providerUrl,
await consumerAccount.getAddress(),
computeJobId,
DATASET_DDO.id
agreementId
)
```
<!--
Expand Down
9 changes: 5 additions & 4 deletions docs/classes/Provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ ___

### computeStatus

**computeStatus**(`providerUri`, `consumerAddress`, `jobId?`, `did?`, `signal?`): `Promise`<[`ComputeJob`](../interfaces/ComputeJob.md) \| [`ComputeJob`](../interfaces/ComputeJob.md)[]\>
**computeStatus**(`providerUri`, `consumerAddress`, `jobId?`, `agreementId?`, `signal?`): `Promise`<[`ComputeJob`](../interfaces/ComputeJob.md) \| [`ComputeJob`](../interfaces/ComputeJob.md)[]\>

Get compute status for a specific jobId/documentId/owner.
Get compute status for a specific jobId/agreementId/owner.

#### Parameters

Expand All @@ -139,7 +139,7 @@ Get compute status for a specific jobId/documentId/owner.
| `providerUri` | `string` | The URI of the provider we want to query |
| `consumerAddress` | `string` | The consumer ethereum address |
| `jobId?` | `string` | The ID of a compute job. |
| `did?` | `string` | The ID of the asset |
| `agreementId?` | `string` | The ID of service agreement |
| `signal?` | `AbortSignal` | abort signal |

#### Returns
Expand All @@ -154,7 +154,7 @@ ___

### computeStop

**computeStop**(`did`, `consumerAddress`, `jobId`, `providerUri`, `signer`, `signal?`): `Promise`<[`ComputeJob`](../interfaces/ComputeJob.md) \| [`ComputeJob`](../interfaces/ComputeJob.md)[]\>
**computeStop**(`did`, `consumerAddress`, `jobId`, `providerUri`, `signer`, `signal?`, `agreementId?`): `Promise`<[`ComputeJob`](../interfaces/ComputeJob.md) \| [`ComputeJob`](../interfaces/ComputeJob.md)[]\>

Instruct the provider to Stop the execution of a to stop a compute job.

Expand All @@ -168,6 +168,7 @@ Instruct the provider to Stop the execution of a to stop a compute job.
| `providerUri` | `string` | The provider URI. |
| `signer` | `Signer` | The consumer signer object. |
| `signal?` | `AbortSignal` | abort signal |
| `agreementId?` | `string` | service agreement id |

#### Returns

Expand Down
Loading

0 comments on commit 25c4488

Please sign in to comment.