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 on opening repo in a codespace or locally in devcontainer #3579

Closed
slawpast opened this issue Jun 2, 2023 · 8 comments · Fixed by #3601
Closed

Error on opening repo in a codespace or locally in devcontainer #3579

slawpast opened this issue Jun 2, 2023 · 8 comments · Fixed by #3601
Assignees
Labels
bug Something isn't working

Comments

@slawpast
Copy link

slawpast commented Jun 2, 2023

The error happens on building devcontainer, related to run make install-cli
Please note, that we did not make any updates to repo, just started with a new docker installation and previously was running fine

#28 8.066 self.initialize_options() microsoft/AzureTRE#28 8.069 error: cryptography 41.0.1 is installed but cryptography<41,>=0.6 is required by {'msal'} microsoft/AzureTRE#28 8.099 2023-06-02 11:44:19.259Z: microsoft/AzureTRE#28 ERROR: executor failed running [/bin/bash -o pipefail -c make install-cli && echo -e "\n# Set up tre completion\nsource <(_TRE_COMPLETE=bash_source tre)" >> ~/.bashrc]: exit code: 2

I have also attached the full log:

creation.log

Steps to reproduce:

  1. Clone repo https://github.com/microsoft/AzureTRE-Deployment in
  2. open in visual studio code
  3. Reopen in container - fails
    Or:
  4. Open in codespace - the same error.
@slawpast slawpast added the bug Something isn't working label Jun 2, 2023
@jlabhard-sg
Copy link

This happens because msal==1.20.0 requires cryptography<41. msal==1.22.0 would work with cryptography<43, unfortunately the latest version azure-cli-core requires msal==1.20.0.

Fix : enforce cryptography<41 in /cli/setupy.py Line 42:

install_requires=[
        "click==8.1.3",
        "httpx~=0.23.1",
        "cryptography<41",
        "msal==1.20.0",
        "jmespath==1.0.1",
        "tabulate==0.9.0",
        "pygments==2.14.0",
        "PyJWT==2.6.0",
        "azure-cli-core==2.47.0",
        "azure-identity==1.12.0",
        "aiohttp==3.8.4"
    ],

or from the AzureTRE-Deployment repository, add the following line at the end of ,devcontainer/scripts/install-azure-tre-oss.sh:

sed -i 's|"msal==1.20.0"|"cryptography<41",\n"msal==1.20.0"|g' "$oss_home/cli/setup.py"

@slawpast
Copy link
Author

slawpast commented Jun 5, 2023

Thanks @jlabhard-sg . That works

@slawpast slawpast closed this as completed Jun 5, 2023
@SvenAelterman
Copy link
Collaborator

@marrobi Please re-open this and apply the fix to the repo

@marrobi marrobi reopened this Jun 8, 2023
@marrobi
Copy link
Member

marrobi commented Jun 8, 2023

@SvenAelterman reopened.

If anybody has time to help with the fix would be appreciated.

@SvenAelterman
Copy link
Collaborator

@marrobi I can create a PR for the fix provided by @jlabhard-sg if that's the right thing to do. (Confirmed it works, but I don't know if there's a better way to do it?)

@marrobi
Copy link
Member

marrobi commented Jun 8, 2023

I have no better suggestions at present. If you can do a PR that would be very helpful and the team can review.

@marrobi marrobi transferred this issue from microsoft/AzureTRE Jun 9, 2023
@marrobi
Copy link
Member

marrobi commented Jun 16, 2023

I'm not clear why make install-cli works in the AzureTRE repo, dev container build, but not the deployment repository.

@marrobi marrobi transferred this issue from microsoft/AzureTRE-Deployment Jun 16, 2023
@marrobi
Copy link
Member

marrobi commented Jun 16, 2023

Transferring as fix needs to happen in Azure TRE repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
4 participants