-
Notifications
You must be signed in to change notification settings - Fork 554
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
Configure labeler service account in dev-env #2363
Conversation
@@ -73,7 +82,7 @@ export class TestNetwork extends TestNetworkNoAppView { | |||
plcUrl: plc.url, | |||
signingKey: ozoneKey, | |||
serverDid: ozoneDid, | |||
dbPostgresSchema: `ozone_${dbPostgresSchema}`, | |||
dbPostgresSchema: `ozone_${dbPostgresSchema || 'db'}`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unrelated change but this prevents the local db from being named ozone_undefined
|
||
async createServiceDetails(pds: TestPds, ozoneUrl: string) { | ||
const pdsClient = pds.getClient() | ||
const describeRes = await pdsClient.api.com.atproto.server.describeServer() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This mostly mimics the way migration is done in account-migrations.test.ts
…-for-ozone-labeler
…-for-ozone-labeler
…-for-ozone-labeler
…-for-ozone-labeler
…-for-ozone-labeler
…-for-ozone-labeler
This PR re-wires the dev-env setup a little bit to create labeler service account which makes it easier to develop and plug ozone client locally into the dev-env.
The implementation is a bit "hacky" so want to lay out the flow and the reasoning.
The previous implementation created a DID for ozone without actually creating an account on any pds so with that DID, we couldn't create a labeler service record. However, the DID is needed when instantiating the appview and the pds so it's not as straight forward as starting the pds first and creating the labeler account.
So, this PR instantiates a temporary pds, creates an account and uses the DID for instantiating all the services (appview, pds and ozone) then migrates the account from temporary pds to the dev-env pds and shuts down the temporary pds. After migration, the labeler service record is created too.