Open amrock-my opened 4 years ago
same issue here
same here
same here
same issue that I attempted to fix improperly here, there are several places that this happens - https://github.com/microsoft/azure-pipelines-vscode/pull/417
@50Wliu I know on that PR you said that we can't edit the file directly and that the file is managed internally, does that mean there is no way to contribute to fixing these kind of issues? I'd gladly spend some time fixing some of these if there is a way we can contribute.
Not that I know of, unfortunately. It actually seems to be auto-generated, meaning that it's even harder to fix than I thought 😢.
Okay, did some more digging. I'm pretty sure that for tasks, the schema is auto-generated from each task's task.json
file. So if you're seeing problems with an individual task's validation, go submit a PR to https://github.com/microsoft/azure-pipelines-tasks.
Still don't know how the rest of it (i.e. trigger
, etc) is generated though.
I guess I've found the reason of issue:
trigger's batch property is defined on line 963 in service-schema.json
And the type is #/definitions/boolean
that is defined on line 3995 in the same file
all of types are string values.
I see two possible solutions:
boolean
boolean
value in a definition of #/definitions/boolean
I'm quite new in open source. Should I just create a PR or how do you guys propose changes here? 😃
Hey @AlexanderVolkovDA!
I'm quite new in open source. Should I just create a PR
Typically, this is exactly how you would do it! However, in this case, the schema is auto-generated, so any manual changes to the PR will get overwritten on the next release. If you'd like, you can create a ticket on Developer Community; otherwise, I'll get to creating the ticket myself eventually.
Hey @AlexanderVolkovDA!
I'm quite new in open source. Should I just create a PR
Typically, this is exactly how you would do it! However, in this case, the schema is auto-generated, so any manual changes to the PR will get overwritten on the next release. If you'd like, you can create a ticket on Developer Community; otherwise, I'll get to creating the ticket myself eventually.
Is ticket already created? Can't find it and I don't want to create duplicates.
I haven't created it! Feel free to create one and link it here @petrnymsa.
Came across this since I noticed the same issue - seems like there's a ticket that was opened for this but closed as "not enough information"
https://developercommunity.visualstudio.com/t/Azure-Pipelines-schema-inconsistently-li/1668070
I opened a new ticket to see if we can get an actual answer on this (and similar classes of issues) https://developercommunity.visualstudio.com/t/YAML-schema-has-incorrect-type-for-boole/10097973
This is still open, and still a problem.
Note this example:
Note in service-schema.json
,
a pipeline parameter
Has items of PipelineTemplateParameters
for which default
has an allowed definition of any
. It ends up that any
is defined as:
Conspicuously, boolean
is missing.
Our YAML file begins as so:
This extension complains about the usage of
batch: true
: Incorrect type. Expected "string". The pipeline still works, and I worry that if I use"true"
instead oftrue
that it might be treated as a scalar value, in which case"false"
will still evaluate totrue
.Even the documentation shows an example of using the boolean value:
This is similar to issue #283 which has the intellisense incorrectly complaining about another part of the yaml.
Extension Version: v1.170.0
Version: 1.46.1 (user setup) Commit: cd9ea6488829f560dc949a8b2fb789f3cdc05f5d Date: 2020-06-17T21:13:20.174Z Electron: 7.3.1 Chrome: 78.0.3904.130 Node.js: 12.8.1 V8: 7.8.279.23-electron.0 OS: Windows_NT x64 10.0.18363