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

Improve CreateRepositoryAttribute error messages #338

Merged
merged 41 commits into from
Jan 14, 2025

Conversation

Magnus-Kuhn
Copy link
Contributor

@Magnus-Kuhn Magnus-Kuhn commented Nov 21, 2024

Readiness checklist

  • I added/updated tests.
  • I ensured that the PR title is good enough for the changelog.
  • I labeled the PR.

Description

Validates attribute contents in the CreateRepositoryAttribute use case with serval instead of the ajv schema validator. Includes added tests with the resulting error messages when validations fail. It's not perfect (you can have additional properties and the errors of complex attributes are also unclear).
It's not clear that this approach is more promising than attempting to improve the ajv usage.

@Magnus-Kuhn Magnus-Kuhn added wip Work in Progress (blocks mergify from auto update the branch) bug Something isn't working labels Nov 21, 2024
Copy link

codecov bot commented Nov 21, 2024

Codecov Report

Attention: Patch coverage is 63.82979% with 17 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...onsumption/attributes/CreateRepositoryAttribute.ts 63.04% 17 Missing ⚠️
Files with missing lines Coverage Δ
...nsumption/src/consumption/ConsumptionCoreErrors.ts 80.90% <100.00%> (ø)
packages/runtime/src/useCases/common/Schemas.ts 100.00% <ø> (ø)
...onsumption/attributes/CreateRepositoryAttribute.ts 81.30% <63.04%> (-15.76%) ⬇️

@Magnus-Kuhn Magnus-Kuhn changed the title [Demo] Don't validate contents of CreateRepositoryAttributeUseCase with ajv [Demo] Don't validate attribute contents in CreateRepositoryAttributeUseCase with ajv Nov 21, 2024
@Magnus-Kuhn Magnus-Kuhn changed the title [Demo] Don't validate attribute contents in CreateRepositoryAttributeUseCase with ajv Improve CreateRepositoryAttribute error messages Dec 4, 2024
@Magnus-Kuhn Magnus-Kuhn removed the wip Work in Progress (blocks mergify from auto update the branch) label Dec 9, 2024
@Magnus-Kuhn Magnus-Kuhn marked this pull request as ready for review December 9, 2024 13:59
@Magnus-Kuhn Magnus-Kuhn requested a review from britsta December 11, 2024 12:47
@jkoenig134 jkoenig134 changed the title Improve CreateRepositoryAttribute error messages [POC, WIP] Improve CreateRepositoryAttribute error messages Dec 16, 2024
@jkoenig134 jkoenig134 added the wip Work in Progress (blocks mergify from auto update the branch) label Dec 16, 2024
@jkoenig134 jkoenig134 marked this pull request as draft December 16, 2024 14:50
@Magnus-Kuhn Magnus-Kuhn marked this pull request as ready for review January 14, 2025 10:37
@Magnus-Kuhn Magnus-Kuhn removed the wip Work in Progress (blocks mergify from auto update the branch) label Jan 14, 2025
@Magnus-Kuhn Magnus-Kuhn changed the title [POC, WIP] Improve CreateRepositoryAttribute error messages Improve CreateRepositoryAttribute error messages Jan 14, 2025
@Magnus-Kuhn Magnus-Kuhn enabled auto-merge (squash) January 14, 2025 14:21
@Magnus-Kuhn Magnus-Kuhn merged commit e5d3324 into main Jan 14, 2025
15 checks passed
@Magnus-Kuhn Magnus-Kuhn deleted the fix-create-repository-attribute-error-message branch January 14, 2025 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants