#12545 300+ F42FTBFS bugzillas block the F41FTBFS tracker
Opened 17 days ago by churchyard. Modified 17 days ago

  • Describe the issue

When the Fedora 42 FTBFS bugzillas were filed, they were filled for the Fedora 41 FTBFS tracker.
Later, they were closed as DUPLICATEs for their Fedora 42 FTBFS BUgzillas, which made the Fedora 42 bugzillas block the Fedora 41 FTBFS tracker.

A glance over https://bugzilla.redhat.com/showdependencytree.cgi?id=F41FTBFS&hide_resolved=1 searching for ": FTBFS in Fedora rawhide/f42" reveals that at least 334 bugzillas are affected by this.

Could you please remove the F41FTBFS trackers from bugzillas opened by your account after the mass rebuild? Thanks.

  • When do you need this? (YYYY/MM/DD)

No idea.

  • When is this no longer needed or useful? (YYYY/MM/DD)

When Fedora 41 goes EOL.

  • If we cannot complete your request, what is the impact?

False tracking.


Thanks


@churchyard, I'm on it, I'm trying to write a script that removed the f41ftbfs from the blocks section, however I see there are no functions to update it I guess

bug.addcc(                 bug.components             bug.get_raw_data()         bug.resolution
bug.addcomment(            bug.creation_time          bug.getcomments()          bug.setassignee(
bug.alias                  bug.creator                bug.groups                 bug.setstatus(
bug.assigned_to            bug.creator_detail         bug.id                     bug.severity
bug.assigned_to_detail     bug.data_category          bug.is_cc_accessible       bug.status
bug.autorefresh            bug.deletecc(              bug.is_confirmed           bug.sub_component
bug.blocks                 bug.depends_on             bug.is_creator_accessible  bug.sub_components
bug.bugzilla               bug.description            bug.is_open                bug.summary
bug.cc                     bug.docs_contact           bug.keywords               bug.tags
bug.cc_detail              bug.external_bugs          bug.last_change_time       bug.target_milestone
bug.cf_doc_type            bug.fixed_in               bug.op_sys                 bug.target_release
bug.cf_environment         bug.flags                  bug.platform               bug.update_token
bug.cf_release_notes       bug.get_attachment_ids()   bug.priority               bug.updateflags(
bug.cf_type                bug.get_attachments(       bug.product                bug.url
bug.classification         bug.get_flag_status(       bug.qa_contact             bug.version
bug.close(                 bug.get_flag_type(         bug.qa_contact_detail      bug.versions
bug.comments               bug.get_flags(             bug.refresh(               bug.weburl
bug.component              bug.get_history_raw()      bug.reload(                bug.whiteboard

the script that I have currently

import logging
import bugzilla

# Bugzilla URL and setup
BZ_URL = 'https://bugzilla.redhat.com'
BZ_CLIENT = bugzilla.Bugzilla(BZ_URL)
LOGGER = logging.getLogger(__name__)

# Define the bug ID for F41FTBFS
F41FTBFS_BUG_ID = 2260875  # The ID to remove

def update_blocks(bugs_file, dry_run):
    """Update the 'blocks' field of each bug to remove F41FTBFS."""
    with open(bugs_file, "r") as file:
        bugs = [line.split(":")[0].strip().split()[1] for line in file]

    for bug_id in bugs:
        try:
            LOGGER.info(f"Processing Bug {bug_id}...")

            # Fetch bug details
            bug = BZ_CLIENT.getbug(int(bug_id))
            current_blocks = bug.blocks  # Get the current 'blocks' field

            # Log the original blocks
            LOGGER.info(f"Bug {bug_id} original blocks: {current_blocks}")

            # Remove F41FTBFS if present
            if F41FTBFS_BUG_ID in current_blocks:
                updated_blocks = [block for block in current_blocks if block != F41FTBFS_BUG_ID]

                # Log the updated blocks
                LOGGER.info(f"Bug {bug_id} updated blocks: {updated_blocks}")

                if not dry_run:
                    # Update the 'blocks' field using the `update` method
                    bug.update({'blocks': updated_blocks})
                    LOGGER.info(f"Blocks field for Bug {bug_id} successfully updated.")
                else:
                    LOGGER.info(f"Dry run enabled. No changes made for Bug {bug_id}.")
            else:
                LOGGER.info(f"Bug {bug_id} does not block F41FTBFS ({F41FTBFS_BUG_ID}). No changes needed.")

        except Exception as e:
            LOGGER.error(f"Failed to process Bug {bug_id}: {e}")

def main():
    bugs_file = "f42_right_bugs.txt"  # Input file containing the F42 bugs
    dry_run = False # Set to False to apply changes

    if not BZ_CLIENT.logged_in:
        LOGGER.error("Bugzilla client is not logged in. Please log in before running the script.")
        return

    update_blocks(bugs_file, dry_run)

if __name__ == "__main__":
    # Setup logging
    logging.basicConfig(level=logging.INFO)
    main()

Metadata Update from @jnsamyak:
- Issue tagged with: high-gain, high-trouble, ops

17 days ago

Metadata Update from @jnsamyak:
- Issue assigned to jnsamyak

17 days ago

This didn't helped either

>>> BZ_CLIENT.update_bugs(ids=[2340214], updates={"remove_blocks": [2260875]})
{'bugs': [{'last_change_time': <DateTime '20250123T06:15:38' at 0x7f2afcf6dfa0>, 'changes': {}, 'id': 2340214, 'alias': []}]}

This is the script: https://paste.centos.org/view/5dbd1c0b

Sample run:
 python3 remove_blocks_new_delete.py
INFO:__main__:Processing Bug 2339846...
INFO:__main__:Bug 2339846 original blocks: [2260875, 2300528]
F41FTBFS_BUG_ID exists
INFO:__main__:Blocks field for Bug 2339846 successfully updated.

Sample Input:
Bug 2340211: gftp: FTBFS in Fedora rawhide/f42
Bug 2340212: gfxstream: FTBFS in Fedora rawhide/f42
Bug 2340213: gh: FTBFS in Fedora rawhide/f42
Bug 2340214: ghc: FTBFS in Fedora rawhide/f42

Log in to comment on this ticket.

Metadata
Boards 1
Ops Status: Backlog