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

FR: osc should pass apiurl to source services #234

Closed
aspiers opened this issue Oct 1, 2016 · 6 comments
Closed

FR: osc should pass apiurl to source services #234

aspiers opened this issue Oct 1, 2016 · 6 comments

Comments

@aspiers
Copy link
Member

aspiers commented Oct 1, 2016

Some source services need to retrieve values from ~/.oscrc; for example tar_scm needs to know the user's email so it can include it in the generated changes which are automatically prepended to the changelog. In order to do this lookup correctly, it needs to know the apiurl of the BS instance currently in use, in order to use the right section of ~/.oscrc.

A real world example demonstrating the need for this feature request is described in openSUSE/obs-service-tar_scm#119.

@aspiers
Copy link
Member Author

aspiers commented Oct 1, 2016

I just experienced the oddest thing - I started to look in my own working tree checkout of this repo to see how easy this would be to implement, and found the implementation already in the repo, uncommitted and unstaged! Noone else could have put it there, but I have no recollection of coding it, and can't even remember why I would have done it! There must have been some other use case I was doing it for, which hopefully I'll remember at some point :-)

aspiers added a commit to aspiers/osc that referenced this issue Oct 1, 2016
Some source services need to know the apiurl, e.g. to lookup values
in the ~/.oscrc config file.

Closes openSUSE#234.

openSUSE#234
@marcus-h
Copy link
Member

marcus-h commented Oct 4, 2016

On 2016-10-01 14:51:41 -0700, Adam Spiers wrote:

Some source services need to retrieve values from ~/.oscrc; for example tar_scm needs to know the user's email so it can include it in the generated changes which are automatically prepended to the changelog. In order to do this lookup correctly, it needs to know the apiurl of the BS instance currently in use, in order to use the right section of ~/.oscrc.

Note that not every section has the email option set. If you have
to cope with such situations as well, you might want to have a look
at osc's "vc" command (do_vc in commandline.py) (it just demonstrates
how to retrieve the "email" from api itself).

@aspiers
Copy link
Member Author

aspiers commented Oct 5, 2016

@marcus-h Thanks, that's super helpful!!

@adrianschroeter
Copy link
Member

adrianschroeter commented Oct 20, 2016

JFYI, such an extension needs to be kept in sync with bs_service or it won't work on server side (even though might not want to use it in your source service atm)

I have extended the OBS service daemon to be in sync again for this.

@adrianschroeter
Copy link
Member

IMHO it would be also better to provide user and email directly here via the environment.

@marcus-h
Copy link
Member

On 2016-10-20 04:40:51 -0700, Adrian Schröter wrote:

JFYI, such an extension needs to be kept in sync with bs_service or it won't work on server side (even though might not want to use it in your source service atm)

Hmm from what I understand this is a "localrun" only feature.

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

No branches or pull requests

3 participants