Skip to content
This repository has been archived by the owner on Jan 14, 2021. It is now read-only.

Add a handler so that PDC branches are EOL'd when the branch is retired #63

Merged
merged 5 commits into from
Jul 6, 2017
Merged

Conversation

mprahl
Copy link
Contributor

@mprahl mprahl commented Jun 29, 2017

This PR doesn't implement an audit function. Is it worth the effort considering accuracy would require a lot of querying of datagrepper?

@@ -0,0 +1,67 @@
import logging

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I notice that this project doesn't seem to have an overall copyright file. You might want to add a copyright header on the two files in this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bowlofeggs, could you open an issue about this? It's a good observation, but not something I want to handle in this PR.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mprahl Sure thing! I filed #65 about it.

""" When a component's branch is retired, EOL all it's branches """

def __init__(self, *args, **kwargs):
super(RetireComponentHandler, self).__init__(*args, **kwargs)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend dropping this method since it just calls the superclass.

pass

def initialize(self, pdc):
pass

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All five of the above methods would benefit from docblocks explaning what they do, what the types and purposes of their arguments are, and what the type of the return values are.

@ralphbean
Copy link
Contributor

This PR doesn't implement an audit function. Is it worth the effort considering accuracy would require a lot of querying of datagrepper?

This would be nice to have. (Maybe I can take it on and hit some of @bowlofeggs's points too).

Instead of querying datagrepper, this could iterate over all of the source repos in dist-git looking for dead.package files (for every branch). That will indeed take a while, but will support eventual consistency.


# Look up all non-retired branches from PDC
log.info('Looking up all branches from PDC.')
branches = pdc.get_paged(pdc['component-branches'])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment says "all non-retired branches" but this query will return all branches.

Copy link
Contributor

@ralphbean ralphbean left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@mprahl mprahl changed the title WIP: Add a handler so that PDC branches are EOL'd when the branch is retired Add a handler so that PDC branches are EOL'd when the branch is retired Jul 6, 2017
@mprahl mprahl changed the title Add a handler so that PDC branches are EOL'd when the branch is retired WIP: Add a handler so that PDC branches are EOL'd when the branch is retired Jul 6, 2017
@mprahl mprahl changed the title WIP: Add a handler so that PDC branches are EOL'd when the branch is retired Add a handler so that PDC branches are EOL'd when the branch is retired Jul 6, 2017
@ralphbean ralphbean merged commit 9d3ed4c into fedora-infra:develop Jul 6, 2017
@mprahl mprahl deleted the retirement branch July 6, 2017 18:18
@bowlofeggs bowlofeggs mentioned this pull request Jul 6, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants