-
Notifications
You must be signed in to change notification settings - Fork 36
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 UI issues #1791
fix UI issues #1791
Conversation
Signed-off-by: Phani Sajja <[email protected]>
This should also be addressed: #1728 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any suggestions for how to repro the errors on a new builder setup? I setup a new builder and added some linux packages and promoted to stable. I consistently get the correct promotion timestamps. I can see a bunch of 404s for the different platforms so I know there are errors occurring but I can't reproduce the "few seconds ago" issue in order to validate this fix.
@@ -60,7 +60,8 @@ export class PackageDetailComponent { | |||
} | |||
|
|||
titleFrom(platform) { | |||
return targetFrom('id', platform).title; | |||
const targtet = targetFrom('id', platform); | |||
return targtet ? targtet.title : ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
targtet
-> target
Oh I am able to repro if I promote to custom channels (not stable). |
I built your changes to builder-api-proxy and installed/reloaded them in my builder and I am still getting the "a few seconds ago" timestamps. |
Is the issue visible to you following the steps outlined in the description? |
It seems to be a little different. When I initially land on a details page, the timestamps are correct, if I go back to the versions and then go to a different version they are still correct. However, if I refresh the page, the timestamps reflect "a few seconds ago". I see this on production builder too. |
Signed-off-by: Phani Sajja <[email protected]>
Signed-off-by: Phani Sajja <[email protected]>
Signed-off-by: Phani Sajja <[email protected]>
Signed-off-by: Phani Sajja <[email protected]>
This pull request (PR) also resolves another issue: when there are no Linux packages, the UI fails to display the latest package for other platforms. For instance, if only Windows packages exist for a specific origin/name, the latest page erroneously states, 'There are no available Habitat artifacts (.hart files) for this origin/package.' |
There still seems to be something wonky with the non-stable/unstable promotion timestamps. Initially landing on the details page everything is fine, but if I refresh the page, the custom channels reflect "a few seconds ago." |
Signed-off-by: Phani Sajja <[email protected]>
Even with the last commit, I'm still seeing the "a few seconds ago" timestamp on custom channels if I either refresh th details page or navigate directly to a details URL. I have done some digging and I think I might see why. It looks like I'm guessing this somehow has its root in the constructor of I'm still not sure how to cleanly fix this until I maybe better understand rxjs. |
Signed-off-by: Phani Sajja <[email protected]>
ok this has been working. I've been digging into to some other weirdness but I am sure it is related to nginx caching where after promoting to a channel, the details page does not include the new channel but the versions page does. It looks like nginx is caching the builder-api get-package response. At any rate I think that is unrelated to this PR. approving. There were a lot of changes made in this PR that did not seem to result in behavioral changes, I'm just not familiar enough with this codebase to authoritatively scrutinize that so if you think anything should be reverted please go ahead, but it looks like things are behaving. |
Obvious fix; these changes are the result of automation not creative thinking.
There are a few primary UI issues observed, including UI navigation issues and problems with updating the promotion timestamp.
You can easily observe these issues by navigating to an origin page (e.g.,
https://bldr.habitat.sh/#/pkgs/core
) and selecting a package. From there, go to the versions tab. In the versions tab, expand the versions and choose one to access the details page. Then, return to the versions page by clicking on the version number at the top of the screen and select a different version. This can be repeated multiple times. You may notice that the package promotion details show 'a few seconds ago,' or it may even redirect you to the home page (https://bldr.habitat.sh/#/pkgs/core
).The primary reason for this is the way we handle errors and also the delays in the request to obtain some details and the response received.
A better approach to handling errors is to render error pages or components when encountering such scenarios. Since this requires some UX work, we can address this later.