-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gitlab ci !reference
in cache is not validating correctly anymore
#498
Comments
The underlying issue here is almost certainly that cache:
- paths:
- ${PIP_CACHE_DIR}
key:
prefix: "pip-${PYTHON_VERSION}-${CI_JOB_NAME}-${TOX_VERSION}"
files:
- requirements.txt
- [ .apt:cache, cache ] In the general case, I don't think If you agree that this is the issue, I'd like to close as a duplicate of #274. If you don't agree, I think I'll need more information. |
just treating it to match any type would be enough.
…On Tue, Oct 15, 2024, 17:35 Stephen Rosen ***@***.***> wrote:
The underlying issue here is almost certainly that !reference is not
supported by check-jsonschema.
So the sample you gave is treated exactly the same as
cache:
- paths:
- ${PIP_CACHE_DIR}
key:
prefix: "pip-${PYTHON_VERSION}-${CI_JOB_NAME}-${TOX_VERSION}"
files:
- requirements.txt
- [ .apt:cache, cache ]
In the general case, I don't think !reference can be supported. In the
narrow case of loading from a local path, we can add support, so I'm
currently thinking of this as a feature request to that effect. See also
#274 <#274>
If you agree that this is the issue, I'd like to close as a duplicate of
#274 <#274>.
If you *don't* agree, I think I'll need more information.
—
Reply to this email directly, view it on GitHub
<#498 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAV4ZGFQ6LMT5EPFKIQ5UUDZ3UY3RAVCNFSM6AAAAABP7MFXOCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJUGM2DQMRZGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I'm not sure what exactly you're asking, but if you want What we can do is handle YAML tags, like Given a: !some-tag b It can be parsed as the equivalent of For
i.e. It doesn't do very much. We can make it do more, but whatever it outputs will be used as an input to the later validation phase, when the gitlab schema is evaluated against it. There are all kinds of other manipulations which are valid to define, but they aren't all equally wise. Making |
I've raised a ticket for Gitlab about this too. A Resolving the reference is unfeasible since in a lot of cases it require authentication to access the source. For that there is an API to handle it and a specific tool. I don't know if there is a way to generate something that matches any schema. That would probably be the best. If not, if the schema is available during parsing, generating an element, that matches the required schema could work. I don't have any good solutions either. |
It sounds like you're confirming that you would like The question of whether that's done with a special type, or by interpretation of the schema, is really a question of implementation. Implementation of I'm not decided on which implementation paths to pursue right now. I'll have to give it some thought. Both local-file loading and a custom validator seem worthwhile. They may have interesting interplay. |
Since the new update , for this code:
I'm getting this error:
The text was updated successfully, but these errors were encountered: