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

error: error in setup.cfg: command 'bdist_wheel' has no such option 'azure_namespace_package' #12612

Closed
kappa opened this issue Jul 19, 2020 · 20 comments
Assignees
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. Packaging question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@kappa
Copy link

kappa commented Jul 19, 2020

Describe the bug

I am trying to build the wheel for azure-cli and the build fails with the message
"error: error in setup.cfg: command 'bdist_wheel' has no such option 'azure_namespace_package'" in several dependant packages which I am trying to list here:

azure-mgmt-billing
azure-mgmt-applicationinsights
azure-mgmt-consumption
azure-mgmt-datalake-analytics
azure-mgmt-relay

To Reproduce

$ pip wheel --no-binary :all: azure-cli

Expected behavior

Environment summary

Building the wheel with "pip wheel" on Fedora 31 with python 3.7.7.

Additional context

I believe the issue is similar to Azure/azure-cli#10232.

@kappa
Copy link
Author

kappa commented Jul 20, 2020

The problem does not reproduce on master which means what's needed is to release new packages to pypi.org. For example, https://pypi.org/project/azure-mgmt-billing/ was last released more than 2 years ago.

@kaerm
Copy link
Contributor

kaerm commented Jul 20, 2020

Thanks @kappa for reporting this, adding @RodgeFu to take a look at this

@lmazuel
Copy link
Member

lmazuel commented Jul 20, 2020

Hi @kappa
This is a CLI bug related to some known packaging issues Azure/azure-cli#8164

Moving your issue to the CLI repo.

Thanks!

@lmazuel lmazuel transferred this issue from Azure/azure-sdk-for-python Jul 20, 2020
@lmazuel lmazuel transferred this issue from Azure/azure-cli Jul 20, 2020
@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jul 20, 2020
@lmazuel
Copy link
Member

lmazuel commented Jul 20, 2020

@kappa Moving it back, the CLI has the same issue, but that's not what your issue is about :p

@RodgeFu @changlong-liu this means CLI is still using a version of SDK that contains the old packaging approach. This is a two steps fix:

  • Ensure that there is at least one version on PyPI with the new system for each of them (CLI could have pinned an old version). If not, release a new version (doesn't necessarily need regeneration, that's pure packaging)
  • Update the CLI to use more recent SDK

@kappa the short workaround is to downgrade wheel to 0.30.0 (if I remember correctly the problem started after 0.31.0)

@lmazuel lmazuel added the Mgmt This issue is related to a management-plane library. label Jul 20, 2020
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Jul 20, 2020
@LianwMS LianwMS assigned LianwMS and unassigned RodgeFu and changlong-liu Jul 21, 2020
@LianwMS
Copy link
Contributor

LianwMS commented Jul 21, 2020

@kappa , you mention that the issue cannot repo on master branch. So which branch are you using to repo?

@kappa
Copy link
Author

kappa commented Jul 21, 2020

@LianwMS here's what I did to test on master (testing on azure-mgmt-billing):

  1. Downloaded and unpacked https://github.com/Azure/azure-sdk-for-python/archive/master.zip.
  2. cd azure-sdk-for-python-master/sdk/billing/azure-mgmt-billing
  3. pip wheel --no-binary azure-mgmt-billing .
  4. (incorrectly was: 3. pip wheel --no-binary .)

^ This succeeds as opposed to:

  1. pip wheel --no-binary azure-mgmt-billing azure-mgmt-billing
  2. (incorrectly was: 1. pip wheel --no-binary azure-mgmt-billing)

This one fails because it uses the source from https://pypi.org/project/azure-mgmt-billing/#files which was published in March 2018.

Hope that helps.

@LianwMS
Copy link
Contributor

LianwMS commented Jul 22, 2020

@kappa, I tried your repo step. but both of command work: Here is some screenshot:
image
image

@kappa
Copy link
Author

kappa commented Jul 22, 2020

@LianwMS I am sorry, I didn't copy the command correctly, because "--no-binary" switch requires an argument.

Here's the correct repro command:

$ pip3 wheel --no-binary azure-mgmt-billing azure-mgmt-billing

