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

Detect the komodo root from PATH #50

Open
kwinkunks opened this issue Feb 7, 2023 · 3 comments
Open

Detect the komodo root from PATH #50

kwinkunks opened this issue Feb 7, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@kwinkunks
Copy link
Member

kwinkunks commented Feb 7, 2023

If Komodo releases are not located in /prog/res/komodo then trying to automatically use an env for a new komodoenv results in an error like:

/prog/res/komodo/2023.02.b3-py38-rhel7' is not a valid komodo release

In my case, the root is /prog/komodo/2023.02.b3-py38-rhel7.

Perhaps it's best to keep things super explicit, but it might be nice to try detecting the komodo root from the combination of KOMODO_RELEASE and PATH.

For reference, here's how we do this in komodo. (It would be even nicer if Komodo set an environment variable with the path to the root -- see linked issue.)

@pinkwah
Copy link
Collaborator

pinkwah commented May 19, 2023

I agree.

@pinkwah pinkwah added this to the Road to stable milestone May 19, 2023
@kwinkunks
Copy link
Member Author

Making this a bug because the error you get on Azure (root is /prog/komodo) is so obscure

(2023.06.03-py38) [mtha@s034-rgs0002 ert-internal-examples]$ komodoenv --no-update ~/kenv-ert
Traceback (most recent call last):
  File "/prog/komodo/2023.06.03-py38-rhel7/root/bin/komodoenv", line 8, in <module>
    sys.exit(main())
  File "/prog/komodo/2023.06.03-py38-rhel7/root/lib/python3.8/site-packages/komodoenv/__main__.py", line 195, in main
    args = parse_args(args)
  File "/prog/komodo/2023.06.03-py38-rhel7/root/lib/python3.8/site-packages/komodoenv/__main__.py", line 153, in parse_args
    assert args.root.is_dir()
AssertionError

PAssing --root /prog/komodo is the workaround.

@kwinkunks kwinkunks added bug Something isn't working and removed enhancement New feature or request labels Jul 26, 2023
@larsevj
Copy link
Contributor

larsevj commented May 3, 2024

As of #68 komodoenv first checks for the existence of /prog/komodo before defaulting to /prog/res/komodo, so should now be easier to use on Azure. Although this is not as robust as the suggestions in this issue.

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
None yet
Development

No branches or pull requests

3 participants