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

Downloading and Installing Libraries in the Package Manager #1772

Closed
9 of 13 tasks
radeusgd opened this issue May 29, 2021 · 1 comment
Closed
9 of 13 tasks

Downloading and Installing Libraries in the Package Manager #1772

radeusgd opened this issue May 29, 2021 · 1 comment
Assignees
Labels
-tooling Category: tooling p-high Should be completed in the next sprint

Comments

@radeusgd
Copy link
Member

radeusgd commented May 29, 2021

Summary

We need to implement the logic for downloading a specific library version.

Value

  • Libraries can be downloaded from the repository.

Specification

  • A helper that updates the available editions - download the list of editions and download any missing edition files.
    • A setting file that specifies sources for the editions, initially only our main repo, but custom repos could be added here.
    • In the future we may consider not downloading nightlies by default as only advanced users will use those, so this may be a setting - for now we will download all editions though, but a note should be left about this.
      • I just realised that there is no sense in providing filters - we can just have a separate repository for the nightly editions (just a separate directory on the same webserver will sufice) and so users will be able to select if they want to enable the nightly edition provider or not.
    • Implement a launcher command to update editions.
    • Finish the implementation of the editions/listAvailable endpoint to update editions if asked to.
  • Implement a LibraryProvider that loads libraries from the cache and falls back to downloading if necessary.
  • Parser for library manifest and metadata files.
  • Download the manifest file for the library.
  • Recursively install all dependencies when in preinstall mode.
  • Download the required packages.
  • Create a directory in the library path for the library and extract the packages there.
  • Ensure that there are no conflicts when multiple instances are installing libraries.
    • Possibly include a lock for 'adding a library' and per-library locks.
    • An alternative simpler solution is to allow only one installation at a given time, but that is a bit limitting.
    • Clarify what it will look in the cloud.

Acceptance Criteria & Test Cases

  • The above specification has been completed.
  • The functionality has been unit tested to a reasonable extent.
  • If possible, add an integration test similar to RuntimeStdlibTest that runs the simple server and downloads a library upon runtime's request. Ideally also testing the progress notifications.
@radeusgd radeusgd added Category: Libraries -tooling Category: tooling p-high Should be completed in the next sprint labels Jun 2, 2021
@radeusgd
Copy link
Member Author

radeusgd commented Jun 2, 2021

I'm very much on the fence here with estimation - in a good scenario it should take about 4 days to do it but the locking mechanisms are often problematic so maybe 5 will be safer to account some buffer for unexpected troubles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-tooling Category: tooling p-high Should be completed in the next sprint
Projects
None yet
Development

No branches or pull requests

2 participants