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

azure-cli: init at 2.0.76 #71797

Merged
merged 42 commits into from Nov 24, 2019
Merged

azure-cli: init at 2.0.76 #71797

merged 42 commits into from Nov 24, 2019

Conversation

jonringer
Copy link
Contributor

@jonringer jonringer commented Oct 23, 2019

Motivation for this change

Add proper azure cli support back into nix after the node "v1.0" was deprecated.

Still have some clean up to do, definitely not in a final state. Just wanted people to comment while still a draft PR.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @

@vyp
Copy link
Member

vyp commented Oct 23, 2019

fyi i'm getting page not found on https://github.com/Azure/azure-cli

@jonringer
Copy link
Contributor Author

fyi i'm getting page not found on https://github.com/Azure/azure-cli

yea, that happened to me suddenly as well. It's back up, and now looks like a fork. I think someone accidentally deleted it.... lol

@jonringer
Copy link
Contributor Author

I'm able to get the az command to work... however, i would like a better way to wrap the exectuable. @FRidh how would you wrap https://github.com/Azure/azure-cli/blob/dev/src/azure-cli/az ?

@jonringer
Copy link
Contributor Author

also, i need to clean up my git history a bit

@jonringer jonringer force-pushed the add-azure-cli branch 2 times, most recently from 6d01609 to e5bbcd4 Compare October 29, 2019 04:21
@jonringer jonringer marked this pull request as ready for review October 29, 2019 04:21
@jonringer
Copy link
Contributor Author

@FRidh other than making the shell completion work (which isn't mandatory), I think this is ready to go.

@FRidh
Copy link
Member

FRidh commented Oct 31, 2019

Please get rid of removing those __init__ files. Users should always use python.withPackages or python.buildEnv, and users of Python 2 can use python.buildEnv and pass ignoreCollisions to work around the issue with namespace packages.

@jonringer
Copy link
Contributor Author

It's to help enforce PEP420 on our end for python>=3.5, personally, I think this is the right thing to do.

The azure-mgmt-* packages are meant to be composed as a user needs. Their packaging essentially needs you to have wheel==0.30 so that it the interaction between the wheel package, their custom build_azure-wheel.py, and azure-{mgmt-}nspkg package can create the correct wheels for python2 and python3.

In the azure-mgmt* packages, I removed the init.py's only if it's python3, and in the azure-cli, I'm under the assumption that it is python3 (but I guess i could make this optional)

@jonringer
Copy link
Contributor Author

I want to avoid the case where another package has azure-applicationinsights and azure-mgmt-storage, but can only see one of them.

@jonringer jonringer changed the title azure-cli: init at 2.0.75 azure-cli: init at 2.0.76 Nov 7, 2019
@jonringer jonringer force-pushed the add-azure-cli branch 2 times, most recently from 1acf282 to e4d2a4d Compare November 7, 2019 21:23
@jonringer
Copy link
Contributor Author

updated the package to 2.0.76

@jonringer
Copy link
Contributor Author

@FRidh does this look good to you?

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/what-are-your-goals-for-20-03/4773/2

Copy link
Member

@FRidh FRidh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from the duplicate file this looks good to me. I am still a bit skeptical though to adding such huge package to Nixpkgs and think it would be easier to keep it running in a separate project.

@jonringer
Copy link
Contributor Author

It is a requested package, and we have modern cli's for aws and google cloud. Besides it adresses:

#39638
#40073
#71096

@jonringer
Copy link
Contributor Author

removed duplicate file and rebased on master

@jonringer
Copy link
Contributor Author

I was going to wait for 2.0.77 to release, but I'm assuming they won't do a release before black friday, so going to merge.

@jonringer jonringer merged commit 85fc419 into NixOS:master Nov 24, 2019
@jonringer jonringer deleted the add-azure-cli branch November 24, 2019 03:47
@Mic92
Copy link
Member

Mic92 commented Dec 6, 2019

Was the node version removed as well?

@jonringer
Copy link
Contributor Author

It was completely removed from unstable when I added it, and for 19.09, it was just a broken build, so i replaced it.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/nixos-weekly-01-nixos-weekly/5422/1

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/nixops-travis-ci-test-failure-on-azure-private-ip-pr/2441/13

Comment on lines +186 to +195
azure-graphrbac = super.azure-graphrbac.overrideAttrs(oldAttrs: rec {
version = "0.60.0";

src = super.fetchPypi {
inherit (oldAttrs) pname;
inherit version;
sha256 = "1zna5vb887clvpyfp5439vhlz3j4z95blw9r7y86n6cfpzc65fyh";
extension = "zip";
};
});
Copy link
Contributor

@Et7f3 Et7f3 Dec 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why it doesn't use overrideAzureMgmtPackage will you accept a PR where I convert those snippet in the more short form ? same remark for azure-storage-blob, azure-storage-common new packages where added and this pattern is more used instead of overrideAzureMgmtPackage.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overrideAzureMgmtPackage is for `azure-mgmt-* packages. it will create the incorrect python namespaces

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In master this snippet is removed

      preBuild = ''
        rm -f azure_bdist_wheel.py
        substituteInPlace setup.cfg \
          --replace "azure-namespace-package = azure-mgmt-nspkg" ""
      '';

So I don't see why it has such requirement now ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because they had some weird non pep420 logic to get namespaces to work prior to python2 becoming EOL, so it was necessary for a bit to remove the package as it didn't work with nix store paths.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

most of it is irrelevant now that python2 has been deprecated which is why it has been removed

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

Successfully merging this pull request may close these issues.

None yet

6 participants