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

Dictionary versions with just a Git Commit SHA produce a confusing error message #2231

Closed
LeStarch opened this issue Aug 23, 2023 · 7 comments
Assignees
Labels
bug F´ GDS Issues pertaining to the F´ GDS

Comments

@LeStarch
Copy link
Collaborator

From @nbering

F´ Version 3.1.0
Affected Component Ref Application

Problem Description

GDS suggests upgrading when builds from a Git checkout - without tags - produce a dictionary with just a commit SHA as version, like this:

<dictionary topology="Ref" framework_version="7cb9feed0" project_version="7cb9feed0">
[ERROR] Dictionary version  is not in supported range: 0.0.0-9.9.9. Please upgrade fprime-gds.

How to Reproduce

  1. Build the Ref app from an F´ checkout that doesn't have Git Tags in the local history
  2. Run fprime-gds as documented in the Install guide

I have a longer-form description of the problem and how I encountered it in this blog post.

Expected Behaviour

Suggested solutions:

  • An error about version format instead of version range, possibly suggesting that release tags are missing
  • Run with a warning instead of an error when the version number can't be evaluated
  • Fix fprime-util so it doesn't produce invalid versions
@LeStarch LeStarch added the bug label Aug 23, 2023
@LeStarch
Copy link
Collaborator Author

From @ThibFrgsGmz: I have it too! I thought it was due to my wobbly personal setup at the moment. 😅

@LeStarch
Copy link
Collaborator Author

@nbering:

I have it too! I thought it was due to my wobbly personal setup at the moment. 😅

Thanks for the "me, too!" comment. I was worried I might be reporting something only I encountered because I did something unexpected. There's a bunch of reasons people might not end up with tags in their local checkout, though.

@LeStarch
Copy link
Collaborator Author

@nbering:

I was just looking through the project to get a better sense of whether I could write a fix for this. Looks like there's a comment that defines the expected behavior as ignoring version strings that are not formatted with major.minor.patch.

https://github.com/fprime-community/fprime-gds/blob/48efee990481e3c152c1b0fb5a50821a07a1ca55/src/fprime_gds/common/loaders/xml_loader.py#L120-L121

@LeStarch
Copy link
Collaborator Author

From @thomas-bc:

I just had this happen to me, good thing I had seen this issue here before!

Yes it looks we're catching that there's an issue with the value of the version, but not really handling it (https://github.com/fprime-community/fprime-gds/blob/bbae3d6275b18706dc757a965fce8a1a4214adfd/src/fprime_gds/common/loaders/xml_loader.py#L128-L129). dict_version becomes the empty tuple, which raises the DictionaryException. We should instead detect that we're in this special case, and probably just raise a warning.
I'll get to it when I have time, but feel free to open a PR if you want to!

@thomas-bc thomas-bc added the F´ GDS Issues pertaining to the F´ GDS label Aug 24, 2023
@evanmayer
Copy link

evanmayer commented Oct 16, 2023

I think have this issue too. At least, I have the same error message. Edit: confirmed, I fixed it the same way.

Also, because it might be related, I'd like to make sure when I'm developing that I'm running the latest version of F' in my project's fprime directory. Is there a recommended way to update it?

@thomas-bc
Copy link
Collaborator

@evanmayer the recommended way to do that would be to go in the fprime directory and checkout the git ref that you want to be using. You may need to re-run pip install -r requirements.txt in your virtual environment to make sure you're using the correct version of the tools. Using devel may be a little tricky at the moment as we have introduced a couple of changes that will require you to install the devel version of fprime-tools and fprime-gds as well.

@LeStarch
Copy link
Collaborator Author

Revisit after fpp-to-dictionary

@LeStarch LeStarch self-assigned this Dec 14, 2023
LeStarch added a commit to LeStarch/fprime-gds that referenced this issue Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug F´ GDS Issues pertaining to the F´ GDS
Projects
None yet
Development

No branches or pull requests

3 participants