Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release workflow no longer working #233

Closed
eitsupi opened this issue Jul 25, 2023 · 8 comments · Fixed by #234
Closed

release workflow no longer working #233

eitsupi opened this issue Jul 25, 2023 · 8 comments · Fixed by #234

Comments

@eitsupi
Copy link
Member

eitsupi commented Jul 25, 2023

The release workflow seems no longer working after python-semantic-release 0.8.

https://github.com/PRQL/pyprql/actions/runs/5655896311/job/15321887399#step:8:12

[10:57:47] INFO     [semantic_release.cli.util] INFO                  util.py:84
                    util.load_raw_config_file: Loading configuration            
                    from pyproject.toml                                         
           INFO     [semantic_release.cli.config] INFO             config.py:228
                    config.select_branch_options: Using group                   
                    'main' options, as '(main|master)' matches                  
                    'main'                                                      
           INFO     [semantic_release.version.algorithm] INFO    algorithm.py:56
                    algorithm.tags_and_versions: found 31                       
                    previous tags                                               
           INFO     [semantic_release.version.algorithm] INFO   algorithm.py:246
                    algorithm.next_version: Found 31 full                       
                    releases (excluding prereleases)                            
           INFO     [semantic_release.version.algorithm] INFO   algorithm.py:268
                    algorithm.next_version: The last full                       
                    release was 0.8.0, tagged as 'v0.8.0'                       
           INFO     [semantic_release.version.algorithm] INFO    algorithm.py:92
                    algorithm.bfs: found latest version in                      
                    branch history: '0.8.0' (31f82dc)                           
           INFO     [semantic_release.version.algorithm] INFO   algorithm.py:111
                    algorithm._bfs_for_latest_version_in_histor                 
                    y: the latest version in this branch's                      
                    history is 0.8.0                                            
           INFO     [semantic_release.version.algorithm] INFO   algorithm.py:292
                    algorithm.next_version: The last full                       
                    version in this branch's history was 0.8.0                  
[10:57:48] INFO     [semantic_release.version.algorithm] INFO   algorithm.py:369
0.9.0
                    algorithm.next_version: The type of the                     
                    next release release is: major                              
           INFO     [semantic_release.version.algorithm] INFO    algorithm.py:56
                    algorithm.tags_and_versions: found 31                       
                    previous tags                                               
The next version is: 0.9.0! 🚀
           INFO     [semantic_release.version.declaration]    declaration.py:127
                    INFO declaration.replace: found                             
                    'tool.poetry.version' in source file                        
                    contents, replacing with 0.9.0                              
           INFO     [semantic_release.cli.commands.version] INFO  version.py:330
                    version.version: Running build command poetry               
                    build                                                       
🛠 Running build command: poetry build
Building pyprql (0.9.0)
  - Building sdist
  - Built pyprql-0.9.0.tar.gz
  - Building wheel
  - Built pyprql-0.9.0-py3-none-any.whl
[10:57:49] INFO     [semantic_release.version.algorithm] INFO    algorithm.py:56
                    algorithm.tags_and_versions: found 31                       
                    previous tags                                               
[10:57:51] INFO     [semantic_release.cli.commands.version] INFO  version.py:386
                    version.version: Path 'templates' not found,                
                    using default changelog template                            
           INFO     [semantic_release.cli.commands.version] INFO  version.py:447
                    version.version: No local changes to add to                 
                    any commit, skipping                                        
