-
Notifications
You must be signed in to change notification settings - Fork 23
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
feat: git Access, AccessMethod through BlobAccess #869
base: main
Are you sure you want to change the base?
feat: git Access, AccessMethod through BlobAccess #869
Conversation
2e1d797
to
e0b7e97
Compare
Hello. So this work happens to be implementing this issue open-component-model/ocm-project#239. I'll assign it to you then. |
35d58d8
to
85476f7
Compare
ba042be
to
8668c5f
Compare
Hi @jakobmoellerdev, concerning your idea of git backed CTF repositories, if I understand your approach correctly, |
Hi @mandelsoft, thanks for taking a look. I think the semantical equivalent to a git push would be to close the repository. In your description that would be
Of course we can change the flow to
If you are concerned with that. In my view they are equivalent and the atomic commits are much more transparent when a change was made. However Im totally fine with your take as well, it shouldnt be too hard to change. I think we could change it so that there is one commit that has all the current commit messages in the commit body. Then we will have 1 commit. WDYT? |
46d6388
to
23271da
Compare
this is ready for a first pass review. We might change the way the commits are generated (see discussion above) but generally i would still like some input as its my first take on a larger change in this codebase |
23271da
to
a047cc1
Compare
593ea06
to
024b5e6
Compare
func newMethod(componentVersionAccess internal.ComponentVersionAccess, accessSpec *AccessSpec) (accspeccpi.AccessMethodImpl, error) { | ||
u, err := giturls.Parse(accessSpec.RepoURL) | ||
if err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, that you implemented a general git access, also,
But unfortunately this should include more extensions to be implemented consistently:
- blob accesses
- access method
- input types (for the CLI based composition environment)
- the convenience functions in the
elements
package. (I personally would prefer to get rid of them)
For the other accesses, we have implemented the blob access and then based the others on this common implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I implemented the blob access and the access method based on that blob access now. For the input types and the elements, thats still missing, still need a pointer
} | ||
|
||
func (m *accessMethod) MimeType() string { | ||
return mime.MIME_OCTET |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comment for downloader.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was changed to incorporate tar.gz archives instead. I still need to incorporate the path filtering
412b5f1
to
0d63147
Compare
ff747af
to
7cf4647
Compare
7cf4647
to
edb32ec
Compare
5168c9f
to
164aaf0
Compare
164aaf0
to
deeec78
Compare
bf6ad2d
to
dd310b1
Compare
Just a quick update on this PR: I didnt get around to it yet, but I will probably remove the repo code because its unlikely to be used (as it all started for me to get into the OCM codebase). The AccessMethod etc can stay in and are still valid though. |
# Conflicts: # docs/reference/ocm_add_resource-configuration.md # docs/reference/ocm_add_resources.md # docs/reference/ocm_add_source-configuration.md # docs/reference/ocm_add_sources.md # docs/reference/ocm_ocm-accessmethods.md # go.mod # go.sum
4e6daaf
to
ee0a161
Compare
ee0a161
to
8acba6c
Compare
What this PR does / why we need it:
This is an extremely early (WIP) draft of implementing ctf archives in directory format tracked via git repositories, ultimately serving me as a playground to get familiar with OCM and also to play around with its feature set. So we do not need to merge this if there is no interest or disagreement on the implementation.
Not only does this allow using git repositories for storing blobs, it also attempts to add git downloader functionality for a generic git access method based on in memory cloning and I plan to add a OCM implementation on it as well.
Currently the implementation is written so that any modification to the CTF in the work directory also triggers a dedicated commit, and any lookup triggers a refres/pull cycle on git.
For testing I use
file://
URLs which makes it quite easy to verify E2E in the test suites.TODO:
Which issue(s) this PR fixes:
As this is my own "experimentation" issue, it doesnt necessarily fix anything, it might as well be moved to a plugin for example or be scrapped alltogether