Skip to content
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

chore: remove legacy schema validation code #3257

Merged
merged 4 commits into from
Jul 13, 2023
Merged

chore: remove legacy schema validation code #3257

merged 4 commits into from
Jul 13, 2023

Conversation

hoffa
Copy link
Contributor

@hoffa hoffa commented Jul 13, 2023

Issue #, if available

Description of changes

See #3256 (comment), it seems as if recent regression in jsonschema is causing issues with tests. Also #3248 caught RefResolver warnings.

In any case, the entire validator code is unused (removed in #2961), so getting rid of it. Nowadays we do thorough schema tests elsewhere:

@parameterized.expand(itertools.product(SCHEMA_VALIDATION_TESTS))
def test_validate_schema(self, testcase):
obj = yaml_parse(Path(testcase).read_bytes())
validate(obj, schema=SCHEMA)

Description of how you validated changes

Checklist

Examples?

Please reach out in the comments if you want to add an example. Examples will be
added to sam init through aws/aws-sam-cli-app-templates.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@hoffa hoffa changed the title chore: remove jsonschema runtime dependency chore: remove legacy schema validation code Jul 13, 2023
@hoffa hoffa marked this pull request as ready for review July 13, 2023 20:23
@hoffa hoffa requested a review from a team as a code owner July 13, 2023 20:23
@ssenchenko ssenchenko merged commit 6a16639 into aws:develop Jul 13, 2023
8 checks passed
@hoffa hoffa deleted the yeet-jsonschema branch July 14, 2023 04:57
@yan12125
Copy link
Contributor

Thank you very much for this fix. May I expect a new version with this fix in near future?

@hoffa
Copy link
Contributor Author

hoffa commented Jul 15, 2023

@yan12125 Yes, it should roll out in the upcoming weeks. If you need a fix for the jsonschema issue sooner, I'd suggest pinning to an earlier version (I think <4.18, but haven't tested).

@yan12125
Copy link
Contributor

Thank you for the information. However, I cannot decide jsonschema version in our environment. I'm maintaining this Arch Linux package, and jsonschema on Arch Linux is already upgraded to 4.18.3. I will investigate alternative approaches - probably backporting this fix or disabling relevant tests.

@awood45 awood45 mentioned this pull request Aug 16, 2023
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants