feat(cli): Add available version checking#8553
Conversation
There was a problem hiding this comment.
@owenrumney left comments.
Take a look, please.
Also I think update is not a very good name for this logic.
Maybe something like notification?
UPD:
and I would also think about how we can inform users about the ---no-notises flag
4a269dd to
be383c3
Compare
knqyf263
left a comment
There was a problem hiding this comment.
LGTM. I left small comments.
9c714fb to
f21196a
Compare
There was a problem hiding this comment.
It's actually only used in the test at the moment to know when the process is completed
67acb5e to
5152ff5
Compare
yes I already have a draft for a dedicated doc, wasn't sure if we want it in the same PR or not. actually I'll try to add it to this one. (ps i don't think the doc should include referenences from other products) |
knqyf263
left a comment
There was a problem hiding this comment.
LGTM!
I'm fine with updating the documentation either in this PR or in a separate one, as long as it gets updated before the next release—so I'll approve this PR.
nikpivkin
left a comment
There was a problem hiding this comment.
LGTM. Left a small comment
|
I may have some more comment after writing the doc, so don't merge it yet please |
929742f to
bd1feb4
Compare
DmitriyLewen
left a comment
There was a problem hiding this comment.
LGTM
left small comments
- Update the preRun and postRun to check and print the latest version
- Run in a go routine so as not to interfere or slow the normal flow
- Provide new `--no-notices` flag to prevent notice checking, same if
they `-q/--quiet` flag is used
- Add tests for the identifier and the check logic
- change no-notices flag to `skip-version-check` and add `disable-metrics` flag - create VersionChecker type and add to runner - if the flag conditions are met, create a new checker and trigger check - handle logic of flags for disabling metrics - update the tests
Signed-off-by: Owen Rumney <owen.rumney@aquasec.com>
Signed-off-by: Owen Rumney <owen.rumney@aquasec.com>
Signed-off-by: Owen Rumney <owen.rumney@aquasec.com>
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
Remove the -x prefix as per RFC6648. While headers are case-insensitve, making custom headers title case as per general convention. Signed-off-by: Owen Rumney <owen.rumney@aquasec.com>
- update the URL to check.trivy.cloud/updates - change the flag to disable-telemetry - update tests Signed-off-by: Owen Rumney <owen.rumney@aquasec.com>
Signed-off-by: Owen Rumney <owen.rumney@aquasec.com>
offline scan isn't to be included at the moment, this will be tackled as a different piece of work. tidied up the notices option to be more consistent with the flag it reflects Signed-off-by: Owen Rumney <owen.rumney@aquasec.com>
Signed-off-by: Owen Rumney <owen.rumney@aquasec.com>
…ents Signed-off-by: Owen Rumney <owen.rumney@aquasec.com>
- add support for different formats of date time from the service Signed-off-by: Owen Rumney <owen.rumney@aquasec.com>
52162e0 to
c6f5d66
Compare
Co-authored-by: simar7 <1254783+simar7@users.noreply.github.com>
|
@itaysk Can we merge this PR? |
Description
Adds a background check to
https://api.trivy.cloud/checkto see if there is new version or any relevant notices available.The check will be suppressed if the user uses the
--no-noticesor--quietenvvars or flags. The docs have been updated with the new notices flagExample output
Although the image shows dummy versions, the api has been updated to reflect the correct information and has no announcements at this time... just the latest version (0.60.0)
Related issues
Checklist