ACloudGuru / ACloudGuru/oprah

Cannot import parameters from an oprah exports file

Đang mở
#156 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
15
Fork
4
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

# This is a Bug Report

## Description
I can't import parameters from an oprah exports file.

```bash
# yarn oprah export -s acg
Oprah: Stage --> acg
Oprah: Config --> /Users/taylor/Documents/projects/src/acloudguru/cloud-optimization/aws/cost-and-usage/oprah.yml
Oprah: Getting parameters..
Oprah: Saving parameters to: /tmp/oprah-exports.json
Oprah: Done.
✨ Done in 1.02s.

# yarn oprah import -s acg
Oprah: Stage --> acg
Oprah: Config --> /Users/taylor/Documents/projects/src/acloudguru/cloud-optimization/aws/cost-and-usage/oprah.yml
Oprah: Getting parameters from: /tmp/oprah-exports.json
Oprah: Updating config...
Oprah: ERROR: TypeError: Reduce of empty array with no initial value
```

For bug reports:
* What went wrong? I was unable to import parameters from a file generated by `oprah export`
* What did you expect should have happened? I should be able to run `oprah export`, then run `oprah import` using the same file.
* What was the config you used?
```yaml
service: optimization-service
provider:
name: ssm

config:
path: /${stage}/optimization/config

defaults:
NOTIFICATION_EMAIL: dev-accounts@acloud.guru
SLACK_WORKSPACE_ID: # PineHeadGurus
SLACK_CHANNEL_ID: # wg-cost-control

test:
INCLUDE_RESOURCE_IDS: true

acg:
ORGANISATION_NAME: acloudguru
INCLUDE_RESOURCE_IDS: true
DAILY_BUDGET_USD:
MONTHLY_BUDGET_USD:

laasprod:
ORGANISATION_NAME: laasprod
INCLUDE_RESOURCE_IDS: false
DAILY_BUDGET_USD:
MONTHLY_BUDGET_USD:
```
* What stacktrace or error message from your provider did you see? `ERROR: TypeError: Reduce of empty array with no initial value`

For feature proposals:
* What is the use case that should be solved. The more detail you describe this in the easier it is to understand for us.
* If there is additional config how would it look

Similar or dependent issues:
* #12345

## Additional Data

* ***Stack Trace***:
* ***Provider Error messages***:

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.