Skip to content

fix: warning for default value when validation error raised in check cmd#179

Draft
julesbertrand wants to merge 1 commit into
developfrom
fix/warning-for-default-values
Draft

fix: warning for default value when validation error raised in check cmd#179
julesbertrand wants to merge 1 commit into
developfrom
fix/warning-for-default-values

Conversation

@julesbertrand

@julesbertrand julesbertrand commented Apr 10, 2024

Copy link
Copy Markdown
Collaborator

Description

Error is raised - no warning for default value

❯ vertex-deployer -log DEBUG check foo -wd                                 
2024-04-10 10:41:28.265 | INFO     | deployer.cli:check:402 - Checking pipelines ['foo']
2024-04-10 10:41:28.268 | DEBUG    | deployer.pipeline_checks:import_pipeline:87 - Importing pipeline foo
2024-04-10 10:41:28.272 | DEBUG    | deployer.pipeline_checks:compile_pipeline:97 - Compiling pipeline foo
2024-04-10 10:41:28.274 | DEBUG    | deployer.pipeline_checks:validate_configs:112 - Validating configs for pipeline foo
┏━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Status ┃ Pipeline ┃ Config File ┃ Config Error Type ┃ Config Error Message                                   ┃
┡━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│   ❌   │ foo      │ test.json   │ value_error       │ Value error, Expecting value: line 1 column 1 (char 0) │
├────────┼──────────┼─────────────┼───────────────────┼────────────────────────────────────────────────────────┤
│   ✅   │ foo      │ dev.json    │                   │                                                        │
├────────┼──────────┼─────────────┼───────────────────┼────────────────────────────────────────────────────────┤
│   ❌   │ foo      │ prod.json   │ value_error       │ Value error, Expecting value: line 1 column 1 (char 0) │
└────────┴──────────┴─────────────┴───────────────────┴────────────────────────────────────────────────────────┘

No error raised - warning appears for default value

❯ vertex-deployer -log DEBUG check foo -wd -cfp vertex/configs/foo/dev.json
2024-04-10 10:40:54.009 | INFO     | deployer.cli:check:402 - Checking pipelines ['foo']
2024-04-10 10:40:54.011 | DEBUG    | deployer.pipeline_checks:import_pipeline:87 - Importing pipeline foo
2024-04-10 10:40:54.016 | DEBUG    | deployer.pipeline_checks:compile_pipeline:97 - Compiling pipeline foo
2024-04-10 10:40:54.018 | DEBUG    | deployer.pipeline_checks:validate_configs:112 - Validating configs for pipeline foo
┏━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Status ┃ Pipeline ┃ Config File ┃ Attribute ┃ Config Error Type ┃ Config Error Message                            ┃
┡━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│   ⚠️    │ foo      │ dev.json    │ foo       │ default_value     │ Using default value from pipeline definition: 1 │
└────────┴──────────┴─────────────┴───────────┴───────────────────┴─────────────────────────────────────────────────┘

Related Issue

Type of Change

  • 🚀 New feature (non-breaking change which adds functionality)
  • 🔧 Bug fix (non-breaking change which fixes an issue)
  • 🥂 Improvement (non-breaking change which improves an existing feature)
  • 🔐 Security fix
  • 📚 Examples / docs / tutorials / dependencies update
  • 💥 Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I've read the CONTRIBUTING.md guide.
  • I've updated the code style using make format-code.
  • I've written tests for all new methods and classes that I created.
  • I've written the docstring in Google format for all the methods and classes that I used.
  • If my change requires a change to docs, I have updated the documentation accordingly.

@github-actions

Copy link
Copy Markdown

Failed to generate code suggestions for PR

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.

1 participant