Skip to content

Conversation

@Tofel
Copy link
Contributor

@Tofel Tofel commented Aug 27, 2025

This pull request introduces improvements to how the Chainlink node's configuration and state are managed in the test framework. The main enhancements include using Docker volumes for persistent storage of the user's home directory and configuration folder, and improving the reliability of config file caching by falling back to an absolute path if writing to the default relative path fails.

Persistent storage for Chainlink node containers:

  • Added Docker volumes for the user's home directory and the config folder in the Chainlink node container, ensuring persistent storage of configuration and state files (clnode.go, constants and container mounts). [1] [2]

Config file caching improvements:

  • Updated the config caching logic to attempt storing the cached config on an absolute path if writing to the default relative path fails, improving robustness in different environments (framework/config.go).

Documentation:

  • Updated the changeset to reflect the use of volumes for persistent storage and the improvement to config caching (framework/.changeset/v0.10.16.md).

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

Why

The changes address enhancements in configuration handling and storage for the CL node component within a framework. Specifically, they introduce volume mounts for better data management and an improvement in how cached configs are stored when relative paths fail.

What

  • framework/.changeset/v0.10.16.md
    • Added a changeset file to document the use of volumes for user's home directory and config folder, and storing cached config on an absolute path if the relative path fails.
  • framework/components/clnode/clnode.go
    • Introduced two new constants ConfigVolumeName and HomeVolumeName to define volume names for configuration and home directories.
    • Added volume mounts in the newNode function to mount the config and user's home directory inside the container. This ensures persistent storage of configuration and state files across container restarts.
    • Modified the Store function to attempt storing cached config on an absolute path if writing to the default relative path fails. This change improves the reliability of config caching by ensuring the config is stored even when the relative path isn't accessible.
  • framework/config.go
    • Modified the Store function to use an absolute path for cached config storage if necessary, enhancing the robustness of the configuration caching mechanism.

@Tofel Tofel marked this pull request as ready for review August 27, 2025 10:50
@Tofel Tofel requested a review from a team as a code owner August 27, 2025 10:50
@Tofel Tofel merged commit 39bdc12 into main Aug 27, 2025
71 of 73 checks passed
@Tofel Tofel deleted the cre-739-clnode-volume-relative-paths-store branch August 27, 2025 11:36
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.

2 participants