[10:57:52] INFO     [semantic_release.hvcs.github] INFO            github.py:164
                    github.create_or_update_release: Creating                   
                    release for v0.9.0                                          
           INFO     [semantic_release.hvcs.github] INFO            github.py:107
                    github.create_release: Creating release for                 
                    tag v0.9.0                                                  
           WARNING  [semantic_release.hvcs.util] WARNING              util.py:72
                    util._wrapper: Github.get_release_id_by_tag                 
                    received response 404: 404 Client Error: Not                
                    Found for url:                                              
                    https://api.github.com/repos/PRQL/pyprql/releases           
                    /tags/v0.9.0                                                
           ERROR    [semantic_release.cli.commands.version] ERROR version.py:539
                    version.version: release id for tag v0.9.0                  
                    not found, and could not be created                         
                    ╭──── Traceback (most recent call last) ────╮               
                    │ /home/runner/.cache/pypoetry/virtualenvs/ │               
                    │ pyprql-2JuVSC4c-py3.10/lib/python3.10/sit │               
                    │ e-packages/semantic_release/cli/commands/ │               
                    │ version.py:533 in version                 │               
                    │                                           │               
                    │   530 │   │   │   release=release,        │               
                    │   531 │   │   )                           │               
                    │   532 │   │   try:                        │               
                    │ ❱ 533 │   │   │   release_id = hvcs_clien │               
                    │   534 │   │   │   │   tag=new_version.as_ │               
                    │   535 │   │   │   │   release_notes=relea │               
                    │   536 │   │   │   │   prerelease=new_vers │               
                    │                                           │               
                    │ /home/runner/.cache/pypoetry/virtualenvs/ │               
                    │ pyprql-2JuVSC4c-py3.10/lib/python3.10/sit │               
                    │ e-packages/semantic_release/helpers.py:58 │               
                    │  in _wrapper                              │               
                    │                                           │               
                    │    55 │   │   │   )                       │               
                    │    56 │   │   │                           │               
                    │    57 │   │   │   # Call function         │               
                    │ ❱  58 │   │   │   result = func(*args, ** │               
                    │    59 │   │   │                           │               
                    │    60 │   │   │   # Log result            │               
                    │    61 │   │   │   logger.debug("%s -> %s" │               
                    │                                           │               
                    │ /home/runner/.cache/pypoetry/virtualenvs/ │               
                    │ pyprql-2JuVSC4c-py3.10/lib/python3.10/sit │               
                    │ e-packages/semantic_release/hvcs/github.p │               
                    │ y:173 in create_or_update_release         │               
                    │                                           │               
                    │   170 │   │                               │               
                    │   171 │   │   release_id = self.get_relea │               
                    │   172 │   │   if release_id is None:      │               
                    │ ❱ 173 │   │   │   raise ValueError(       │               
                    │   174 │   │   │   │   f"release id for ta │               
                    │   175 │   │   │   )                       │               
                    │   176                                     │               
                    ╰───────────────────────────────────────────╯               
                    ValueError: release id for tag v0.9.0 not                   
                    found, and could not be created                             
Usage: semantic-release version [OPTIONS]
Try 'semantic-release version -h' for help.

Error: release id for tag v0.9.0 not found, and could not be created

Perhaps poetry run semantic-release --verbose version --skip-build should be used to skip the build and release to PyPI should be done by invoking a separate workflow.

@eitsupi
Copy link
Member Author

eitsupi commented Jul 25, 2023

#236 seems fixing the workflow, but failed the authentication to PyPI.

Notice: Attempting to perform trusted publishing exchange to retrieve a temporary short-lived API token for authentication against https://upload.pypi.org/legacy/ due to __token__ username with no supplied password field
Error: Trusted publishing exchange failure: 
Token request failed: the server refused the request for the following reasons:

* `invalid-publisher`: valid token, but no corresponding publisher

@max-sixty Could you check the PyPI side? pypa/gh-action-pypi-publish#138 (comment)
(I have no way to check this as I cannot log into PyPI.)

@max-sixty
Copy link
Member

Thanks a lot for fixing all these @eitsupi .

I'll look at PyPI. I'll also add you as a collaborator — do you have a login?

@max-sixty
Copy link
Member

I added this and re-ran the workflow
image

@max-sixty
Copy link
Member

This is no longer a problem, but we do have a different problem: https://github.com/PRQL/pyprql/actions/runs/5657851464/job/15335388131

@eitsupi
Copy link
Member Author

eitsupi commented Jul 25, 2023

@max-sixty Thanks for looking at that and sorry for another error. The error was fixed by #237.

I did not have a PyPI account, so I just created one.

@eitsupi eitsupi closed this as completed Jul 25, 2023
@eitsupi
Copy link
Member Author

eitsupi commented Jul 25, 2023

Since the workflow no longer needs to use secrets.PYPI_TOKEN, I believe PYPI_TOKEN can be removed from the repository settings.

@max-sixty
Copy link
Member

Thanks a lot for fixing!

@max-sixty
Copy link
Member

Since the workflow no longer needs to use secrets.PYPI_TOKEN, I believe PYPI_TOKEN can be removed from the repository settings.

Great, done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants