Skip to content

Allow installing older versions of the package#247

Merged
ycombinator merged 2 commits intoelastic:masterfrom
ycombinator:fleet-install-package-ignore-ver
Feb 9, 2021
Merged

Allow installing older versions of the package#247
ycombinator merged 2 commits intoelastic:masterfrom
ycombinator:fleet-install-package-ignore-ver

Conversation

@ycombinator
Copy link
Copy Markdown
Contributor

@ycombinator ycombinator commented Feb 8, 2021

What does this PR do

This PR allows the system test runner to install the version of the package under test, even if that version may be older than the latest version of the same package available in the package registry.

Why is this PR important

Package developers may want to create new patch versions from older minor versions of a package, even though a newer minor version of the same package might already have been released. For example, system-0.9.2 and system-0.10.5 may already have been released. A package developer might want to create+test+release a system-0.9.3 package next that builds upon the system-0.9.2 package but does not or cannot include all the changes from the system-0.10.5 package.

Related issues

@elasticmachine
Copy link
Copy Markdown
Collaborator

elasticmachine commented Feb 8, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #247 updated

  • Start Time: 2021-02-08T21:41:14.470+0000

  • Duration: 22 min 30 sec

  • Commit: b8f0418

Test stats 🧪

Test Results
Failed 0
Passed 292
Skipped 1
Total 293

Trends 🧪

Image of Build Times

Image of Tests

@ycombinator ycombinator force-pushed the fleet-install-package-ignore-ver branch 2 times, most recently from 2e866fe to bcce742 Compare February 8, 2021 21:29
@ycombinator ycombinator force-pushed the fleet-install-package-ignore-ver branch from bcce742 to 435570b Compare February 8, 2021 21:30
@ycombinator
Copy link
Copy Markdown
Contributor Author

ycombinator commented Feb 8, 2021

To test the changes in this PR:

  • First, I will push a commit that deliberately bumps down a test package's version to something that's known to be lower than versions already released in the package registry. This commit should fail CI with an error saying that the older version of the test package cannot be installed: 435570b.
  • Then I will push a commit with the code change that will allow installing older versions of test packages. This commit should make CI pass again: b8f0418.

@ycombinator
Copy link
Copy Markdown
Contributor Author

As expected (see previous comment), the first commit has failed CI with the expected error:

[2021-02-08T21:36:56.117Z] Error: error running package asset tests: could not complete test run: could not install package: could not install package; API status code = 400; response body = {"statusCode":400,"error":"Bad Request","message":"apache-0.0.1 is out-of-date and cannot be installed or updated"}

Copy link
Copy Markdown
Contributor

@mtojek mtojek left a comment

Choose a reason for hiding this comment

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

Ship it!

@ycombinator ycombinator merged commit f951769 into elastic:master Feb 9, 2021
@ycombinator ycombinator deleted the fleet-install-package-ignore-ver branch February 9, 2021 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.

3 participants