Skip to content

fix(web-console): prevent BuildVersion button crash on unexpected value#168

Merged
bluestreak01 merged 1 commit intomainfrom
web-console/fix-build-version-button
Jun 29, 2023
Merged

fix(web-console): prevent BuildVersion button crash on unexpected value#168
bluestreak01 merged 1 commit intomainfrom
web-console/fix-build-version-button

Conversation

@argshook
Copy link
Copy Markdown
Contributor

@argshook argshook commented Jun 27, 2023

Refactored BuildVersion button to prevent crashes on unexpected values and improved preventative measures. Used 0.0.0 instead of invalid semver x.x.x as fallback. Fixes potential crash of entire web console.

Commit log:

  • refactor BuildVersion button to prevent crash on unexpected value.
    previous change in chore(web-console): product button as reported by the database #165 made BuildVersion button show different view
    depending on the value of select build.

    If select build returns unexpected value, a fallback version x.x.x
    was used, which is not valid semver according to compare-versions
    util.

    Moreover, if select build returns an unexpected value, say, while
    developing QuestDB locally, it was possible for the entire web console
    to crash.

    This commit fixes this problem by using 0.0.0 instead of x.x.x as a
    fallback, and in addition has more preventative measures to reduce the
    chance of needing to use fallback value.

previous change in #165 made `BuildVersion` button show different view
depending on the value of `select build`.

If `select build` returns unexpected value, a fallback version `x.x.x`
was used, which is not valid semver according to `compare-versions`
util.

Moreover, if `select build` returns an unexpected value, say, while
developing QuestDB locally, it was possible for the entire web console
to crash.

This commit fixes this problem by using `0.0.0` instead of `x.x.x` as a
fallback, and in addition has more preventative measures to reduce the
chance of needing to use fallback value.
@argshook argshook self-assigned this Jun 27, 2023
@argshook argshook changed the title Fix BuildVersion button crash on unexpected value fix(web-console): prevent BuildVersion button crash on unexpected value Jun 27, 2023
@bluestreak01 bluestreak01 merged commit 95983d0 into main Jun 29, 2023
@bluestreak01 bluestreak01 deleted the web-console/fix-build-version-button branch June 29, 2023 14:33
Vaibhav91one pushed a commit to Vaibhav91one/ui that referenced this pull request Oct 28, 2025
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.

2 participants