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

Separate JD database #1472

Merged
merged 6 commits into from
Dec 11, 2024
Merged

Separate JD database #1472

merged 6 commits into from
Dec 11, 2024

Conversation

skudasov
Copy link
Collaborator

@skudasov skudasov commented Dec 11, 2024


Below is a summarization created by an LLM (gpt-4-0125-preview). Be mindful of hallucinations and verify accuracy.

Why

The changes enhance the JobDistributor (JD) component and its integration with the PostgreSQL database, improving the testing framework by allowing more dynamic configuration and interaction. Specifically, separating the JD database setup into its configuration allows for more flexibility and better encapsulation of database specifics. Additionally, ensuring transactions are mined before proceeding enhances reliability during testing on testnets by confirming state changes are complete.

What

  • framework/.changeset/v0.3.7.md
    • Added a changeset file for version 0.3.7 including separate JobDistributor database setup and modification to wait for fund transactions to be mined on testnets.
  • framework/components/jd/jd.go
    • Imported the postgres component for database interactions.
    • Removed DBURL from Input struct and added DBInput for direct postgres configuration.
    • Added a default postgres database configuration specific to JD (defaultJDDB function).
    • Integrated the new postgres setup in NewJD function, using DBInput for database configuration.
  • framework/components/jd/jd_test.go
    • Removed direct PostgreSQL setup, relying on jd.NewJD to handle its database integration.
  • framework/components/postgres/postgres.go
    • Added Name and JDDatabase fields in Input struct for customizable container names and enabling a specific database setup for JD.
    • Adjusted container naming and database setup logic to accommodate the new fields.
    • Modified the database URL construction to conditionally include JD database URLs based on the new input.
  • framework/components/simple_node_set/fund.go
    • Added a call to bind.WaitMined to wait for the transaction to be mined, improving reliability in testing environments.
  • framework/examples/myproject_cll/jd_test.go
    • Removed setting DBURL directly in test setup, relying on the updated JD component configuration.

@skudasov skudasov marked this pull request as ready for review December 11, 2024 22:48
@skudasov skudasov requested review from sebawo and a team as code owners December 11, 2024 22:48
@skudasov skudasov merged commit 11410d9 into main Dec 11, 2024
44 checks passed
@skudasov skudasov deleted the fund-testnet branch December 11, 2024 22:50
@cl-sonarqube-production
Copy link

Tofel pushed a commit that referenced this pull request Dec 16, 2024
* wait for funding on testnet

* wait for funding on testnet

* separate JD database

* name JD database differently

* changeset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant