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: can skip releases for a deployed_service that has no webhooks #62

Closed
samcro1967 opened this issue May 22, 2022 · 17 comments · Fixed by #73
Closed

feat: can skip releases for a deployed_service that has no webhooks #62

samcro1967 opened this issue May 22, 2022 · 17 comments · Fixed by #73
Labels
enhancement New feature or request

Comments

@samcro1967
Copy link

I noticed that the webhook buttons do not disappear after a webhook is removed from config.xml. They persist in the UI, but are disabled.

image

@samcro1967 samcro1967 added the bug Something isn't working label May 22, 2022
@JosephKav
Copy link
Collaborator

That's just how I designed it. I believe the info button looked too different otherwise and I wanted it to be a consistent layout/design

@jrhbcn
Copy link

jrhbcn commented May 23, 2022

@JosephKav Would it be possible to skip a release even if a webhook is not defined (but a deployment version is)? Sometimes I just want to skip a release without updating (for instance the .0 home assistant releases or the Unifi release candidates).

@JosephKav
Copy link
Collaborator

Yeah, I can look into adding this. Just not sure on how I'd discretely signify services that have skipped a version. I do this for those with webhooks by changing the resend icon to a tick

@samcro1967
Copy link
Author

I would suggest adding "(skipped)" in the description after what is currently called To and remove the webhook buttons. Might also consider renaming "From" and "To" to current and deployed for consistency, although I think it is intuitive enough as is.

@jrhbcn
Copy link

jrhbcn commented May 25, 2022

Yes, something like @samcro1967 is suggesting sounds fine! I was thinking something similar as to keeping the info and removing the current greyed out "OK" and "cancel" buttons for a "skip" one (or even adding a "refresh" one to maintain the 3 button layout if you want).

@JosephKav
Copy link
Collaborator

JosephKav commented May 26, 2022

I don't really want to keep those update available options when you skip a release as I want a skip to not loudly show that there is a new version available. Currently, when you skip a release with webhooks, those buttons disappear and the only indicator of the skip is the icon on the resend button becoming a tick. We can't do that as there's nothing to resend in these cases.

I've managed to get it to hide the 'Send' button, but still take up the same space. So here's the options you'll get if there's a deployed_version checker, but no webhooks:
image

I'm proposing we add another info icon to display that it's skipped, but just right-align it
image

Not sure whether to display that icon if there are webhooks
image
as the resend icon has changed, and the modal that pops up tells you which version it's on and would go to (so what version has been skipped)
image
I'm leaning towards keeping the existing layout when the service has webhooks and so only displaying this 'Skipped VERSION' icon when there are no webhooks

@samcro1967
Copy link
Author

I think that makes sense. So you would click on the info button and get the ability to deploy if a webhook is present? And you can also skip a version if a webhook is not even present and get the info button?

@JosephKav
Copy link
Collaborator

So you would click on the info button and get the ability to deploy if a webhook is present?

nothing's changed if you have webhook.s You'll get the options to view info on it, approve it, and skip it

And you can also skip a version if a webhook is not even present and get the info button?

If you don't have any webhooks (but do have a deployed version it's checking as otherwise the version would update straight away), it'll give you my first picture with the info and skip buttons

@samcro1967
Copy link
Author

Ah, now I understand. With no webhook defined, you go straight to skipped. So the only indication that you are a version behind at that point is the skipped button. I think that makes sense. Maybe make the button red so it jumps out.

@jrhbcn
Copy link

jrhbcn commented May 26, 2022

@JosephKav your proposal looks perfect! I would prefer having the skipped icon (maybe with an "s" instead of "i") always (even with webhooks defined) but it is just a small thing.

Thank you for considering this.

@JosephKav
Copy link
Collaborator

JosephKav commented May 26, 2022

I do like the look of the S as two of the same icon looks a bit random. Coloured it yellow as a warning that an update's been skipped
image
image

Now I'm not too sure about how to handle the update being skipped and webhooks being available

  • no change (tick icon when it's been skipped)
    image
  • yellow the tick icon
    image
  • show the S next to the webhook resend
    image
    I'm slowly coming to prefering this over the yellow tick. What are your thoughts?
    image

@jrhbcn
Copy link

jrhbcn commented May 26, 2022

I buy the "S" icon myself :)

@JosephKav
Copy link
Collaborator

JosephKav commented May 26, 2022

Spent a while discussing possible designs with friends and eventually settled on this. The satellite symbol is what the (i) is currently (signifier of whether it's monitoring a deployed version of the service), and this new (i) is the version skipped one (Skipped 3.2.1). Also changed the resend icon to a rotate-right icon to look like retry/redo. Did have this a while ago but was a bit against it as people might think it's a refresh for the version query, but I'd say it bringing up a modal with options for resending webhooks overcomes that issue
image
Hope you like it!

(Am gonna rename this issue to better highlight what it's turned into + make the upcoming PR cleaner)

@JosephKav JosephKav changed the title Webhook buttons persistent after removal from config.xml feat(ui): skip releases for a deployed_service without webhooks May 26, 2022
@JosephKav JosephKav added enhancement New feature or request and removed bug Something isn't working labels May 26, 2022
@JosephKav JosephKav changed the title feat(ui): skip releases for a deployed_service without webhooks feat(ui): can skip releases for a deployed_service without webhooks May 27, 2022
@JosephKav JosephKav changed the title feat(ui): can skip releases for a deployed_service without webhooks feat: can skip releases for a deployed_service that has no webhooks May 27, 2022
@JosephKav
Copy link
Collaborator

I've merged this feature to master now. Will do a release after adding send/resend for commands to the UI

@jrhbcn
Copy link

jrhbcn commented Jun 2, 2022

Hi @JosephKav

Congrats for the new release! :)

I just installed it, but I still see no way to skip a release. For example "Home Assistant" I still see:

Screenshot 2022-06-02 at 16 54 05
Screenshot 2022-06-02 at 16 54 09

With the "skip/cross" option greyed out :?

JosephKav added a commit that referenced this issue Jun 2, 2022
…h a deployed_version lookup

was updating approved_version every time it found a newer version if there was a deployed_version
lookup. we want this approved_version to track that commands/webhooks have been approved for the
deployed_service so that they aren't approved multiple times and rerun
we only want this approved_version for two cases
- skips (when there is a command and/or webhook and/or deployed_version lookup)
- approvals (when there is a command and/or webhook alongside a deployed_version lookup)
#62 (comment)
@JosephKav
Copy link
Collaborator

JosephKav commented Jun 2, 2022

I just installed it, but I still see no way to skip a release. For example "Home Assistant" I still see:
With the "skip/cross" option greyed out :?

@jrhbcn, sorry about that! I've just fixed this in my latest commit (6972734). Turns out I had it marking every version as approved if there was a deployed_version lookup. We only want this approved_version to track skipping a release and when we've got a deployed_version lookup along with commands/webhooks that should perform the upgrade. So when we approve the release (send the webhooks/commands), it'd mark it as approved to stop you/someone else retriggering the upgrade that should already be in progress.

So I've updated it to fix this. All you should have to do on your end if you want to skip this latest release, would be to remove the approved_version line from your config. Or you can just ignore it and wait for a newer release and skip that one.

0.5.1 is building now

@jrhbcn
Copy link

jrhbcn commented Jun 2, 2022

Thanks yet again, working perfect now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants