Azure / Azure/azure-rest-api-specs
`Invalid URL / TypeError: Invalid URL` when processing Chaos Experiments
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
when processing this tag in `azure-rest-api-specs/specification/chaos/resource-manager/readme.md`:
```markdown
### Tag: package-2024-01
These settings apply only when `--tag=package-2024-01` is specified on the command line.
```yaml $(tag) == 'package-2024-01'
input-file:
- Microsoft.Chaos/stable/2024-01-01/capabilities.json
- Microsoft.Chaos/stable/2024-01-01/capabilityTypes.json
- Microsoft.Chaos/stable/2024-01-01/experiments.json
- Microsoft.Chaos/stable/2024-01-01/operationStatuses.json
- Microsoft.Chaos/stable/2024-01-01/operations.json
- Microsoft.Chaos/stable/2024-01-01/targetTypes.json
- Microsoft.Chaos/stable/2024-01-01/targets.json
directive:
- from: swagger-document
where: "$.definitions.action"
transform: >
$["x-ms-client-name"] = "ChaosExperimentAction";
- from: swagger-document
where: "$.definitions.branch"
transform: >
$["x-ms-client-name"] = "ChaosExperimentBranch";
- from: swagger-document
where: "$.definitions.step"
transform: >
$["x-ms-client-name"] = "ChaosExperimentStep";
- from: swagger-document
where: "$.definitions.filter"
transform: >
$["x-ms-client-name"] = "ChaosTargetFilter";
- from: swagger-document
where: "$.definitions.simpleFilter"
transform: >
$["x-ms-client-name"] = "ChaosTargetSimpleFilter";
- from: swagger-document
where: "$.definitions.simpleFilterParameters"
transform: >
$["x-ms-client-name"] = "ChaosTargetSimpleFilterParameters";
- from: swagger-document
where: "$.definitions.selector"
transform: >
$["x-ms-client-name"] = "ChaosTargetSelector";
- from: swagger-document
where: "$.definitions.listSelector"
transform: >
$["x-ms-client-name"] = "ChaosTargetListSelector";
- from: swagger-document
where: "$.definitions.querySelector"
transform: >
$["x-ms-client-name"] = "ChaosTargetQuerySelector";
```
the following failure occurs:
```
debug | [12.07 s] openapi-document/emitter - END [0 s][109 MB]
fatal | Process() cancelled due to exception : Invalid URL / TypeError: Invalid URL
at new URL (node:internal/url:775:36)
at /mnt/c/LocalGitRepos/stackql/stackql-azure-openapi/nodemodules/@autorest/core/dist/src_lib_autorest-corets.js:3135:52
at Array.map ()
at resolveCommonRoot (/mnt/c/LocalGitRepos/stackql/stackql-azure-openapi/nodemodules/@autorest/core/dist/src_lib_autorest-corets.js:3135:41)
at resolveNewIdentity (/mnt/c/LocalGitRepos/stackql/stackql-azure-openapi/nodemodules/@autorest/core/dist/src_lib_autorest-corets.js:3161:18)
at normalizeIdentity (/mnt/c/LocalGitRepos/stackql/stackql-azure-openapi/nodemodules/@autorest/core/dist/src_lib_autorest-corets.js:3172:25)
at async ScheduleNode (/mnt/c/LocalGitRepos/stackql/stackql-azure-openapi/nodemodules/@autorest/core/dist/src_lib_autorest-corets.js:1351:29)
```
by process of elimination I have narrowed the issue to this file : `azure-rest-api-specs/specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/experiments.json`
Contributor guide
Research direction
Start by processing the package-2024-01 tag from specification/chaos/resource-manager/readme.md and reproduce the reported Invalid URL error. Inspect Microsoft.Chaos/stable/2024-01-01/experiments.json alongside the other listed input files. Done means the Chaos experiment inputs process without the reported exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, openapi
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100