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

Implement "CFE_ES_GetVersion()" function #1176

Open
jphickey opened this issue Feb 18, 2021 · 12 comments
Open

Implement "CFE_ES_GetVersion()" function #1176

jphickey opened this issue Feb 18, 2021 · 12 comments

Comments

@jphickey
Copy link
Contributor

Is your feature request related to a problem? Please describe.
As in nasa/osal#821 it is preferable to obtain version strings via an API call rather than as a macro, because of how/where it is evaluated.

Describe the solution you'd like
Implement API calls that return the version strings currently defined as macros in cfe_version.h

Additional context
See nasa/osal#821.

Requester Info
Joseph Hickey, Vantage Systems, Inc.

@jphickey jphickey self-assigned this Feb 18, 2021
@skliper skliper added this to the 7.0.0 milestone Feb 18, 2021
@jphickey
Copy link
Contributor Author

Thinking about this a bit, at first I was just thinking to put this info in ES, but if the direction is to ultimately make all core apps into separate modules - so ES, EVS, SB, TBL, TIME, FS will all need separate implementations of this. They will be the same thing initially, but to be correct, this is a bit more work here. (6x to be exact).

@astrogeco
Copy link
Contributor

Extrapolating long-term this begs the questions:

  1. Will every module have it's own version?
  2. If each module is "independent" then should we keep them in separate repos?

We might want to sit back and think about this a bit

@skliper
Copy link
Contributor

skliper commented Feb 18, 2021

  1. Will every module have it's own version?

Every module linked to create cFE should report version, but it doesn't have to be different (we supply all the default/supported modules as part of cFE)

  1. If each module is "independent" then should we keep them in separate repos?

No, we supply a single consistent set and call it "cFE"

We might want to sit back and think about this a bit

Happy to chat/splinter, but this would need to happen ASAP. Caelum is closing out.

@jphickey
Copy link
Contributor Author

Extrapolating long-term this begs the questions:

1. Will every module have it's own version?

2. If each module is "independent" then should we keep them in separate repos?

It's perfectly fine (I think) to manage all the "core" modules together in the same repo, and have them all report the same version. But we are already allowing users to override certain modular components now - namely msg and sbr stuff.

If there is a requirement that dependent code/apps be able to obtain the version number of its environment at runtime - then it only makes sense that each replaceable component independently reports its version. This way if a mission chooses to override that component - they can identify at runtime that they are running their customized version instead of the default framework version of that component.

That being said when you add in the "numeric" version numbers that we also need to know in certain cases, this means we report 5 different versions for everything:

  1. The short/basic string, e.g. v6.8.0-rc1+dev348
  2. The code name, e.g. Bootes
  3. The full descriptive string, e.g. cFE DEVELOPMENT BUILD v6.8.0-rc1+dev348 (Codename: Bootes), Last Official Release: cfe v6.7.0
  4. The semantic version as integers, e.g. 6, 8, 0, 0
  5. The build number as an integer, e.g. 348

If every replaceable module has to report all 5 of these, and we are moving toward full modularity, then this is definitely a scaling issue here. With ~16 different modules (by my count, and growing) that means 80 different version blobs.

@skliper
Copy link
Contributor

skliper commented Feb 18, 2021

Thinking about this a bit, at first I was just thinking to put this info in ES, but if the direction is to ultimately make all core apps into separate modules - so ES, EVS, SB, TBL, TIME, FS will all need separate implementations of this. They will be the same thing initially, but to be correct, this is a bit more work here. (6x to be exact).

Yeah, seems like this is blowing up a bit. Maybe push to post Caelum to give us more time?

@jphickey
Copy link
Contributor Author

I guess the big question here is whether its sufficient to simply report the version itself, or if it needs to implement a method where dependencies can also obtain/act on this info.

If the requirement is simply to report but not make it available up the stack - then cfe_version.h can become a private header.

If the requirement is to also make it available up the stack for dependencies - then I agree this needs more consideration.

@skliper
Copy link
Contributor

skliper commented Feb 18, 2021

Our requirement is to report. I think available up the stack is future-proofing (if someday modules/apps check at runtime for support). I see this as a "nice-to-have".

@astrogeco
Copy link
Contributor

It's perfectly fine (I think) to manage all the "core" modules together in the same repo, and have them all report the same version. But we are already allowing users to override certain modular components now - namely msg and sbr stuff.

The monorepo approach for cFE works for us but wouldn't it force a clone-and-own approach for anyone who wants to customize a module?

@skliper
Copy link
Contributor

skliper commented Feb 18, 2021

It's perfectly fine (I think) to manage all the "core" modules together in the same repo, and have them all report the same version. But we are already allowing users to override certain modular components now - namely msg and sbr stuff.

The monorepo approach for cFE works for us but wouldn't it force a clone-and-own approach for anyone who wants to customize a module?

No. We've got examples for out of tree modules.

@jphickey
Copy link
Contributor Author

The monorepo approach for cFE works for us but wouldn't it force a clone-and-own approach for anyone who wants to customize a module?

No - because of CMake. They put their customized version in the search path and it will be used instead of the default framework version of that module. They clone and own the module, but just that module, not the whole framework.

@astrogeco
Copy link
Contributor

The short/basic string, e.g. v6.8.0-rc1+dev348
The code name, e.g. Bootes
The full descriptive string, e.g. cFE DEVELOPMENT BUILD v6.8.0-rc1+dev348 (Codename: Bootes), Last Official Release: cfe v6.7.0
The semantic version as integers, e.g. 6, 8, 0, 0
The build number as an integer, e.g. 348

See my comment on the osal ticket, what is the benefit of reporting at this level of granularity?

@jphickey
Copy link
Contributor Author

OK -- Based on discussion here and requirement to report only, I suggest this:

OSAL and PSP do need APIs - because they don't have the ability to directly report, CFE must report on their behalf. So CFE must obtain this info at runtime and report it.

But CFE itself does not need to provide API at this time - because it (and everything above it) can self-report. So we can defer this ticket or close as invalid/wontfix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants