0

I try to create a build pipeline for uploading my python package to an Azure DevOps Artifact Feed. With my default feed it works fine by using this yaml

- script: |
    python setup.py sdist
  displayName: 'Make sdist'

- script: |
    python setup.py bdist_wheel --universal
  displayName: 'Make wheel'




- task: TwineAuthenticate@1 
  inputs:
    artifactFeed: christophhaene

- script: |
    cat $(PYPIRC_PATH) 
  displayName: 'see file'  

- script: |
    python -m twine upload -r 'christophhaene' --config-file $(PYPIRC_PATH) dist/* --verbose

Now I would like to change the feed. For that, I created a new feed in a DevOps projekts calls sftp with the name sftp. If I now change the yaml like that:

- task: TwineAuthenticate@1 
  inputs:
    artifactFeed: sftp

- script: |
    python -m twine upload -r 'sftp' --config-file $(PYPIRC_PATH) dist/* --verbose

I get the following error code in the twine upload section:

[command]/bin/bash --noprofile --norc /home/vsts/work/_temp/d8fc4191-edad-4b2c-9393-3e3ddbf716f2.sh
Uploading distributions to https://pkgs.dev.azure.com/christophhaene/_packaging/sftp/pypi/upload
Uploading sftp-0.1.1-py2.py3-none-any.whl

  0%|          | 0.00/4.43k [00:00<?, ?B/s]
100%|██████████| 4.43k/4.43k [00:00<00:00, 49.8kB/s]HTTPError: 404 Client Error: Not Found - The feed with ID 'sftp' doesn't exist. (DevOps Activity ID: B2DC0264-1FC0-460B-849E-3D77F371E984) for url: https://pkgs.dev.azure.com/christophhaene/_packaging/sftp/pypi/upload

Content received from server:
{"$id":"1","innerException":null,"message":"The feed with ID 'sftp' doesn't exist.","typeName":"Microsoft.VisualStudio.Services.Feed.WebApi.FeedIdNotFoundException, Microsoft.VisualStudio.Services.Feed.WebApi","typeKey":"FeedIdNotFoundException","errorCode":0,"eventId":3000}
##[error]Bash exited with code '1'.

Any idea?

Many thanks Christoph

riQQ
  • 9,878
  • 7
  • 49
  • 66
  • 1
    When you edit the YAML in azure devops and you try to add a new twine task, in the right side you have an helper with the tasks, choose there task, can you see your feed in the drop down list? – Shayki Abramczyk Nov 26 '19 at 08:30

1 Answers1

0

This should be the issue on our side. I have checked and the feed sftp exists in your org christ***ene.

Also, after check the corresponding log by using the activity id you provided, the feed access URL the server used is very abnormal: *****/Ade41224c-3ad6-*****-5f24cb2da86a/_apis/Packaging/Feeds/sftp.

As normal, the api that used to get feed, should be consists of {org name/id}/apis/packaging/Feeds/{feed name/id}. BUT, this id Ade41224c-3ad6-*****-5f24cb2da86a is not the one of this org(christ***ene) id, but your collection/account id. This cause this feed access failed.


Please go our official community to raise this issue ticket. Then we could involve our product group to handle this issue. When you raise the ticket, please also share your org name, project name and the pipeline definition name with that(for security, please share it in the comment by selecting Viewed by Microsoft only). Also, do not miss this activity id which is very important to check log from backend.

Mengdi Liang
  • 17,577
  • 2
  • 28
  • 35
  • If you don't mind, you could share your ticket link here. Then I can contact the corresponding engineer to describe and work with that ticket. – Mengdi Liang Nov 27 '19 at 11:01