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

GetLatestSupportedRuntimeVersion with altool returns incorrect runtime version #7786

Closed
3 tasks done
Arthurvdv opened this issue Jul 3, 2024 · 4 comments
Closed
3 tasks done

Comments

@Arthurvdv
Copy link

1. Describe the bug
When executing altool.exe GetLatestSupportedRuntimeVersion 24.0 it returns the value 13.1, where I would expect 13.0.

image

2. To Reproduce

  1. Download the 'AL Language extension for Microsoft Dynamics 365 Business Central' version 13.1.1065068 from the marketplace.
  2. Navigate to the folder 'extension\bin\win32'
  3. Execute the command altool.exe GetLatestSupportedRuntimeVersion 24.0

3. Expected behavior
I would expect the result to be 13.0 instead of 13.1, based on the documentation: https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-choosing-runtime#currently-available-runtime-versions.

4. Actual behavior

  • Returns Runtime version 13.1 on Platform version 24.0.
  • Returns Runtime version 12.2 on Platform version 23.0.
  • Returns Runtime version 11.1 on Platform version 22.0.

5. Versions:

  • AL Language: 13.1.1065068
  • altool: 13.1.16.16524+a1c2d75fbeb61b677c9166e040a4c3e8eb834ff3
  • Visual Studio Code: not applicable
  • Business Central: not applicable
  • List of Visual Studio Code extensions that you have installed: not applicable

Final Checklist

Please remember to do the following:

  • Search the issue repository to ensure you are reporting a new issue

  • Reproduce the issue after disabling all extensions except the AL Language extension

  • Simplify your code around the issue to better isolate the problem

@vlnzr
Copy link

vlnzr commented Jul 9, 2024

I have a problem regarding this as well:
image
BC23 versions above 23.6 do not work with error message Unknown platform version.
altool.exe version: 14.0.15.27930+87ac3e913f0b2d036867db453a0d36ec8ae690fb

@qutreson
Copy link
Contributor

qutreson commented Jul 10, 2024

The command GetLatestSupportedRuntimeVersion is tailored for getting the runtime version linked to a specific version in SaaS and doesn't cover OnPrem. From BC 22.0, we are using the same platform (and then runtime version) in SaaS for all minors of a given major release. As a consequence 24.0 in SaaS supports runtime 13.1, while OnPrem it supports 13.0 only. Before BC 22, the runtime versions would be the same OnPrem and in SaaS. The behavior of GetLatestSupportedRuntimeVersion for BC 22, 23, and 24 was corrected recently for SaaS because it was causing some incorrect AppSource submission failures performing this platform/runtime consistency check.

The documentation mentioned in the issue specifies the mapping of runtime versions for OnPrem releases, but doesn't mention it. This is also something we should update to cover both OnPrem and SaaS.

Being tailored for SaaS also explains why platform versions 23.6 and higher are not known since those versions only exist OnPrem. This part hasn't changed as part of the recent fix though and minors *.6 and higher were never supported by this command.

The current behavior is then by design, but can you let us know more about what your scenarios? Based on your input, we could then discuss whether a similar command makes sense for OnPrem, or if another solution could be used.

@vlnzr
Copy link

vlnzr commented Jul 10, 2024

Thank you for clarification!

I am using BCContainerHelper's function Run-AlCops. This includes a step to run GetLatestSupportedRuntimeVersion which then obviously throws the error, that 23.8 is not available. I will raise a ticket in their repository about this.

@qutreson qutreson self-assigned this Jul 10, 2024
@Arthurvdv
Copy link
Author

@qutreson Thank you for taking the time to elaborate on this, much appreciated!

I didn't realize this was tailored for SaaS, where I mistook the results that these should also be valid for On-Prem. I'm going to close this issue here, as it result is indeed correct.

Based on your input, we could then discuss whether a similar command makes sense for OnPrem, or if another solution could be used.

I'm using the inner workings of this method in the custom code analyzer (LC0033 · BusinessCentral.LinterCop (github.com)) to inform when a runtime property in the app.json is explicitly set and falling behind compared with the application/platform version.

It would be great to also have a On-Prem compatible version of this the future.

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