[BUG] malformed env JSON gives "Error: Invalid env" message with no context
@kusweta is already working on this.
Since Feb 28, 2023.
Assessment
This issue has not been assessed yet.
Description
I ran the GitHub action with the following input
- name: 'Azure Load Testing'
uses: azure/load-testing
with:
loadTestConfigFile: 'loadtest/smoketest.yaml'
loadTestResource: ${{ env.AZURE_LOAD_TEST_NAME }}
resourceGroup: ${{ env.AZURE_RESOURCE_GROUP_NAME }}
env: |
[
{
"name": "domain",
"value": ${{ env.AZURE_LOAD_TEST_HOST }}
}
]
This returned Error: Invalid env.
env could refer to :
- The environment variables
- The workflow environment variables
- The action environment variables
- The
envparameter
The actual issue was that the JSON in env parameter was invalid because it was missing quotes, but it was difficult to diagnose. Please can you update the error message here to be more specific
https://github.com/Azure/load-testing/blob/main/src/mappers.ts#L388-L390
The exception object has a detailed message on why JSON.parse failed but this context is being lost
- Dominant language
- TypeScript
- Stars
- 20
- Forks
- 27
- Avg merge
- 6d 16h
- Merged PRs (30d)
- 8
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Azure/load-testing
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
Azure/load-testing#166 · 1 comment · 1 reaction ·
-
Upgrade to node 24 Openneed-to-triage
Azure/load-testing#162 · 6 comments · 1 reaction · 1 assignee ·
-
need-to-triage
Azure/load-testing#142 · 1 assignee ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Azure/load-testing#48 · 2 comments ·
-
need-to-triage
Azure/load-testing#47 · 1 assignee ·
All issues in Azure/load-testing
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
copse-dev/agent-pane#2953 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·