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

Adds Orion database URL to block auto-registration memoization key #7350

Merged
merged 2 commits into from
Oct 27, 2022

Conversation

desertaxle
Copy link
Member

@desertaxle desertaxle commented Oct 27, 2022

Adds PREFECT_ORION_DATABASE_CONNECTION_URL to block auto-registration memoization key to ensure that block auto-registration happens each time the backing database is changed.

Closes #7347

Example

# From fresh install, start Orion server
prefect orion start

# View blocks in UI 👀 

# Stop Orion server and start Postgres instance
docker run -d --name orion_postgres -v oriondb:/var/lib/postgresql/data -p 5432:5432 -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=yourTopSecretPassword -e POSTGRES_DB=orion postgres:latest

# Set Orion DB URL
export PREFECT_ORION_DATABASE_CONNECTION_URL="postgresql+asyncpg://postgres:yourTopSecretPassword@localhost:5432/orion"

# Start Orion server
prefect orion start

# Confirm blocks in UI 👀 

Checklist

  • This pull request references any related issue by including "closes <link to issue>"
    • If no issue exists and your change is not a small fix, please create an issue first.
  • This pull request includes tests or only affects documentation.
  • This pull request includes a label categorizing the change e.g. fix, feature, enhancement

@netlify
Copy link

netlify bot commented Oct 27, 2022

Deploy Preview for prefect-orion ready!

Name Link
🔨 Latest commit 0c69705
🔍 Latest deploy log https://app.netlify.com/sites/prefect-orion/deploys/635aa48f1344c90008cccfcf
😎 Deploy Preview https://deploy-preview-7350--prefect-orion.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@desertaxle desertaxle added the fix A fix for a bug in an existing feature label Oct 27, 2022
@zanieb zanieb merged commit 83f6ceb into main Oct 27, 2022
@zanieb zanieb deleted the break-memo-store-on-db-change branch October 27, 2022 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix A fix for a bug in an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Block auto-registration is skipped when switching databases
2 participants