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

update get_git_repo_info to avoid KeyError exception #53

Merged
merged 3 commits into from
Dec 3, 2024

Conversation

james-ctc
Copy link
Contributor

fix: get_git_repo_info result dictionary missing entries on error
fix: bump version

Errors obtaining git information were triggering a KeyError exception and hence failing to generate release.json

Traceback (most recent call last):
  File "/home/james/venv/bin/edm", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/james/venv/lib/python3.12/site-packages/edm_tool/__init__.py", line 17, in main
    edm.main(get_parser())
  File "/home/james/venv/lib/python3.12/site-packages/edm_tool/edm.py", line 1667, in main
    args.action_handler(args)
  File "/home/james/venv/lib/python3.12/site-packages/edm_tool/edm.py", line 1301, in release_handler
    if everest_core_repo_info["rev"]:
       ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^
KeyError: 'rev'

fix: bump version

Errors obtaining git information were triggering a KeyError exception
and hence failing to generate release.json

Traceback (most recent call last):
  File "/home/james/venv/bin/edm", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/james/venv/lib/python3.12/site-packages/edm_tool/__init__.py", line 17, in main
    edm.main(get_parser())
  File "/home/james/venv/lib/python3.12/site-packages/edm_tool/edm.py", line 1667, in main
    args.action_handler(args)
  File "/home/james/venv/lib/python3.12/site-packages/edm_tool/edm.py", line 1301, in release_handler
    if everest_core_repo_info["rev"]:
       ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^
KeyError: 'rev'

Signed-off-by: James Chapman <[email protected]>
@hikinggrass hikinggrass self-assigned this Nov 25, 2024
@@ -4,7 +4,8 @@
#
"""Everest Dependency Manager."""
from edm_tool import edm
__version__ = "0.6.2"

__version__ = "0.7.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

TODO @hikinggrass probably can just be 0.6.3

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I used 0.7.0 because there already is a git tag with that value.
It could be confusing to have a 0.6.3 tag newer than 0.7.0

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah I see, then it should probably be something like 0.7.1, I think the 0.7.0 one was created before we decided to use prefixed versions in this repo for everything other than edm.

There still seems to be another issue very similar to the one fixed in this PR, I'll add a commit addressing this to this PR once I have a fix

This ensures that the same edm is invoked as in the rest of the code
Fixes an issues where it would not be found in certain venv configurations

Signed-off-by: Kai-Uwe Hermann <[email protected]>
Signed-off-by: Kai-Uwe Hermann <[email protected]>
@florinmihut florinmihut self-requested a review December 3, 2024 10:18
Copy link

@florinmihut florinmihut left a comment

Choose a reason for hiding this comment

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

I tested the changes, all good

@hikinggrass hikinggrass merged commit 3c10aa4 into main Dec 3, 2024
19 checks passed
@hikinggrass hikinggrass deleted the fix/edm-repo-info branch December 3, 2024 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants