Hi again, in Prefect Cloud, once you have register...
# prefect-community
Hi again, in Prefect Cloud, once you have registered a new block, how does one remove it? So far I can't find anything in the documentation.
Hi David, you should be able to delete the block by selecting the menu button to the right of the block record.
@Bianca Hoch I think you're misunderstanding my question. I registered a new block type in the Cloud, but now I want remove that type. Specificially, I created this Azure Key Vault Credentials block and now I want that removed.
There is nothing in the UI I can see that can remove that type
perhaps there is a command line option to remove it?
does uninstalling the collection remove the block type?
upvote 1
@Kalise Richmond how do I do that? Also this a block that I created, not part of the known collections Prefect provides
a custom block
🤔 2
You can delete a block through a command line by typing the following on the CLI
Copy code
prefect block type delete block-type
gratitude thank you 1
@Khuyen Tran I get a
Block Type 'AzureKeyVaultCredentials' not found!
error. I used this command:
prefect block type delete AzureKeyVaultCredentials
@David Beck I believe you will need to pass the slug, you can see it in
prefect block type ls
@Zanie using the slug yields a cannot delete block type error
Can you share the full output?
Cannot delete Block Type 'azure-key-vault-credentials'!
that is in fact the slug provided by the ls operation
Let me get a blocks expert in the thread 🙂 cc @alex
Let’s get some actual information about the error.. here’s a patch to add a log: https://github.com/PrefectHQ/prefect/compare/block-type-delete-status
Hmmm, that’s very interesting that you’re getting an error when trying to delete a block type. Have you used that block type to create any blocks?
You can install with
pip install git+<https://github.com/PrefectHQ/prefect@block-type-delete-status>
@alex I did create a block but I have since deleted that block
Copy code
Received error from the the API: {'exception_message': 'Internal Server Error'}
Cannot delete block type 'azure-key-vault-credentials'! Status code 500.
that's the error revealed after doing that install
Thanks! I’ll track down that internal error with our Cloud team.
👍 1
Thanks for the ping, @Zanie! I talked to @David Beck offline and we got it squared away, and I’ve got an exciting query plan to read! Win-win!
Thanks all for your help!