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

Specify key requirements in validate_key_value error #511

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

stveit
Copy link
Contributor

@stveit stveit commented Oct 14, 2022

Updates the error message to include requirements for the key. Previously, if you tried to add a tag with invalid Key, it was not clear this could be the issue in the error message.

@sonarcloud
Copy link

sonarcloud bot commented Oct 14, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@codecov-commenter
Copy link

codecov-commenter commented Oct 14, 2022

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (3b09e9b) 79.65% compared to head (50d3748) 79.65%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #511   +/-   ##
=======================================
  Coverage   79.65%   79.65%           
=======================================
  Files          73       73           
  Lines        3584     3584           
=======================================
  Hits         2855     2855           
  Misses        729      729           

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

@stveit stveit changed the title Specify key reqs in validate_key_value error Specify key requirements in validate_key_value error Oct 14, 2022
Copy link
Contributor

@johannaengland johannaengland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When posting to /api/v1/incidents/ with the following tags [{"tag": "HELLO=world"}] I get the error "Enter a valid key consisting of lowercase letters, numbers and underscores." which stems from line 20 in the same file.

But it is still good to also include the key requirements in this error message

src/argus/incident/validators.py Outdated Show resolved Hide resolved
@hmpf hmpf added the paused Assignee is busy with things of higher priority label Nov 15, 2022
Copy link

sonarcloud bot commented Feb 16, 2024

Quality Gate Passed Quality Gate passed

Issues
1 New issue

Measures
0 Security Hotspots
No data about Coverage
0.3% Duplication on New Code

See analysis details on SonarCloud

Copy link

Test results

     11 files     803 suites   25m 51s ⏱️
   408 tests    407 ✔️   1 💤 0
4 488 runs  4 477 ✔️ 11 💤 0

Results for commit 50d3748.

Copy link
Contributor

@johannaengland johannaengland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only needs a changelog file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
paused Assignee is busy with things of higher priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants