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

Acceptance tests should attempt to download pack & lifecycle pre-requisites when not specified by environment variable #524

Closed
simonjjones opened this issue Mar 4, 2020 · 1 comment · Fixed by #550
Assignees
Labels
type/chore Issue that requests non-user facing changes.

Comments

@simonjjones
Copy link
Member

Description

When running make acceptance-all, there are a variety of pre-requisites that are expected to be present on my local system, with their locations specified by environment variable. This presents a challenging environment for contributors hoping to validate that changes continue to be compatible with previous versions of pack and lifecycle, as well as builders created with a previous version of pack. The current feedback loop requires either understanding this complex set of requirements, or creating a PR in order to trigger these tests in a GitHub Action

Proposed solution

It is possible to replicate the logic used defined in our GitHub Action workflow to identify which versions of each pre-requisite should be used, and then download these to a local system before continuing with our acceptance suite.

This proposal is to add functionality to our acceptance test suite that will download and consume any pre-requisites that have not been specified from the GitHub locations currently used in our workflows. These downloads should be communicated to the contributor very clearly, with instructions as to how to more explicitly configure them if preferred. The assets should be downloaded to a temporary folder and cleaned up after each run.

If the pre-requisites are locally specified by environment variable, there should be no change to the existing flow.

Describe alternatives you've considered

  • Improved documentation for running combinatorial acceptance tests locally in the Contributing document
  • Earlier, more explicit failure in acceptance tests, with a clear explanation of which configuration properties and guidelines as to how to manually download the required assets.

Additional context

  • Our current workflow for identifying the latest lifecycle asset involves consuming the GitHub Actions Workflows API which appears to require an authenticated user session. This may mean we require a GitHub authentication token as part of our test configuration. It's not clear whether this is strictly a better solution than the existing setup of having contributors manually configure this, so we may be better off falling back on improved documentation & failure messaging. Getting the latest lifecycle is an existing pre-requisite for running make acceptance so contributors should be somewhat familiar with the process.
@simonjjones simonjjones added type/enhancement Issue that requests a new feature or improvement. status/triage Issue or PR that requires contributor attention. labels Mar 4, 2020
@jromero jromero added type/chore Issue that requests non-user facing changes. status/ready Issue ready to be worked on. and removed type/enhancement Issue that requests a new feature or improvement. status/triage Issue or PR that requires contributor attention. labels Mar 4, 2020
@natalieparellano natalieparellano self-assigned this Mar 23, 2020
@jromero
Copy link
Member

jromero commented Mar 27, 2020

@natalieparellano based on our discussion:

Issues with current GH actions workflow for compatibility testing:

  • Since we are testing against master branch of lifecycle, changes can cause unrelated failures to Pull Requests
    • Contributors should not have to debug something that has nothing to do with their PR
  • Downloading artifacts requires some form of authentication. This adds UX complexity for automating the downloading of assets if we were to continue using the artifacts from lifecycle.
  • We see the need to continue testing master pack against lifecycle master but these should not prevent a Pull Request from being merged

Reasons why we shouldn’t use previous pack’s DefaultLifecycleVersion:

  • Short-lived previous versions (such as releases with major bugs) have longer term impact on our compatibility tests.
    • Alternatives:
      • SemVer
      • Use spec API version
    • Resolution: Ultimately we see the value of using the spec API versions but we don’t have an easy way of retrieving this information at this time so we will try to use SemVer.

Outcome:

  • current lifecycle: latest released version of the lifecycle
  • previous lifecycle: latest previously released minor version of the lifecycle (using SemVer)
  • current pack: current build
  • previous pack: latest released version of pack

@natalieparellano natalieparellano added status/in-progress Issue or PR that is currently in progress. and removed status/ready Issue ready to be worked on. labels Apr 3, 2020
@jromero jromero closed this as completed Apr 17, 2020
@jromero jromero removed the status/in-progress Issue or PR that is currently in progress. label Apr 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/chore Issue that requests non-user facing changes.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants