nutritious-motorcycle-74922
02/21/2023, 2:48 AMnpm run data:download
{"level":30,"time":1676947535300,"pid":922,"hostname":"cloud-pricing-api-77cfdcf8d4-q2hwv","msg":"Starting: downloading DB data"}
{"level":50,"time":1676947535343,"pid":922,"hostname":"cloud-pricing-api-77cfdcf8d4-q2hwv","msg":"There was an error downloading data: Request failed with status code 400"}
white-airport-8778
http_proxy
or https_proxy
set in your Cloud Pricing API pod’s environment? If so, try disabling the proxy for the following domain by running export no_proxy="<http://pricing.api.infracost.io|pricing.api.infracost.io>"
so the init job can download the pricing DB dump from us.
(this is separate from the proxy you’ve set in the infracost CLI to hit your self-hosted pricing API)nutritious-motorcycle-74922
02/21/2023, 10:39 AMlittle-author-61621
<https://pricing-api-db-data-settled-blowfish.s3.us-east-2.amazonaws.com>
, I’m wondering if there’s anything you need to do to open access to that?white-airport-8778
If exec curl in the container accessing the pricing API url with the same API key it works, if I run the npm run data:download manually, I get the same error.Can you share the exact
curl
command you’re running? (without your API key). I wonder if curl is respecting the proxy/no-proxy envs but the Cloud Pricing API code isn’t?nutritious-motorcycle-74922
02/21/2023, 10:17 PMcommand:
- /bin/bash
- -c
- |
npm run db:setup &&
curl -s -H "X-Api-Key: ${INFRACOST_API_KEY}" <https://pricing.api.infracost.io/data-download/latest> | grep -o '"downloadUrl": *"[^"]*"' | grep -o '"[^"]*"$' | xargs -n1 curl --progress-bar --output ./data/products/products.csv.gz &&
npm run data:load
white-airport-8778
nutritious-motorcycle-74922
02/24/2023, 9:57 PMwhite-airport-8778
little-author-61621
nutritious-motorcycle-74922
03/03/2023, 2:32 AMwhite-airport-8778
nutritious-motorcycle-74922
03/03/2023, 11:30 PM