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

reload only chainlink node dbs when performing restart of CL nodes #1346

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

iljapavlovs
Copy link
Contributor

@iljapavlovs iljapavlovs commented Nov 18, 2024


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

Why

Enhancements and refactoring have been made to improve database container labeling and configuration, facilitate dynamic node and database setups, and enhance the node upgrade process in the testing framework. These changes aim to provide more flexibility, better identification, and easier management of containers during tests.

What

  • framework/components/postgres/postgres.go

    • Added os, strings, time imports for better handling of initialization scripts and time-based operations.
    • Introduced DBContainerLabel to standardize labeling of PostgreSQL containers.
    • Modified Input struct to include Name, allowing dynamic naming of PostgreSQL containers.
    • Refactored container name generation to utilize DBContainerLabel and Name field for clearer identification.
    • Adjusted NewPostgreSQL function to use updated container naming logic, enhancing readability and container management.
  • framework/components/simple_node_set/node_set.go

    • Added slices, strings, sync, and errgroup imports for concurrent operations and string manipulations.
    • Introduced CLNodeDBContainerLabel to standardize labeling of Chainlink node databases.
    • Modified sharedDBSetup function to include Name in DbInput, utilizing CLNodeDBContainerLabel for clearer database container identification.
    • Adjusted node setup logic to provide better configuration management and support concurrent node setup.
  • framework/components/simple_node_set/reload.go

    • Added fmt and time imports for formatting strings and handling time-based operations.
    • Modified UpgradeNodeSet function to use a regex pattern that includes both DBContainerLabel and CLNodeDBContainerLabel, improving the targeting of containers for removal during node upgrades. This enhances the upgrade process by ensuring only relevant containers are targeted.

@cl-sonarqube-production
Copy link

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