-
Notifications
You must be signed in to change notification settings - Fork 157
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
Make use of new productversion field if available #7045
Conversation
@@ -6,12 +6,12 @@ export const getWebVersion = (): string => { | |||
} | |||
|
|||
export const getBackendVersion = ({ store }: { store: Store<unknown> }): string => { | |||
const backendVersion = store.getters.user.version |
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.
ok, where did user.version come from in the past?
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.
the capabilities response is extracted into the user
store module as capabilities
and version
keys. see
web/packages/web-runtime/src/store/user.js
Line 261 in 31ba516
SET_CAPABILITIES(state, data) { |
d4b976c
to
ad66de2
Compare
Results for e2e-tests oCIS https://drone.owncloud.com/owncloud/web/25804/12/1 💥 To see the trace, please open the link in the console ...
npx playwright show-trace https://cache.owncloud.com/public/owncloud/web/25804/tracing/unstructured-collection-of-testable-space-interactions-alice-2022-5-23-03-43-40.zip |
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.
LGTM, unclear why the E2E tests for oCIS fail here though. Also, should we combine this PR with an oCIS commit ID version bump to reap the benefits of owncloud/ocis#3805 ?
@kulmann Now you have all the options, see owncloud/ocis#3854 |
const edition = backendVersion.edition | ||
const product = backendStatus.product || 'ownCloud' | ||
const version = backendStatus.productversion || backendStatus.versionstring | ||
const edition = backendStatus.edition | ||
return `${product} ${version} ${edition}` |
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.
Just had a random shower thought on whether we should insert (development)
here if process.env.NODE_ENV === development
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.
To detect whether the bundle-watched dist is being used or the shipped web
in oCIS - I've been adding a lot of console.log's recently to debug caching
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.
oha, nice! good idea :-)
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.
will do that in a followup to unblock the next ocis beta
that raises the question: which one is preferrable? 🙈 |
Kudos, SonarCloud Quality Gate passed! |
Description
oCIS has introduced a new
productversion
field to announce it's correct version while maintaining a fake 10.x.x version in theversionstring
field to keep clients compatible. We're using the new productversion field when it exists and use versionstring as a fallback. Thus the backend product information prints the correct oCIS version now.Since it seems to be encouraged to use
capabilities.core.status
this PR switches over to using that instead of theversion
object. 🤷Related Issue
Types of changes
Checklist: