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

implement schema validation for vendoring and schemas #1147

Draft
wants to merge 40 commits into
base: feature/dev-3056-refactor-gogetter-utility-for-better-testability-2
Choose a base branch
from

Conversation

samtholiya
Copy link
Collaborator

@samtholiya samtholiya commented Mar 14, 2025

Why Draft

what

  • Added a new validator command to the CLI.
  • This command verifies the YAML structure of the atmos CLI.
  • If a schema key is present in the YAML, it validates the structure against the schema.

image
image

why

  • Ensures that configuration files follow the correct YAML structure.
  • Prevents misconfigurations and errors caused by invalid or malformed YAML.
  • Adds an extra layer of validation by enforcing schema compliance when applicable.
  • Improves reliability and usability of the CLI by catching issues early.

references

@mergify mergify bot added the triage Needs triage label Mar 14, 2025
@samtholiya samtholiya changed the title Feature/dev 3030 implement schema validation for vendoring and 2 Feature/dev 3030 implement schema validation for vendoring and schemas Mar 14, 2025
Copy link

codecov bot commented Mar 14, 2025

Codecov Report

Attention: Patch coverage is 45.13274% with 248 lines in your changes missing coverage. Please review.

Project coverage is 26.46%. Comparing base (9e0823c) to head (eca159c).

Files with missing lines Patch % Lines
pkg/filematch/mock_interface.go 0.00% 76 Missing ⚠️
internal/exec/validate_schema.go 44.77% 27 Missing and 10 partials ⚠️
pkg/datafetcher/mock_fetch_schema.go 0.00% 30 Missing ⚠️
pkg/validator/schema_validator.go 52.83% 19 Missing and 6 partials ⚠️
cmd/validate_schema.go 17.39% 19 Missing ⚠️
pkg/filematch/filematch.go 81.48% 10 Missing and 5 partials ⚠️
pkg/validator/mock_schema_validator.go 0.00% 15 Missing ⚠️
pkg/downloader/mock_file_downloader_interface.go 0.00% 9 Missing ⚠️
pkg/datafetcher/fetch_schema.go 75.00% 5 Missing and 1 partial ⚠️
pkg/utils/markdown_utils.go 0.00% 4 Missing ⚠️
... and 5 more
Additional details and impacted files
@@                                           Coverage Diff                                           @@
##           feature/dev-3056-refactor-gogetter-utility-for-better-testability-2    #1147      +/-   ##
=======================================================================================================
+ Coverage                                                                26.06%   26.46%   +0.39%     
=======================================================================================================
  Files                                                                      183      197      +14     
  Lines                                                                    20687    21135     +448     
=======================================================================================================
+ Hits                                                                      5392     5593     +201     
- Misses                                                                   14449    14672     +223     
- Partials                                                                   846      870      +24     
Flag Coverage Δ
unittests 26.46% <45.13%> (+0.39%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@samtholiya samtholiya changed the title Feature/dev 3030 implement schema validation for vendoring and schemas implement schema validation for vendoring and schemas Mar 15, 2025
@samtholiya samtholiya force-pushed the feature/dev-3056-refactor-gogetter-utility-for-better-testability-2 branch from 698a029 to 390a342 Compare March 17, 2025 20:46
@osterman osterman added the no-release Do not create a new release (wait for additional code changes) label Mar 17, 2025
@samtholiya samtholiya force-pushed the feature/dev-3030-implement-schema-validation-for-vendoring-and-2 branch from f209905 to 0045223 Compare March 20, 2025 06:26
…ing-and-2' of https://github.com/cloudposse/atmos into feature/dev-3030-implement-schema-validation-for-vendoring-and-2
@samtholiya samtholiya force-pushed the feature/dev-3030-implement-schema-validation-for-vendoring-and-2 branch from 5216b03 to b99b034 Compare March 20, 2025 06:29
@samtholiya samtholiya force-pushed the feature/dev-3030-implement-schema-validation-for-vendoring-and-2 branch 3 times, most recently from 0a9fa6f to 5f1b367 Compare March 23, 2025 17:01
@samtholiya samtholiya force-pushed the feature/dev-3030-implement-schema-validation-for-vendoring-and-2 branch from 5f1b367 to d4c7ec5 Compare March 23, 2025 17:16
Copy link

mergify bot commented Mar 23, 2025

💥 This pull request now has conflicts. Could you fix it @samtholiya? 🙏

@mergify mergify bot added the conflict This PR has conflicts label Mar 23, 2025
…estability-2' into feature/dev-3030-implement-schema-validation-for-vendoring-and-2
@mergify mergify bot removed the conflict This PR has conflicts label Mar 23, 2025
Copy link

mergify bot commented Mar 23, 2025

Important

Cloud Posse Engineering Team Review Required

This pull request modifies files that require Cloud Posse's review. Please be patient, and a core maintainer will review your changes.

To expedite this process, reach out to us on Slack in the #pr-reviews channel.

@mergify mergify bot added needs-cloudposse Needs Cloud Posse assistance stacked labels Mar 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cloudposse Needs Cloud Posse assistance no-release Do not create a new release (wait for additional code changes) stacked triage Needs triage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants