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

Better summary report notification #1469

Open
mani76 opened this issue Nov 11, 2022 · 4 comments
Open

Better summary report notification #1469

mani76 opened this issue Nov 11, 2022 · 4 comments

Comments

@mani76
Copy link

mani76 commented Nov 11, 2022

Is your feature request related to a problem? Please describe.

Currently notification report sends following info when checking is finished:

Updated containers
Skipped containers
Fresh containers
Failed containers

When running using monitor only mode, there is no way to know if any updates are found, because it only provides list of fresh containers.

Describe the solution you'd like

Monitor only mode should include new report info list which contains containers which could be updated.
For example:

Updateable containers

Same info could also be added to the text message.

Describe alternatives you've considered

Use existing Updated containers list also when not actually doing update.

Additional context

No response

@github-actions
Copy link

Hi there! 👋🏼 As you're new to this repo, we'd like to suggest that you read our code of conduct as well as our contribution guidelines. Thanks a bunch for opening your first issue! 🙏

@piksel
Copy link
Member

piksel commented Nov 11, 2022

Yeah, good point. Normally (when not using monitor-only) a container should always end up in either failed or updated when there is a newer version available. So that's why the reports doesn't have the concept of a stale (containers that have an update available) status.

@piksel
Copy link
Member

piksel commented Nov 13, 2022

Actually, the support is there, it's just the template that doesn't consider the stale containers. Using this template should fix it:

{{- if .Report -}}
  {{- with .Report -}}
    {{- if ( or .Updated .Failed .Stale ) -}}
{{len .Scanned}} Scanned, {{len .Updated}} Updated, {{len .Stale}} Stale, {{len .Failed}} Failed
      {{- range .Updated}}
- {{.Name}} ({{.ImageName}}): {{.CurrentImageID.ShortID}} updated to {{.LatestImageID.ShortID}}
      {{- end -}}
      {{- range .Stale}}
- {{.Name}} ({{.ImageName}}): {{.CurrentImageID.ShortID}} has newer image available {{.LatestImageID.ShortID}}
      {{- end -}}
      {{- range .Fresh}}
- {{.Name}} ({{.ImageName}}): {{.State}}
	  {{- end -}}
	  {{- range .Skipped}}
- {{.Name}} ({{.ImageName}}): {{.State}}: {{.Error}}
	  {{- end -}}
	  {{- range .Failed}}
- {{.Name}} ({{.ImageName}}): {{.State}}: {{.Error}}
	  {{- end -}}
    {{- end -}}
  {{- end -}}
{{- else -}}
  {{range .Entries -}}{{.Message}}{{"\n"}}{{- end -}}
{{- end -}}

@mani76
Copy link
Author

mani76 commented Nov 15, 2022

Seems to work, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants