You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an artifact is set to DISABLED state it disappears from all API calls aside from the GET /api/artifacts listing. All other API calls return 404 or do not include the artifact in search results, etc.
For me it makes sense that the calls that GET /api/artifacts/{artifactId}, GET /api/artifacts/{artifactId}/versions/{versionId} and GET /api/ids/{globalId} return a 404 code for a disabled artifact, so that clients cannot use the schema. Can I ask why disabled artifact metadata is also not viewable and why disabled artifacts don't appear in search results?
AFAIUI the DISABLED state is basically a pre-deletion state, stopping clients from using the artifact, but allowing the schema to be re-enabled if required. From an administrator point-of-view the resource still exists and can be administered but clients cannot use it.
In the ibmcompat API, it is expected that a DISABLED schema is still viewable via API calls but the serdes client will throw exceptions if the schema is used for serialization/deserialization. I'd like to ensure the ibmcompat API behaviour is correct, but want to check my understanding of the artifacts API before I make changes. Thanks!
The text was updated successfully, but these errors were encountered:
ajborley
changed the title
Artifacts in DISABLED state are not viewable
Artifacts in DISABLED state are not viewable?
Aug 26, 2020
I think you've raised good points here. I think I agree that disabled artifacts should show up in listings and you should be able to fetch the meta-data for disabled artifacts. There is some work to be done in the UI if we make that change, but it does seem reasonable to me. Otherwise when a user disables an artifact in the UI it will disappear from the listing (with then no way to re-enable it) and also if the user refreshes the current browser page they will get a 404 error. Not ideal.
PR #797 updates the APIs to return metadata for artifacts in DISABLED state, but does not make any UI changes. I expect either the UI will need to be updated to be able to handle disabled artifacts, or the API will need to be updated (perhaps via a query param or header) to support returning the artifact content when it is requested from the UI.
I'll deal with the UI changes needed. Right now the UI doesn't have the feature of setting the state. But I need to add that and also handle disabled artifacts in search results and details. I think maybe it's ok for a first draft of the UI changes to simply not show the content for disabled artifacts.
When an artifact is set to DISABLED state it disappears from all API calls aside from the
GET /api/artifacts
listing. All other API calls return 404 or do not include the artifact in search results, etc.For me it makes sense that the calls that
GET /api/artifacts/{artifactId}
,GET /api/artifacts/{artifactId}/versions/{versionId}
andGET /api/ids/{globalId}
return a 404 code for a disabled artifact, so that clients cannot use the schema. Can I ask why disabled artifact metadata is also not viewable and why disabled artifacts don't appear in search results?AFAIUI the DISABLED state is basically a pre-deletion state, stopping clients from using the artifact, but allowing the schema to be re-enabled if required. From an administrator point-of-view the resource still exists and can be administered but clients cannot use it.
In the ibmcompat API, it is expected that a DISABLED schema is still viewable via API calls but the serdes client will throw exceptions if the schema is used for serialization/deserialization. I'd like to ensure the ibmcompat API behaviour is correct, but want to check my understanding of the artifacts API before I make changes. Thanks!
The text was updated successfully, but these errors were encountered: