Closed Joshua-Anderson closed 8 years ago
I am in favor of Proposal 1 at this time, with the initial pain points of this approach hopefully inspiring tooling improvements to make the experience better.
Feedback from offline discussion:
Requires
syntax in them, and those pointers create a DAGJust to chime in, I'm also in favor of less disruptive, less effort (1), especially since my assumption is that this type of multi-PR situation will become somewhat less common in the future.
If we're going the route of option 1, we might as well not do anything. It's just as complicated to get the CLI to build with a specific SDK version than it is to manually pin to a version in glide.yaml like we already do. Essentially we'd be doing the same thing, except we're engineering this into CI and wasting release cycles. I don't think it's worth the time or effort to go that route if a simple change in glide.yaml is all it takes to effectively do all this work for us.
As for this:
CI automatically points SDK version to the CLI PR (using ‘Requires’ syntax) and runs e2e. If the change requires an e2e PR, the e2e PR can point to the CLI PR and vice versa. Merge SDK PR Update SDK version in CLI PR Merge CLI PR
This already exists, so the pain points are from
Open SDK PR CI builds the CLI with this PR and runs e2e. Open CLI PR
Which is accomplished by modifying glide.yaml.
@bacongobbler The main thing we are working on is get one e2e running on CLI and SDK repos, and also possibly a single e2e build for the corresponding cli/sdk/e2e PR using the requires syntax, making it less painful to have to make the 3 part merges.
That being said, I think standalone controller SDK integration tests could be valuable, because right now as a SDK developer it is really hard to test that your changes actually work against a real cluster.
As for the alternate options: I'm completely against options 2 and 3 for a couple reasons:
1) mocking out the CLI for option 2 essentially throws away our existing (and green) e2e. Not a good idea. 2) e2e for both the cli and the sdk means contributors must now come up with two implementations in the same codebase for the same problem. As if it already isn't difficult enough to get people to contribute e2e tests...
I would propose a 4th option: just write integration tests for the sdk and leave e2e alone. That way SDK devs can test their changes against their own cluster, but we don't necessarily need to validate them against any sort of 2e2 for now. Just more of "helper" tests for devs.
Initial pipeline now created in https://github.com/deis/controller-sdk-go/issues/39; closing.
Current CLI/SDK Feature Workflow:
Problems:
Proposal 1: Test SDK with CLI
In this proposal, the sdk runs e2e by building the CLI with the version of the SDK in the PR.
Workflow:
Problems:
Advantages:
Proposal 2: E2E tests use SDK, CLI uses a mock
In the proposal, the e2e tests use the SDK instead of the cli. The CLI has fairly little logic and can be tested fairly completely against a mock http server (like we currently do for the SDK). This would allow us to check the CLI maintains session, parses command line arguments correctly, and etc.
Workflow:
Problems:
Advantages:
Pretty simple to understand, at least in relation to the rest of deis projects.
Proposal 3: E2E tests for both SDK and CLI
Write e2e tests for the SDK, but keep the CLI tests for normal e2e.
Workflow:
Problems:
Advantages: