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

feat(exit-code): configure exit code on warning #2

Merged
merged 4 commits into from
Jul 11, 2023

Conversation

tuxes3
Copy link
Member

@tuxes3 tuxes3 commented Jul 4, 2023

Furthermore i removed all deprecations and made the bundle only usable starting symfony 6.3.

That would mean we need to tag the next version v2.0.0.

Issue: #1

@tuxes3 tuxes3 requested a review from xarem July 4, 2023 14:58
@tuxes3 tuxes3 self-assigned this Jul 4, 2023
@tuxes3 tuxes3 force-pushed the feature/1-configure-exit-code-on-warnings branch 2 times, most recently from 3d9a88f to 3cffd38 Compare July 4, 2023 15:08
@codecov
Copy link

codecov bot commented Jul 4, 2023

Codecov Report

Patch coverage: 97.61% and project coverage change: -13.51 ⚠️

Comparison is base (034110f) 97.61% compared to head (f0fc2c8) 84.11%.

Additional details and impacted files
@@              Coverage Diff               @@
##             develop       #2       +/-   ##
==============================================
- Coverage      97.61%   84.11%   -13.51%     
- Complexity       100      109        +9     
==============================================
  Files             18       19        +1     
  Lines            294      384       +90     
==============================================
+ Hits             287      323       +36     
- Misses             7       61       +54     
Impacted Files Coverage Δ
src/Enums/MetricStateEnum.php 100.00% <ø> (ø)
src/Enums/SensorStateEnum.php 100.00% <ø> (ø)
src/Monitoring/Metric/AbstractMetric.php 83.33% <0.00%> (ø)
src/Monitoring/Metric/Messenger/QueuedMessages.php 17.39% <ø> (-72.61%) ⬇️
.../Monitoring/Sensor/Database/DoctrineMigrations.php 23.52% <ø> (-63.98%) ⬇️
src/Monitoring/Sensor/Service/Mercure.php 25.00% <ø> (-75.00%) ⬇️
src/Manager/MonitoringManager.php 90.38% <94.44%> (-6.84%) ⬇️
src/Command/CheckCommand.php 100.00% <100.00%> (ø)
src/Controller/ApiController.php 100.00% <100.00%> (ø)
...cyInjection/CompilerPass/AttributeCompilerPass.php 100.00% <100.00%> (ø)
... and 8 more

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@tuxes3 tuxes3 force-pushed the feature/1-configure-exit-code-on-warnings branch from 3cffd38 to f6e0456 Compare July 4, 2023 15:11
@tuxes3 tuxes3 force-pushed the feature/1-configure-exit-code-on-warnings branch from f6e0456 to 150ac42 Compare July 4, 2023 15:28
@tuxes3
Copy link
Member Author

tuxes3 commented Jul 4, 2023

@xarem these checks are getting out of hand ...

@xarem
Copy link
Member

xarem commented Jul 5, 2023

@tuxes3 in case of a warning, the http response code for the HTTP check is still 503. How about making it configurable like this?

whatwedo_monitor:
    endpoint:
        api:
            http_status_code:
                warning: 503
                critical: 503
        command:
            exit_code:
                warning: 1
                critical: 1

In addition, please update the docs with the change.

@tuxes3
Copy link
Member Author

tuxes3 commented Jul 10, 2023

@xarem ready for second review

@xarem xarem self-requested a review July 10, 2023 14:53
@tuxes3 tuxes3 merged commit b59fcd0 into develop Jul 11, 2023
8 of 9 checks passed
@tuxes3 tuxes3 deleted the feature/1-configure-exit-code-on-warnings branch July 11, 2023 10:59
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.

2 participants