Repository: fedora-infra/bodhi

Issue:
frozen state doesn't allow pushing stable updates correctly
Pending releases (before we have enabled the 'updates' repo at the very end of the cycle before release) 'compose' in bodhi by just tagging the builds and doing it's normal process _except_ it does not call pungi and compose the repo. We just want it to tag builds in and the nightly compose will add them to the base repo. 

Currently in bodhi/server/tasks/composer.py we have: 

```
    def work(self):
        """Perform the various high-level tasks for the compose."""
        self.id = getattr(self.compose.release, '%s_tag' % self.compose.request.value)

        # Set our thread's "name" so it shows up nicely in the logs.
        # https://docs.python.org/2/library/threading.html#thread-objects
        self.name = self.id

        # For 'pending' branched releases, we only want to perform repo-related
        # tasks for testing updates. For stable updates, we should just add the
        # dist_tag and do everything else other than composing/updateinfo, since
        # the nightly build-branched cron job composes for us.
        self.skip_compose = False
        if self.compose.release.state is ReleaseState.pending \
                and self.compose.request is UpdateRequest.stable:
            self.skip_compose = True
```

But... now with the new 'frozen' state, our ReleaseState is now 'frozen' not pending... so bodhi fires off a pungi task trying to do a f38-updates compose. :( 

I guess we should check for both frozen and pending here. 
(Because before and after freeze we want automatic updates to go to the base repo, during freeze we also want that and the freeze should prevent anyone but releng of doing pushes with stable requests. 


Discussion:
But a f38 stable compose should not exist at all. The push script should just create a f38 testing compose, so there should be no need to skip a f38 stable compose in composer...

Resolving patch:
diff --git a/bodhi-server/bodhi/server/tasks/composer.py b/bodhi-server/bodhi/server/tasks/composer.py
--- a/bodhi-server/bodhi/server/tasks/composer.py
+++ b/bodhi-server/bodhi/server/tasks/composer.py
@@ -371,13 +371,14 @@ def work(self):
         # https://docs.python.org/2/library/threading.html#thread-objects
         self.name = self.id
 
-        # For 'pending' branched releases, we only want to perform repo-related
+        # For 'pending' or 'frozen' branched releases, we only want to perform repo-related
         # tasks for testing updates. For stable updates, we should just add the
         # dist_tag and do everything else other than composing/updateinfo, since
         # the nightly build-branched cron job composes for us.
         self.skip_compose = False
-        if self.compose.release.state is ReleaseState.pending \
-                and self.compose.request is UpdateRequest.stable:
+        if self.compose.request is UpdateRequest.stable \
+            and (self.compose.release.state is ReleaseState.pending
+                 or self.compose.release.state is ReleaseState.frozen):
             self.skip_compose = True
 
         log.info('Running ComposerThread(%s)' % self.id)


Test patch: