Skip to content

Linter fails with OSError if multiple repos are used #272

Open

Description

Version

(azdev-env) frp $ azdev --version
0.1.28

Python (Darwin) 3.8.5 (default, Aug 25 2020, 13:30:25)
[Clang 11.0.3 (clang-1103.0.32.62)]

Configuration

[ext]
repo_paths = <path>/frp/az-cli/.azdev/azure-cli-extensions,<path>/frp

[cli]
repo_path = _NONE_

Command
azdev linter livedata

Error

Running pylint on extensions...
Traceback (most recent call last):
  File "<home>/.pyenv/versions/3.8.5/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "<home>.pyenv/versions/3.8.5/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "<path>/frp/az-cli/.azdev/azdev-env/lib/python3.8/site-packages/pylint/__main__.py", line 8, in <module>
    pylint.run_pylint()
  File "<path>/frp/az-cli/.azdev/azdev-env/lib/python3.8/site-packages/pylint/__init__.py", line 20, in run_pylint
    Run(sys.argv[1:])
  File "<path>/frp/az-cli/.azdev/azdev-env/lib/python3.8/site-packages/pylint/lint.py", line 1573, in __init__
    linter.read_config_file(verbose=self.verbose)
  File "<path>/frp/az-cli/.azdev/azdev-env/lib/python3.8/site-packages/pylint/config.py", line 721, in read_config_file
    raise IOError("The config file {:s} doesn't exist!".format(config_file))
OSError: The config file <path>/frp/az-cli/.azdev/azure-cli-extensions,<path>/frp/pylintrc doesn't exist!

Activity

  1. TimMullender commented on Nov 18, 2020

    @TimMullender
    Author

    I think the issue is that

    get_azdev_config().get("ext", "repo_paths").split(),
    splits the repo_paths on whitespace instead of a comma

  2. added a commit that references this issue on Nov 18, 2020
    59cd100
  3. dafunker commented on Dec 15, 2020

    @dafunker

    Harold Ran (@haroldrandom) I can start to pick up communication for this ticket, as Tim Mullender (@TimMullender) has left our team.

    He kindly forwarded on your message to me regarding the azdev version that we are using.

    The issue is present in:
    azdev --version 0.1.28

    We are able to work around it by using:
    azdev --version 0.1.21

  4. bquantump commented on Dec 15, 2020

    @bquantump
    Contributor

    Tim Mullender (@TimMullender) Thank you for your feedback. Can you give us a more of a description the scenario here?

    I noticed that: repo_path = NONE

    Did you run "azdev setup" without specifying a CLI? Did you run azdev setup with the version 0.1.28 or a earlier version?

    What is the use case for having multiple extension repos? It seems you want to run the linter all both repos. Are you developing on two separate extensions repos?

    Thanks!

  5. dafunker commented on Dec 16, 2020

    @dafunker

    Steve Schilinski (@bquantump), we setup a script to automate this this on an older version (pre 0.1.28) where we run both:

    We only have the one repository which we are developing against and wish to run linter on. However, the adzev setup -r option followed by repo add results in 2 repos being configured.

    Has the setup changed in this version (0.1.28)?

  6. dafunker commented on Dec 16, 2020

    @dafunker

    I'm starting to suspect that there's been a misunderstanding on our side regarding how the adzev is meant to be setup.

    We have a line in our manual steps docs that reads:
    Path (RETURN to use current directory): Path/To/Your/azure-cli-extensions/Repo

    This has been interpreted to mean https://github.com/Azure/azure-cli-extensions.git, but I am thinking now that we do not need this at all.

    I ran our automated setup again and modified the command to be: azdev setup -r "${OUR_REPO}" -e livedata, which now appears to work correctly.

  7. bquantump commented on Dec 18, 2020

    @bquantump
    Contributor

    Gordon Hamilton (@dafunker) I noticed that master as of now is also version 0.1.28, are you using master or are you using the official release of 0.1.28 from August 25th?

    We missed bumping the version in master after the release with new commits. These new commits after the August 25th won't be backward compatible with previous versions.

    So, multiple extensions repos per virtual environment is not yet supported in that version for example (which is 0.1.29 beta).

    Also this new version will allow multiple CLI version to run inside separate virtual environments.

    That is, env1 can have a version of the cli and extensions different from env2's cli version and extensions.

    This required the azdev setup to change, and hence if you are using code after the release on August 25th, which is in master, then the setup must be completely re-run with only one or zero extensions repo specified or added later.

  8. bquantump commented on Dec 18, 2020

    @bquantump
    Contributor

    I'm starting to suspect that there's been a misunderstanding on our side regarding how the adzev is meant to be setup.

    We have a line in our manual steps docs that reads:
    Path (RETURN to use current directory): Path/To/Your/azure-cli-extensions/Repo

    This has been interpreted to mean https://github.com/Azure/azure-cli-extensions.git, but I am thinking now that we do not need this at all.

    I ran our automated setup again and modified the command to be: azdev setup -r "${OUR_REPO}" -e livedata, which now appears to work correctly.

    Yes, -r should be pointing to a local extensions repo on the file system.

  9. dafunker commented on Apr 28, 2021

    @dafunker

    Steve Schilinski (@bquantump), please feel free to go ahead and close this ticket as not a bug. We've changed our setup steps to use -r correctly, so this is no longer an issue.

  10. added a commit that references this issue on Aug 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions