openSUSE / open-build-service

Build and distribute Linux packages from sources in an automatic, consistent and reproducible way #obs
https://openbuildservice.org
GNU General Public License v2.0
934 stars 438 forks source link

_service file not editable via webinterface #4938

Open dsamx opened 6 years ago

dsamx commented 6 years ago

Issue/Feature Description

Assume a _service file points to a git repository. If the revision parameter is added but points to a non-existing tag/branch or whatever, the _service file cannot be seen or edited via the webinterface anymore. The interface shows the error message

'Files could not be expanded: service error: Command failed(128): "fatal: Couldn't find remote ref 1.7.3" '

where 1.7.3 is the revision argument from the _service file and under Source Files the following message can be seen:

Sources could not be expanded: service error: Command failed(128): "fatal: Couldn't find remote ref 1.7.3\n"

Expected Result

The _services file should be viewable under Source Files and still be editable.

How to Reproduce

create a _service file for a git repository and add a revision parameter pointing to a non-existing tag/branch or whatever, e.g.

`

git git://myserver/mypackage.git mypackage 1.7.3 *.tar */*.spec *git*.tar xz

`

Further Information

  • A link to an OBS instance showing the issue not available, private OBS instance; should be reproducible though.

  • Exact server version (in case a private instance is used) version 2.9.2-43.2

bgeuken commented 6 years ago

@dsamx When you click on the '_service' file is there by any chance a message like: "Currently displaying revision bbd2fd836576159872553bad062bb394, show latest"? If so, clicking on the show latest link will guide you to the editable file view.

If not please verify that your logged in user is allowed to edit this file. He should be listed in the user tab (http://diogenes.suse.de/package/users/$your_project/$your_package).

dsamx commented 6 years ago

After I added the file to the package, I edited it via webinterface and after saving the file, it was replaced by the error message. The file is there when I use osc but the webinterface provides no link in any form to the file anymore.

bgeuken commented 6 years ago

And 1.7.3 is a branch and not a tag, right?

Would you mind adding a screenshot to the issue?

dsamx commented 6 years ago

My intent was to try a tag but "1.7.3" did not exist as tag nor as branch because "1.7.3" was actually a typo. After saving this change I had to fix the file from command line due to the described behaviour. My expectation would be that the webinterface shows me an error message but still shows the file to allow editing.

I can add a screenshot later, I am currently moving the OBS server to another place.

bgeuken commented 6 years ago

I see. The interface is a bit weird :disappointed:. What you have seen is the "expanded" sources. They are empty, because the running the service failed.

To get back to the unexpanded source view, you would have to click on the "(show unmerged sources)" link. And there you would be able to edit the service file.

So it's possible, but we should definitely make this more obvious.