external-adapters-js icon indicating copy to clipboard operation
external-adapters-js copied to clipboard

Peregrine Data External Adapter Submission

Open droconnel22 opened this issue 1 year ago • 13 comments

Closes #ISSUE_NUMBER_GOES_HERE

Description

......

Changes

  • High level
  • changes that
  • you made

Steps to Test

  1. Steps
  2. to
  3. test

Quality Assurance

  • [ ] If a new adapter was made, or an existing one was modified so that its environment variables have changed, update the relevant infra-k8s configuration file.
  • [ ] If a new adapter was made, or an existing one was modified so that its environment variables have changed, update the relevant adapter-secrets configuration file or update the soak testing blacklist.
  • [ ] If a new adapter was made, or a new endpoint was added, update the test-payload.json file with relevant requests.
  • [ ] The branch naming follows git flow (feature/x, chore/x, release/x, hotfix/x, fix/x) or is created from Jira.
  • [ ] This is related to a maximum of one Jira story or GitHub issue.
  • [ ] Types are safe (avoid TypeScript/TSLint features like any and disable, instead use more specific types).
  • [ ] All code changes have 100% unit and integration test coverage. If testing is not applicable or too difficult to justify doing, the reasoning should be documented explicitly in the PR.

droconnel22 avatar Nov 27 '24 21:11 droconnel22

🦋 Changeset detected

Latest commit: 0ef17bba23ffd3843af29e47ca6ac7deb31cc0ee

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@chainlink/peregrine-fund-admin-adapter Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

changeset-bot[bot] avatar Nov 27 '24 21:11 changeset-bot[bot]

once changes are made, please run yarn changeset and select major from root external-adapters-js dir.

mmcallister-cll avatar Nov 29 '24 21:11 mmcallister-cll

once changes are made, please run yarn changeset and select major from root external-adapters-js dir.

this has now been run and commited in latest for this PR.

droconnel22 avatar Dec 03 '24 00:12 droconnel22

once changes are made, please run yarn changeset and select major from root external-adapters-js dir.

this has been run.

droconnel22 avatar Dec 03 '24 00:12 droconnel22

what is the correct way to run test in my directory? I tried yarn test, etc.

droconnel22 avatar Dec 03 '24 00:12 droconnel22

what is the correct way to run test in my directory? I tried yarn test, etc.

yarn test peregrine-fund-admin/test

in root

mxiao-cll avatar Dec 03 '24 00:12 mxiao-cll

Need to run yarn as well as yarn test peregrine-fund-admin/test

Thank you I have now pushed the latest commit with 2 passing integration tests, at least locally passing. Please see if test pass as well.

droconnel22 avatar Dec 03 '24 01:12 droconnel22

Looks like you need to run yarn again

mxiao-cll avatar Dec 03 '24 01:12 mxiao-cll

I also didn't see you latest commit

mxiao-cll avatar Dec 03 '24 01:12 mxiao-cll

`

PASS packages/sources/peregrine-fund-admin/test/integration/adapter.test.ts

Test Suites: 1 passed, 1 total Tests: 2 passed, 2 total Snapshots: 2 passed, 2 total Time: 2.561 s, estimated 3 s`

Please confirm running the integration tests pass as expected.

droconnel22 avatar Dec 03 '24 02:12 droconnel22

Please run end to end manual tests as well on the package. You'll need to set the necessary env vars (API_KEY, any endpoint overrides) Then from external-adapters-js/packages/sources/peregrine-fund-admin run

> yarn build; yarn start

and request against your local EA with a curl like this (plus any additional params you add)

curl --location 'localhost:8080' \
--header 'Content-Type: application/json' \
--data '{
  "data": {
    "endpoint": "globalmarketcap",
    "assetId": "100"
  }
}'

hope this will help with the e2e debugging 🙏

mmcallister-cll avatar Dec 04 '24 06:12 mmcallister-cll

Updated Please

Please run end to end manual tests as well on the package. You'll need to set the necessary env vars (API_KEY, any endpoint overrides) Then from external-adapters-js/packages/sources/peregrine-fund-admin run

> yarn build; yarn start

and request against your local EA with a curl like this (plus any additional params you add)

curl --location 'localhost:8080' \
--header 'Content-Type: application/json' \
--data '{
  "data": {
    "endpoint": "globalmarketcap",
    "assetId": "100"
  }
}'

hope this will help with the e2e debugging 🙏

Should I run the yarn in the root of the directory or in the EA package

droconnel22 avatar Jan 02 '25 17:01 droconnel22

@droconnel22 please run

> yarn build; yarn start

from the EA package dir, ie:

$REPO/packages/sources/peregrine-fund-admin

This will run an instance of your peregrine-fund-admin EA locally so you can request against it on localhost:8080 with the above curl command.

mmcallister-cll avatar Jan 02 '25 21:01 mmcallister-cll

Closing as this PR hasn't been touched since Jan 2025. Can be reopened at a later date if necessary.

mmcallister-cll avatar Aug 27 '25 15:08 mmcallister-cll