Attaching the screenshot as well.
screen_$r_2020-07-22-001

@LianwMS
Copy link
Contributor

LianwMS commented Jul 23, 2020

@kappa, I tried repo steps you provided, it's correct. but It seems that only billing have the issue. other 4 you list cannot repo.
@languy, Could you explain more what's impact now? if we do not release new SDK, what will happened? Thanks

@kappa
Copy link
Author

kappa commented Jul 23, 2020

@LianwMS this is the output from my original command (building the wheel for azure-cli with dependencies) in the task:
https://gist.github.com/kappa/718802ed7e3bef53b5c49bd10c92558a

123 wheels built successfully and 5 failures for the packages I mentioned.

@kappa
Copy link
Author

kappa commented Jul 23, 2020

@LianwMS The reason why we don't see the errors when we build other packages individually is because the new packages are already released for them but azure-cli specifies old versions as dependencies. See:

pip wheel --no-binary azure-mgmt-applicationinsights azure-mgmt-applicationinsights

This is successful and build a wheel for azure-mgmt-applicationinsights-0.3.0 which was released in April 2020: https://pypi.org/project/azure-mgmt-applicationinsights/#history

But azure-cli depends on the version 0.1.1 of that package: https://github.com/Azure/azure-cli/blob/dev/src/azure-cli/requirements.py3.Linux.txt which is broken:

pip wheel --no-binary azure-mgmt-applicationinsights  azure-mgmt-applicationinsights~=0.1.1

Fails.

@LianwMS
Copy link
Contributor

LianwMS commented Jul 24, 2020

So, it seems that, we only need to release billing for new. Then Cli need update to the recent version. I will try to release billing first.

@RodgeFu
Copy link
Member

RodgeFu commented Jul 31, 2020

quick update: @LianwMS is working with Billing team on updating the swagger accordingly.

@LianwMS
Copy link
Contributor

LianwMS commented Oct 12, 2020

Hi @kappa , do you still have the issue? Are you developing azure-cli locally https://github.com/Azure/azure-cli/blob/dev/doc/configuring_your_machine.md? If yes, pls use azdev tool to setup environment. Or are you trying to use Azure CLI as end user? then pls follow official instruction guideline https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest

@kappa
Copy link
Author

kappa commented Oct 12, 2020

@LianwMS, yes, the issue is still there. It can be reproduced with:
$ pip3 wheel --no-binary :all: azure-cli

@LianwMS
Copy link
Contributor

LianwMS commented Oct 12, 2020

@kappa, May I know why you need build it locally? There is another issues Azure/azure-cli-extensions#1395 which is the same as this issue.

@kappa
Copy link
Author

kappa commented Oct 12, 2020

@LianwMS, thank you, yes, it looks exactly the same issue. Glad I am not alone.
We build everything locally because we need reproducible builds, cannot use pre-built packages.

@LianwMS
Copy link
Contributor

LianwMS commented Oct 12, 2020

Add @yungezz here for CLI question.

@yungezz
Copy link
Member

yungezz commented Oct 12, 2020

Hi @kappa is it ok to close this one while track the error in Azure/azure-cli#14416 since this is an azure-cli issue? thanks.

@lmazuel
Copy link
Member

lmazuel commented Dec 30, 2020

Closing since issue is fixed and/or monitored elsewherre. The root cause has been removed for years now anyway (we don't patch wheel anymore to produce our wheel, hence any version of wheel works)

@lmazuel lmazuel closed this as completed Dec 30, 2020
openapi-sdkautomation bot pushed a commit to AzureSDKAutomation/azure-sdk-for-python that referenced this issue Jan 29, 2021
[Fix S360 Broken Issues][HDInsight]Fix s360 issues batch3 (Azure#12612)

* Add networkProperties and clusterId

* Add properties: VMGroupName, saskey, fileshare
Change vmSizes to vmsizes, vmSizes_filter to vmsizes_filter to fix S360
issue

* Suppress R4007 DefaultErrorResponseSchema

Co-authored-by: Zhenyu Zhou <[email protected]>
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. Packaging question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

8 participants