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

Support additional repository types #169

Draft
wants to merge 6 commits into
base: 0.4.x
Choose a base branch
from

Conversation

NoDiskInDriveA
Copy link
Contributor

Adds support for

  • a local sync repository that can access harness layers from local directories
  • a github repository that can access harness layers on github specifically

Also configures repositories via service config and fixes some pointless tests.

Still dirty and experimental, I feel package/layer management deserves a bit of refactoring to support multiple repo types.

@NoDiskInDriveA NoDiskInDriveA marked this pull request as draft March 14, 2024 02:50
@NoDiskInDriveA
Copy link
Contributor Author

Thinking of it, the "repository" abstraction only makes sense for the original package management pulling from the JSON list...

@andytson-inviqa
Copy link
Contributor

andytson-inviqa commented Mar 14, 2024

a github repository that can access harness layers on github specifically

thanks, I wanted this. It seems cumbersome to manually manage the harnesses.json we publish, and make it easier to reference custom github harness layers.

One thing that's stopped me from doing this so far was deciding how to handle the path detection, whether to have a rickety regex or use url schemes, like github://inviqa/harness-docker:0.4.0. Uri schemes can be matched with url parsing and using the scheme

Also I was thinking about targeting specific release artifacts like github://inviqa/harness-base-php:0.2.0:harness-magento2.tgz but maybe a https url is fine for that

@andytson-inviqa
Copy link
Contributor

andytson-inviqa commented Mar 14, 2024

github:inviqa/harness-docker:0.4.0 is also a valid Uri format, with no "host"

@NoDiskInDriveA
Copy link
Contributor Author

@andytson-inviqa As of now, this is a bit of a POC, I opened the PR just to give some visibility on what I'm experimenting with. I decided to implement the easiest case, but it could be built on. We're technically already doing some rickety detection on package names 😬 but I agree, also it's currently quite heterogenuous. We could decide on a format - maybe requiring a scheme and fall back to packages when none is detected - and implement that through all sources. Extend the package type to actually hold some structured information, maybe introduce a short-/longform harnesslayers struct similar to how command works if we don't want to parse URIs. There's lots of options 😄

@NoDiskInDriveA
Copy link
Contributor Author

But if you're interested, I can continue this on the weekend, maybe do some refactoring to support this better.

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.

2 participants