-
Notifications
You must be signed in to change notification settings - Fork 19
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
Handle server side generated archives with prefix _service:*
via archive argument without the prefix
#41
Comments
Thanks for documenting the issue. Yes, I'd like to ensure support for this is working. There related match groups in the def basename_from_archive_name(archive_name):
basename = re.sub(
r"^(?P<service_prefix>_service:[^:]+:)?(?P<basename>.*)\.(?P<extension>obscpio|tar\.[^\.]+)$",
r"\g<basename>",
archive_name,
)
if basename:
log.info(f"Detected basename {basename} form archive name")
return basename I'll investigate improvements here to allow regex matching without writing out the prefix in the archive parameter. |
Should the implementation raise an error on Doing so including documentation of course would guide toward normalized usage that works on local and server side modes. Is the number of |
In case those questions are for me, my opinion is:
Yes.
That's a good question and I don't know. |
Based on OBS Docs > Using Source Services > Modes of Services there are no additional configurations that encode extra information e.g. timestamp or version info in the server side generated filenames. We'll plan to implement the following:
Packages in OBS that use |
go_modules
to identify if the archive has the prefix _service:*
for when it's generated inside OBS_service:*
via archive argument without the prefix
TL;DR: Artifacts generated inside OBS have a
_service:
prefix which is currently not automatically identified/expanded in thearchive
parameter.When we use the
tar_scm
andrecompress
services, for example, to download a Git repo before the build phase in OBS, it will create an artifact of the repo named as_service:recompress:tar_scm:file.tar.gz
.For the
go_modules
service to properly identify the repo archive that will be vendored, the archive file name must match the_service
prefix like:Specifying the full name works, but looks unpleasant and the same
_service
file can't be used locally and in OBS without modifications, because locally the file will be generated and named asfile.tar.gz
.It would be nice if we could write the
_service
file as exemplified below and thengo_modules
services tries to match possible file names asfile.tar.gz
or_service:*:file.tar.gz
by doing a simple and controlled regex, for example.The text was updated successfully, but these errors were encountered: