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

Artifacts in DISABLED state are not viewable? #788

Closed
ajborley opened this issue Aug 26, 2020 · 3 comments
Closed

Artifacts in DISABLED state are not viewable? #788

ajborley opened this issue Aug 26, 2020 · 3 comments
Assignees

Comments

@ajborley
Copy link
Contributor

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!

@ajborley ajborley changed the title Artifacts in DISABLED state are not viewable Artifacts in DISABLED state are not viewable? Aug 26, 2020
@EricWittmann
Copy link
Member

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.

Thoughts @Apicurio/developers ?

@ajborley
Copy link
Contributor Author

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.

@EricWittmann
Copy link
Member

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.

@EricWittmann EricWittmann self-assigned this Sep 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants