#9 Finally, we can start creating composes.
Merged by mohanboddu. Opened by mohanboddu.
releng/ mohanboddu/fmc odcs  into  master

Download 9.patch
no initial comment

1 new commit added

  • Adding the ability to run compose on only certain builds

Let's get this from the config file so that we can maybe use ansible variables for it.

maybe odcs_token would be a better name. What do you think ?

Should this be in the config file too ? to make it easier to change ?

the file handler needs to be closed at then end of this method. Or you can use a context manager with open('...') as f: f.write(...) .

The return value does not seems to be used, so maybe it is not needed :)

I would move this in the __init__ method of the consumer class so that we create only 1 session when we start the consumer instead of a new session every time we call that method.

Let's use the kojisession.untagBuild method here instead of using subprocess. You can also use the koji.multicall param so that all we do only 1 call to koji for all builds.

Example : https://github.com/fedora-infra/bodhi/blob/develop/bodhi/server/models.py#L1492 and https://github.com/fedora-infra/bodhi/blob/develop/bodhi/server/tasks/tag_update_builds.py#L38

same here for tagging build we should use kojisession.tagBuild

An idea here would be to have the token directly in the config and use an ansible variable so that we don't need to read the file. What do you think ?

if we keep this we need to close the file handler :)

This should probably be done in the Consumer class __init__ method so we do it only once and not every time we receive a message

if we have to token as a class attribute you could remove odcs_token here and just use self.token or something like that

we could actually use a proper queue for this but that can be done later :)

1 new commit added

  • Changes to make it more performance

1 new commit added

  • Adding config values

:thumbsup:

Pull-Request has been merged by mohanboddu

Metadata