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

Ensure default AppProvider is top of list and keep mime type order from config #2138

Merged
merged 5 commits into from
Oct 8, 2021

Conversation

gmgigi96
Copy link
Member

@gmgigi96 gmgigi96 commented Oct 6, 2021

Now for each mime type, when asking for the list of mime types, the default AppProvider, set both using the config and the SetDefaultProviderForMimeType method, is always in the top of the list of AppProviders.
The config for the Providers and Mime Types for the AppRegistry changed, using a list instead of a map. In fact the list of mime types returned by ListSupportedMimeTypes is now ordered according the config.

@update-docs
Copy link

update-docs bot commented Oct 6, 2021

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

…pe list.

Providers are ordered according to the config.
Changed config from using a map to a list, for keeping the order.
@gmgigi96 gmgigi96 changed the title Keep mime type ordering from the config and refactoring of static AppRegistry Default AppProvider and kept providers order from config Oct 7, 2021
@gmgigi96 gmgigi96 changed the title Default AppProvider and kept providers order from config Default AppProvider and kept mime type order from config Oct 7, 2021
@gmgigi96 gmgigi96 changed the title Default AppProvider and kept mime type order from config Default AppProvider and keep mime type order from config Oct 7, 2021
@gmgigi96 gmgigi96 marked this pull request as ready for review October 7, 2021 15:54
@gmgigi96 gmgigi96 requested a review from labkode as a code owner October 7, 2021 15:54
@gmgigi96
Copy link
Member Author

gmgigi96 commented Oct 7, 2021

@ishank @glpatcern

@glpatcern glpatcern self-requested a review October 7, 2021 18:27
Copy link
Member

@glpatcern glpatcern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok to me, @ishank011 what do you think?

@glpatcern glpatcern changed the title Default AppProvider and keep mime type order from config Ensure default AppProvider is top of list and keep mime type order from config Oct 8, 2021
@glpatcern glpatcern merged commit a70d374 into cs3org:master Oct 8, 2021
glpatcern added a commit to glpatcern/reva that referenced this pull request Oct 11, 2021
glpatcern added a commit to glpatcern/reva that referenced this pull request Oct 11, 2021
list of AppProviders.
The config for the Providers and Mime Types for the AppRegistry changed,
using a list instead of a map. In fact the list of mime types returned by
ListSupportedMimeTypes is now ordered according the config.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When looking at a single entry in the list app providers response the provider infos do not let clients find out if they are dealing with the default provider or not. When listing them in the UI the list might be stored in a map, losing the order again.

We should expose the 'default' provider with a dedicated property in https://cs3org.github.io/cs3apis/#cs3.app.registry.v1beta1.ProviderInfo

A priority property might be more flexible.

Anyway, for humans, relying on the order of a list is good enough when dealing with checklists on paper, but for machines it is not.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is true, but the order is important as well from a UI perspective - to make sure the interface is stable and does not get reshuffled.

Now given the "rush" to get the first deployment really out, I suggested to go ahead with just the reordering, to avoid another round of CS3APIs (likely breaking) change. But I agree we could make this fully explicit as a property.

glpatcern added a commit to glpatcern/reva that referenced this pull request Oct 11, 2021
glpatcern added a commit to glpatcern/reva that referenced this pull request Oct 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants