Skip to content

webui: check major version compatibility between webui and DIR#880

Merged
frb121 merged 3 commits intomasterfrom
dev/fbergkemper/master/bug-0000871
Jul 6, 2021
Merged

webui: check major version compatibility between webui and DIR#880
frb121 merged 3 commits intomasterfrom
dev/fbergkemper/master/bug-0000871

Conversation

@frb121
Copy link
Contributor

@frb121 frb121 commented Jun 30, 2021

To ensure the installed WEBUI and DIR have the same version
because of compatibility reasons, this PR introduces a version
check at login time which provides an error message if versions
do not match. In addition the PR fixes an issue within the api check.

Fixes #871: UI will not load complete

Thank you for contributing to the Bareos Project!

Please check

  • Short description and the purpose of this PR is present above this paragraph
  • Your name is present in the AUTHORS file (optional)

If you have any questions or problems, please give a comment in the PR.

Helpful documentation and best practices

Checklist for the reviewer of the PR (will be processed by the Bareos team)

General
  • PR name is meaningful
  • Purpose of the PR is understood
  • Separate commit for this PR in the CHANGELOG.md, PR number referenced is same
  • Commit descriptions are understandable and well formatted
Source code quality
  • Source code changes are understandable
  • Variable and function names are meaningful
  • Code comments are correct (logically and spelling)
  • Required documentation changes are present and part of the PR
  • bareos-check-sources --since-merge does not report any problems
  • git status should not report modifications in the source tree after building and testing

@frb121 frb121 self-assigned this Jun 30, 2021
@frb121 frb121 requested a review from pstorz June 30, 2021 11:33
Copy link
Member

@joergsteffens joergsteffens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you really want to enforce exactly the same version? In my test environment this is some thing like $bareos_full_version = "21.0.0~pre612.1aceb0611.dirty.
Shouldn't it be sufficient to enforce the same major version? If the Director and the WebUI do run on different hosts, it might be difficult to keep them exacltly in sync.

@frb121
Copy link
Contributor Author

frb121 commented Jun 30, 2021

Do you really want to enforce exactly the same version? In my test environment this is some thing like $bareos_full_version = "21.0.0~pre612.1aceb0611.dirty.
Shouldn't it be sufficient to enforce the same major version? If the Director and the WebUI do run on different hosts, it might be difficult to keep them exacltly in sync.

In principal it should be sufficient enough to compare the major version, as we use semantic versioning, there should be no breaking changes between minor updates and patches.

@frb121 frb121 force-pushed the dev/fbergkemper/master/bug-0000871 branch from 0591ae3 to 0123aeb Compare June 30, 2021 13:31
@frb121
Copy link
Contributor Author

frb121 commented Jun 30, 2021

I have reduced the comparison to the major release version, as this is sufficient for the purpose. Thanks for the comment and suggestion, it also avoids hassle during development and testing.

@frb121 frb121 force-pushed the dev/fbergkemper/master/bug-0000871 branch 3 times, most recently from 80be2af to ad2c06e Compare July 5, 2021 09:46
@frb121 frb121 requested review from joergsteffens and removed request for pstorz July 5, 2021 09:48
Copy link
Member

@joergsteffens joergsteffens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approve this PR with the 2 additonal commits. A rebase is still required for resolving the CHANGELOG.

frb121 and others added 3 commits July 6, 2021 15:42
To ensure the installed WEBUI and DIR have the same version
because of compatibility reasons, this commit introduces a version
check at login time which provides an error message if versions
do not match.

Fixes #871: UI will not load complete
@frb121 frb121 force-pushed the dev/fbergkemper/master/bug-0000871 branch from 5d10333 to d25d7ea Compare July 6, 2021 13:43
@frb121 frb121 changed the title webui: check version compatibility between webui and DIR webui: check major version compatibility between webui and DIR Jul 6, 2021
@frb121
Copy link
Contributor Author

frb121 commented Jul 6, 2021

Rebased and cleaned up the PR, should be fine now.

@frb121 frb121 added is a backport to 20 This is a backport from master to bareos-20 requires backport to 20 and removed is a backport to 20 This is a backport from master to bareos-20 labels Jul 6, 2021
@frb121 frb121 merged commit 570d9cb into master Jul 6, 2021
@frb121 frb121 deleted the dev/fbergkemper/master/bug-0000871 branch July 6, 2021 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants