-
Notifications
You must be signed in to change notification settings - Fork 302
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
As a data seller, I would like to disable consume for certain assets during certain activities like maintenance or downtime #452
Comments
Can we can add isMaintenance attribute under Config class instead of DDO. This value can configure in env vars. We can get the value of isMaintenance by calling getConfig function. This can eliminate publisher to update DDO one by one. |
Under config, it will mean that your entire market is down, and not some assets only. @srikanthkaja31 - can you detail more? |
We should have it at data asset level for owners to show/hide assets based on availability of data endpoints. For marketplace outage, this is something we can deal on the UI side. |
Got it, let's do it in asset level. @alexcos20 , are we going check provider connectivity to disable asset consume when it's not available under this issue? |
That's a nice feature, let's open a issue for that |
honestly, this all sounds like the wrong solution to a self-made devops problem:
That being said, to me it seems the actual problem is that we want to signal to users before they buy that the underlying provider is down. In that case, we should simply ping the configured provider and show a small status under the buy button in case that ping fails. |
Kind of agree on above comments. can't think of any specific scenarios for show/hide assets. Ques - If ping status is -ve, do we only show the status or disable the consume button? |
I think there are valid cases for hiding an asset, like #445 or #209, but what I want to prevent is to have many different "hide states" forcing us to deal with many conditions in our code. For making provider status transparent there would be multiple ways:
To me 2. sounds most effective since not everybody who is on the asset details page wants to buy the asset. |
For hiding of assets use cases, we also have similar requirements. However we had it as a seperate issue as "option for data owners to delete assets which can no longer be consumed". If this is technically same as show/hide (as there is no such thing called delete) then hide feature makes sense. |
When detail page is displayed, we can call https://github.com/oceanprotocol/ocean.js/blob/main/src/provider/Provider.ts#L136 and make sure that asset's files are reachable. |
My understanding was that a publisher may wish to temporarily disable an asset for a short time in future (ie: I will disable my asset for the next 2 days and after 2 days I will switch it back ) |
In summary there are multiple scenarios : Data owner wants to put asset under maintenance for a short period of time either due to planned or unplanned events - hide data asset during this time. Data owner wants to remove asset from listing as it is no longer valid - hide data asset permanently or other option to delete data asset. Platform checks for provider and data endpoint connectivity and ping result is negative - it shows a message or disables consume option or combination of both? @alexcos20 thx for reminding on the temporary hide option. |
@kremalicious have his point that maintenance more on DevOps problem and should go for option 3
Some similar issue already create like #445 or #209
@kremalicious has proposal that to ping as very first step after user hits Buy, in case of erroneous ping status drop out of flow and show an error @srikanthkaja31 , could you please conclude which feature we need implement on this story? |
@TSS-LauKY @krisliew As we discussed : Pt 1 : Hiding of data asset is for data owners to make the asset unavailable for a short time for any process or other specific reason. This is intentional and not related to outage scenarios. Pt 3 : This is more of provider and endpoint failure scenarios in which case the proposal on checking ping status as step 1 and show a message will work. @TSS-LauKY check if we want to create a new issue for this. @alexcos20 @kremalicious For your advise. |
@alexcos20 , this story is for Pt 1, so we will go for approach you propose earlier |
Based on discussion with Ocean team, @alexcos20 to consolidate the below checks in one function for consumption which can be merged. Allow All/Deny All : Data Publishers can explicitly allow or deny certain wallet address for consumption. This is done via "Edit Metadata" option. #513 |
By default all published assets are shown in the catalog.
Let's check for an additional flag in the DDO
-isMaintenance
if exists and it's true, then consume is disabled and we need to show a banner. All other functions are not affected (lp, etc)
Of course, during EditMetadata, publisher can update this field by checking/unchecking a checkbox
The text was updated successfully, but these errors were encountered: