Skip to content

Commit

Permalink
fix: adding "vals" to GithubRelease changes for API and expanded asse…
Browse files Browse the repository at this point in the history
…ts (#912)

With #907, we resolved an issue where GitHub release files were not
being detected via autobump. Recent logs (e.g.
https://circleci.com/api/v1.1/project/github/bioconda/bioconda-utils/44398/output/110/0?file=true&allocation-id=64e7a915cc25c03a3d0cf725-0-build%2FABCDEFGH)
show this has changed and it is correctly detecting the version update.
However, we are generating new errors now that are specifically caused
by the PR submission (this was not previously tested, an oversight on my
part):

```
19:09:44 �[32mBIOCONDA INFO�[0m Recipe hiphase: updating from remote bump/hiphase�[0m
19:09:46 �[31mBIOCONDA ERROR�[0m While processing hiphase
Traceback (most recent call last):
  File "/opt/mambaforge/envs/bioconda/lib/python3.8/site-packages/bioconda_utils/aiopipe.py", line 199, in process
    await filt.apply(item)
  File "/opt/mambaforge/envs/bioconda/lib/python3.8/site-packages/bioconda_utils/autobump.py", line 1142, in apply
    author = self.get_github_author(recipe)
  File "/opt/mambaforge/envs/bioconda/lib/python3.8/site-packages/bioconda_utils/autobump.py", line 1135, in get_github_author
    return ver['vals']['account']
KeyError: 'vals'�[0m
```

This is caused by a lack of passing the `vals` fields through from the
previous PR. Error was replicated locally via:
```
bioconda-utils autobump recipes/ config.yml --package hiphase --create-pr --dry-run
```

With the very minor changes here, `vals` is passed through and we now
get a full run without errors via dry-run:
```
13:35:00 BIOCONDA INFO Updating checksum for hiphase 0.10.2                                                                                                                                            
13:35:00 BIOCONDA INFO Checking out branch bump/hiphase                                                                                                                                                
13:35:06 BIOCONDA INFO Would create PR 'Update hiphase to 0.10.2'                                                                                                                                      
13:35:06 BIOCONDA INFO  title: Update hiphase to 0.10.2                                                                                                                                                
13:35:06 BIOCONDA INFO  body:                                                                                                                                                                          
<!--
creator: autobump
type: bump_version
recipe: hiphase
orig_version: 0.10.0
orig_build_number: 0
new_version: 0.10.2
new_build_bumber: 0
-->

Update [`hiphase`](https://bioconda.github.io/recipes/hiphase/README.html): **0.10.0** &rarr; **0.10.2**

[![install with bioconda](https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg?style=flat)](http://bioconda.github.io/recipes/hiphase/README.html) [![Conda](https://img.shields.io/conda/dn/bioconda/hiphase.svg)](https://anaconda.org/bioconda/hiphase/files)

Info | Link or Description
-----|--------------------
Recipe | [`recipes/hiphase`](https://github.com//bioconda/bioconda-recipes/tree/bump/hiphase/recipes/hiphase) (click to view/edit other files)
Summary | Small and structural variant phasing tool for PacBio HiFi reads
Home | [https://github.com/PacificBiosciences/HiPhase](https://github.com/PacificBiosciences/HiPhase)
Releases |[]()
Recipe Maintainer(s) | @holtjma, @ctsa
Author | `@PacificBiosciences`
***


This pull request was automatically generated (see [docs](https://bioconda.github.io/contributor/updating.html)).

13:35:06 BIOCONDA INFO Would modify PR -1                                                                                                                                                              
13:35:06 BIOCONDA INFO New labels: ['autobump', 'new version']                                                                                                                                         
13:35:06 BIOCONDA INFO Created PR -1: Update hiphase to 0.10.2                                                                                                                                         
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:11<00:00, 11.63s/it]
13:35:06 BIOCONDA WARNING Finished update
13:35:06 BIOCONDA INFO Unrecognized URL stats:
13:35:06 BIOCONDA INFO 
13:35:06 BIOCONDA INFO Recipe status statistics:
13:35:06 BIOCONDA INFO Updated: 1
13:35:06 BIOCONDA INFO SUM: 1
13:35:06 BIOCONDA WARNING Switching back to master
```

Hopefully, this is the last PR related to this issue!
  • Loading branch information
holtjma authored Aug 25, 2023
1 parent 43b7124 commit 9e0e445
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bioconda_utils/hosters.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,8 @@ async def get_expanded_versions(self, req, orig_version):
# we found a match in the expansion
result.append({
'link' : urljoin(url, lp_match["href"]),
'version' : lp_match['version']
'version' : lp_match['version'],
'vals' : vals
})

if match["version"] == self.vals["version"]:
Expand Down Expand Up @@ -455,7 +456,8 @@ async def get_api_versions(self, req, orig_version):
data = re_match.groupdict()
matches.append({
'link' : download_url,
'version' : data['version']
'version' : data['version'],
'vals' : vals
})

# now strip down to the version(s) that are more recent than what currently is in bioconda
Expand Down

0 comments on commit 9e0e445

Please sign in to comment.