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

Test snapshot packages for v0.10.0 #1633

Closed
amarthadan opened this issue Feb 3, 2023 · 4 comments
Closed

Test snapshot packages for v0.10.0 #1633

amarthadan opened this issue Feb 3, 2023 · 4 comments
Assignees
Milestone

Comments

@amarthadan
Copy link
Contributor

Prior to the v0.10.0 release, the snapshot packages and corresponding Docker images need to be tested.

NPM packages:

Docker images:

api3/airnode-deployer-dev:snapshot-v0.10.0
api3/airnode-client-dev:snapshot-v0.10.0
api3/airnode-admin-dev:snapshot-v0.10.0
@amarthadan amarthadan added this to the 0.10.0 milestone Feb 3, 2023
@dcroote
Copy link
Contributor

dcroote commented Feb 6, 2023

Snapshot testing

tl;dr - good to go, except the standalone airnode-deployer npm package behavior is questionable.

A checked box indicates success.

Test that npm packages admin, deployer, and validator, which have a --help CLI argument, are compiled correctly using npx

  • admin
    • generate-mnemonic
  • deployer (tested more below)
  • validator
    • Succeeds with --config "packages/airnode-validator/test/fixtures/config.valid.json" --secrets "packages/airnode-validator/test/fixtures/secrets.valid.env"

Prepare for deployments (needs to be repeated for local, AWS, and GCP):

  • Modify the coingecko-signed-data integration in airnode-examples so that blockchain, HTTP gateway, and HTTP signed gateway requests can be performed. (Aside: not having a single integration that has both the HTTP gateway and signed HTTP gateway enabled is a bit annoying).

Run Airnode client Docker image locally:

  • Local blockchain request
  • HTTP gateway request
  • Signed HTTP gateway request
  • Withdrawal request

Test AWS deployment with deployer Docker image:

  • Requests
    • Testnet request
    • HTTP gateway request
    • Signed HTTP gateway request
    • Withdrawal request
  • Deployer commands (with Docker image)
    • list
    • info
    • remove

Test GCP deployment with deployer Docker image:

  • Requests
    • Testnet request
    • HTTP gateway request
    • Signed HTTP gateway request
    • Withdrawal request
  • Deployer commands (with Docker image)
    • list
    • info
    • remove-with-receipt (differs from AWS to achieve additional command coverage) - I had to run this multiple times due to connectivity issues, but I believe that was transient.

Failures

Any command with the standalone airnode-deployer npm package e.g. deploy, info, remove, etc. failed. I believe the issue is that the npm package is not loading credentials e.g. gcp.json or aws.env appropriately like the docker image does; the deployer package docs have no mention of credential files. However, I'm not sure if this is a bug or not given our precautionary wording at the top of the docs and the fact that the package works fine within the deployer docker image, which is what we recommend users use.

@amarthadan is this expected? If so, I find it strange to publish a package that is unusable on its own...

Example error when trying to use list with a gcp deployment (I had a copy of gcp.json in both the directory I was running the command from and in a config subdirectory):

✖ Failed to fetch deployments from GCP: Error: Failed to list GCS buckets: Error: Could not load the default credentials. Browse to https://cloud.google.com/docs/authentication/getting-started for more information.

@amarthadan
Copy link
Contributor Author

The airnode-deployer NPM package does work but you need to load the credentials in the environment yourself. This is done by the Docker container itself not by the airnode-deployer.

For AWS, you have two options. Either set all the AWS-related environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and possibly AWS_SESSION_TOKEN) or populate ~/.aws/credentials file with valid credentials.

For GCP, you need to set GOOGLE_APPLICATION_CREDENTIALS environment variable so it contains a path to your gcp.json.

But you're right, that should be mentioned in the docs.

@bbenligiray
Copy link
Member

Created the docs issue

@dcroote
Copy link
Contributor

dcroote commented Feb 7, 2023

Closing as complete after confirming that exporting GOOGLE_APPLICATION_CREDENTIALS for gcp and the combination of AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY for aws result in working airnode-deployer npm package commands.

@dcroote dcroote closed this as completed Feb 7, 2023
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

No branches or pull requests

3 participants