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

Fix timeout preference handling (backport #486) #489

Closed

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Aug 16, 2021

This is an automatic backport of pull request #486 done by Mergify.
Cherry-pick of 1e90dfa has failed:

On branch mergify/bp/ospd-openvas-20.08/pr-486
Your branch is up to date with 'origin/ospd-openvas-20.08'.

You are currently cherry-picking commit 1e90dfa.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   ospd_openvas/preferencehandler.py

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   CHANGELOG.md

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.io/

Scripts timeouts are special preferences and in the openvas side are
treated in a especial way too.

The timeout preference is in the 13th position in the script metadata in redis,
and not with other preferences.
Also, the timeout is stored in globals with format timeout.<SCRIPT-OID>|||<value>,
while other script preferences have the form oid:name:id:type|||value.

The user is allowed to send a custom timeout, even when the script has no default one
set in the description block (use default 320sec). When the user send a custom timeout
the preference is not found and ospd-openvas logs an error message.

With this patch, the preference with ID:0 (timeout) is always handled and sent to openvas.

(cherry picked from commit 1e90dfa)

# Conflicts:
#	CHANGELOG.md
@mergify mergify bot requested a review from a team as a code owner August 16, 2021 11:18
@mergify mergify bot added the conflicts label Aug 16, 2021
@codecov
Copy link

codecov bot commented Aug 16, 2021

Codecov Report

Merging #489 (a3aadd9) into ospd-openvas-20.08 (9e970d7) will decrease coverage by 0.03%.
The diff coverage is 75.00%.

Impacted file tree graph

@@                  Coverage Diff                   @@
##           ospd-openvas-20.08     #489      +/-   ##
======================================================
- Coverage               80.43%   80.39%   -0.04%     
======================================================
  Files                       9        9              
  Lines                    1559     1561       +2     
======================================================
+ Hits                     1254     1255       +1     
- Misses                    305      306       +1     
Impacted Files Coverage Δ
ospd_openvas/preferencehandler.py 88.01% <75.00%> (-0.27%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9e970d7...a3aadd9. Read the comment docs.

@jjnicola
Copy link
Member

Clossing here. It won't be backport to 20.08

@jjnicola jjnicola closed this Aug 16, 2021
@mergify mergify bot deleted the mergify/bp/ospd-openvas-20.08/pr-486 branch August 16, 2021 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant