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

tmpnet: Separate network into orchestration and configuration #2464

Merged
merged 3 commits into from
Jan 5, 2024

Conversation

marun
Copy link

@marun marun commented Dec 11, 2023

Previously tmpnet/network.go contained methods to orchestrate networks and read and write their configuration. This PR moves reading/writing of configuration to network_config.go. The separation is intended to improve maintainability.

@marun marun self-assigned this Dec 11, 2023
@marun marun force-pushed the tmpnet-refactor-network branch from 7c2ca56 to c36886d Compare December 11, 2023 04:13
@marun marun force-pushed the tmpnet-refactor-network branch 4 times, most recently from 77139c8 to 227ed81 Compare December 11, 2023 04:59
@marun marun force-pushed the tmpnet-refactor-network branch 2 times, most recently from e46d2e2 to f1cf61c Compare December 11, 2023 05:10
@marun marun changed the title tmpnet: Separate network into orchestration and configuration tmpnet: Separate network into orchestration and configuration Dec 11, 2023
@marun marun added the testing This primarily focuses on testing label Dec 11, 2023
@marun marun force-pushed the tmpnet-refactor-network branch 5 times, most recently from 1fa086e to 75f3b99 Compare December 15, 2023 02:51
@marun marun force-pushed the tmpnet-refactor-network branch from 75f3b99 to 0a5764e Compare December 15, 2023 04:16
@marun marun force-pushed the tmpnet-refactor-network branch 2 times, most recently from e09de33 to c40f346 Compare December 15, 2023 05:57
@marun marun marked this pull request as ready for review December 15, 2023 06:10
@marun marun requested review from abi87 and gyuho as code owners December 15, 2023 06:10
@marun marun force-pushed the tmpnet-refactor-network branch from c40f346 to 5925f98 Compare December 15, 2023 18:19
@marun marun linked an issue Dec 18, 2023 that may be closed by this pull request
6 tasks
@marun marun force-pushed the tmpnet-refactor-network branch from b86451d to 99eecff Compare December 18, 2023 05:14
Base automatically changed from tmpnet-refactor to dev December 19, 2023 22:14
@marun marun force-pushed the tmpnet-refactor-network branch 3 times, most recently from 80f6c63 to f1ec505 Compare December 19, 2023 22:43
@marun marun force-pushed the tmpnet-refactor-network branch from f1ec505 to 6939831 Compare December 21, 2023 10:28
@@ -24,222 +23,152 @@ import (
"github.com/ava-labs/avalanchego/utils/set"
)

// The Network type is defined in this file (network.go - orchestration) and
// network.go (reading/writing configuration).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this a typo? Or is there another network.go file I'm missing that this is in reference to?

Copy link
Author

@marun marun Jan 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, a typo. Fixed.

// that an error condition will not result in a lingering process.
stopErr := node.Stop(ctx)
if stopErr != nil {
err = errors.Join(err, stopErr)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need this stopErr != nil check. The spec says: "Join returns an error that wraps the given errors. Any nil error values are discarded."

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@marun marun force-pushed the tmpnet-refactor-network branch from 6939831 to 122a88a Compare January 3, 2024 19:39
@marun marun force-pushed the tmpnet-refactor-network branch from 122a88a to 1fda407 Compare January 4, 2024 20:19
@aaronbuchwald aaronbuchwald added this pull request to the merge queue Jan 5, 2024
Merged via the queue into dev with commit 4d6d255 Jan 5, 2024
17 checks passed
@aaronbuchwald aaronbuchwald deleted the tmpnet-refactor-network branch January 5, 2024 21:06
tedim52 pushed a commit to tedim52/avalanchego that referenced this pull request Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing This primarily focuses on testing
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Add subnet support to the tmpnet fixture
4 participants