Cannot import parameters from an oprah exports file
- Linguagem predominante
- JavaScript
- Estrelas
- 15
- Forks
- 4
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
# 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***:
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Direção de pesquisa
Use the reported commands exactly (`yarn oprah export -s acg`, then `yarn oprah import -s acg`) with `/tmp/oprah-exports.json` and the shown `oprah.yml` config path to reproduce the failure. Then inspect the CLI `import` command and the export/import parsing path for where an empty-array `reduce()` is executed. No tests or code files are named, so rerun the same export/import flow as validation; done means `oprah import -s acg` completes without `TypeError: Reduce of empty array with no initial value`.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- aws, javascript
- Domínio
- cli
- Tipo de issue
- Bug
- Dificuldade
- 3/5
- Tempo estimado
- Meio dia
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 42/100