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

Web UI shows app as switching to new version when it's actually the same version #647

Closed
marians opened this issue Dec 14, 2021 · 6 comments · Fixed by giantswarm/happa#3045
Assignees
Labels
kind/bug topic/managed-apps ui/web-ui Concerns our web user interface

Comments

@marians
Copy link
Member

marians commented Dec 14, 2021

Found in c68pn on gollum.

image

The docs-app has .spec.version: v2.2.269 and .status.version: 2.2.269. The only difference is the v prefix.

I'm guessing that we show the "Switching to..." text because the version strings are not an exact match.

@marians
Copy link
Member Author

marians commented Dec 14, 2021

@ljakimczuk @rossf7 I am seeing this for the first time now after the switch to Flux.

I am wondering what is the right way to fix this. The fact that we have the v prefix in one but not the other field looks a bit sketchy to me.

However if it must be that way, we can change the matching in the web UI to work either way, so that the web UI does not display the "Switching to..." string.

@marians marians changed the title web UI shows app as switching to new version when it's actually the same version Web UI shows app as switching to new version when it's actually the same version Dec 14, 2021
@marians
Copy link
Member Author

marians commented Dec 14, 2021

Another problem here is that the version selection drop-down menu does not match the v2.2.269 key with the v prefix.

image

The cause is the same as above.

@marians
Copy link
Member Author

marians commented Dec 14, 2021

One additional note: If a user selects an item from the version selection (e. g. to roll back to a previous version) it will set the .spec.version field to a version number without v prefix.

@ljakimczuk
Copy link

Hey @marians , find my comments below.

I am wondering what is the right way to fix this. The fact that we have the v prefix in one but not the other field looks a bit sketchy to me.

The v prefix is not set in other fields, because this solution seemed the most reasonable and the easiest one to implement. If we propagated it downstream to other fields, then probably we would need to patch more tools and/or CRs, so that all of them support both notations, namely the vX.Y.Z and the X.Y.Z. It seemed more reasonable to just extend the interface a little bit allowing users to set the vX.Y.Z version, but then trimming the v before propagating it downstream. Would it be possible to trim this prefix in Happa before processing the version in any way?

One additional note: If a user selects an item from the version selection (e. g. to roll back to a previous version) it will set the .spec.version field to a version number without v prefix.

This problem concerns more Flux vs Happa topic, than just the v prefix versions. In general, if we have some apps deployed with Flux, and thus managed by GitOps processes, then any changes made through the UI will get reverted. We set the giantswarm.io/managed-by: flux on the apps managed by Flux, so Happa could skip them or display in read-only mode I guess?

@marians
Copy link
Member Author

marians commented Dec 14, 2021

Trimming any v prefix on a version in happa is easy. I just hope that we are not creating a new problem though that.

This problem concerns more Flux vs Happa topic, than just the v prefix versions. In general, if we have some apps deployed with Flux, and thus managed by GitOps processes, then any changes made through the UI will get reverted. We set the giantswarm.io/managed-by: flux on the apps managed by Flux, so Happa could skip them or display in read-only mode I guess?

That's issue #624

@ghost
Copy link

ghost commented Jan 4, 2022

👍 Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug topic/managed-apps ui/web-ui Concerns our web user interface
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants