Closed brain-hol closed 1 year ago
@vscheuber it looks like the release names were changed in the pipeline on the last GitHub release and that is causing this issue. The question is if we should change the release naming back or if we should move to using the release tag rather than the release name. Do you have a preference?
@hfranklin Yeah, I just completed a fire-drill chasing down this issue. This appears to be unrelated to our pipeline changes (our release naming did not change, I validated that) but it appears that the name tag has changed format a few weeks ago (before we ever merged the pipeline changes) but since we didn't have a full binary release, we didn't notice until I pushed out the 1.0.0 release.
I have a full fix ready to go, which uses the tag_name instead of the name element of the github release document to determine the version. This seems a lot safer than the name, which might be muddied with more human readable text going forward.
Anyone still facing the issue? I am on a macbook pro 16 intel and using homebrew to install frodo and get the below exception while running frodo: ERROR: exception running frodo - Error: Invalid argument not valid semver ('Frodo CLI 1.0.1' received) Error: Invalid argument not valid semver ('Frodo CLI 1.0.1' received) at validateAndParse (/snapshot/frodo-cli-20230711-19907-f6y6t5/node_modules/compare-versions/lib/umd/index.js:126:19) at compareVersions (/snapshot/frodo-cli-20230711-19907-f6y6t5/node_modules/compare-versions/lib/umd/index.js:17:20) at getVersions (/snapshot/frodo-cli-20230711-19907-f6y6t5/cjs/utils/Version.js:122:91) at process.runNextTicks [as _tickCallback] (node:internal/process/task_queues:60:5) at Function.runMain (pkg/prelude/bootstrap.js:1980:13) at node:internal/main/run_main_module:17:47 at async /snapshot/frodo-cli-20230711-19907-f6y6t5/cjs/app.js:34:61
@rjeghanathan and others still seeing this issue, can you please follow these steps and let us know if they solve your issue:
rm ~/.frodo/Versions.json
brew unlink frodo-cli
brew untap rockcarver/frodo-cli
brew tap rockcarver/frodo-cli
brew install frodo-cli
thank you @vscheuber That helped with the issue
Frodo CLI version
Describe the issue
The latest version of Frodo CLI (1.0.0) was released with the name
Frodo CLI 1.0.0
which does not adhere to the Semantic Versioning (SemVer) standard. This naming inconsistency breaks compatibility with all versions of Frodo CLI since v0.16.2-0 (specifically commit 648697e) that check for remote versions.Here's the output of all commands since this breaking issue occurred:
Reason for Error
When running Frodo, the following line is executed to check the version being used against the remote version:
https://github.com/rockcarver/frodo-cli/blob/f66677899882c607e4d5551e352f073360cc2cbe/src/utils/Version.ts#L154
This line subsequently utilizes the
compare-versions
library to parse the SemVer and perform a comparison.To fetch the latest version,
frodo-cli
(or more accurately,frodo-lib
) makes a GET request tohttps://api.github.com/repos/rockcarver/frodo-cli/releases
. It then filters the response to find only non-prerelease releases:https://github.com/rockcarver/frodo-cli/blob/f66677899882c607e4d5551e352f073360cc2cbe/src/utils/Version.ts#L60
Running this request manually provides the list of non-prerelease versions that the endpoint returns:
As shown above, all previous non-prerelease versions were valid SemVer, but the latest release,
Frodo CLI 1.0.0
, deviates from the standard. Consequently, thecompare-versions
library throws an exception thatfrodo-cli
fails to catch, resulting in a process crash.To resolve this issue, the latest version should adhere to the SemVer standard, allowing for proper comparison and preventing errors in the
frodo
command execution.