Krystal
01/25/2024, 4:40 PMprefect block register --file register_blocks.py
but the new class is not showing on my UI. Is there anything i am missing?Marvin
01/25/2024, 4:41 PMregister_blocks.py
) has been executed successfully without errors.
2. Verify that the block registration script is correctly formatted and defining the blocks as per Prefect standards.
3. Make sure that the Prefect API is reachable and functional. Issues with network or API connectivity can sometimes prevent updates from being properly reflected in the UI.
4. Check for any logs or error messages that could provide more details on why the block is not being registered or displayed. This might involve looking into the server or API logs if possible.
5. Double-check that your Prefect version is up to date and that there are no known issues with block registration in your Prefect version.
6. If you're using Prefect Cloud, make sure that you're looking at the correct workspace and that there aren't any permission issues preventing the new blocks from being displayed.
If after these checks the issue persists, it's possible that this might be an undocumented bug or an environmental issue specific to your setup. If you suspect a bug, consider reaching out to Prefect Support or filing an issue on Prefect's GitHub repository with detailed reproduction steps.Nate
01/25/2024, 4:50 PMNate
01/25/2024, 4:51 PMprefect config view
Krystal
01/25/2024, 4:51 PMPREFECT_API_URL
Krystal
01/25/2024, 4:51 PMNate
01/25/2024, 4:52 PMPREFECT_API_URL
in your profile is the normal way to tell prefect that commands should be run against a certain workspace / server
what output do you get after the prefect block register
command?Krystal
01/25/2024, 4:52 PMSuccessfully registered 3 blocks
Krystal
01/25/2024, 4:53 PMNate
01/25/2024, 4:53 PMprefect block type ls
and maybe grep for a small part of your new block type slug?Nate
01/25/2024, 4:53 PMKrystal
01/25/2024, 4:55 PMclass TestEnvVarsBlock(Block):
def set_env_vars(self):
for key, value in self.dict().items():
# ignore slimey slugs - internal prefect stuff
if value is not None and key != "block_type_slug":
os.environ[key.upper()] = (
value.get_secret_value()
if isinstance(value, SecretStr)
else str(value)
)
class TestCredentials(TestEnvVarsBlock):
xxx_api_key: SecretStr # Api key for prod
xxx_api_key_dev: SecretStr # Api key for dev
xxx_api_key_preprod: SecretStr # Api key for preprod
github_token: SecretStr
wandb_api_key: SecretStr
Krystal
01/25/2024, 4:56 PMNate
01/25/2024, 5:00 PMNate
01/25/2024, 5:00 PMNate
01/25/2024, 5:00 PMKrystal
01/25/2024, 5:00 PMKrystal
01/25/2024, 5:01 PMNate
01/25/2024, 5:01 PMKrystal
01/25/2024, 5:01 PMKrystal
01/25/2024, 5:01 PMNate
01/25/2024, 5:02 PMKrystal
01/25/2024, 5:02 PMNate
01/25/2024, 5:02 PMNate
01/25/2024, 5:02 PMKrystal
01/25/2024, 5:02 PMNate
01/25/2024, 5:03 PMNate
01/25/2024, 5:04 PMNate
01/25/2024, 5:04 PMBaseModel
)Krystal
01/25/2024, 5:05 PMKrystal
01/25/2024, 5:05 PMNate
01/25/2024, 5:05 PMNate
01/25/2024, 5:05 PMKrystal
01/25/2024, 5:05 PMNate
01/25/2024, 5:05 PM