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

Save attributes node fixes #9652

Merged
merged 12 commits into from Dec 5, 2023

Conversation

ShvaykaD
Copy link
Contributor

@ShvaykaD ShvaykaD commented Nov 16, 2023

Pull Request description

PE PR: https://github.com/thingsboard/thingsboard-pe/pull/2156

PR subject: Node configuration boolean "false" values (wrapped in quotes) are incorrectly displayed on the UI

image

Additional ctx:

  • Fixed configuration for default rule chains
  • Added backward compatibility tests for notifyDevice feature(without changes to the node itself)
  • Added minor fixed for notifyDevice feature
  • Added SQL upgrade script from 3.6.1 to 3.6.2 to update wrapped in quotes strings to booleans.
  • Added tests for the rule node upgrade method from version 1.

Manual Tests:

before upgrade:
image

upgrade logs(nodes were upgraded using SQL script)
image
image

after upgrade:
image

Rule chain with test nodes before upgrade: test.json.

General checklist

  • You have reviewed the guidelines document.
  • Labels that classify your pull request have been added.
  • The milestone is specified and corresponds to fix version.
  • Description references specific issue.
  • Description contains human-readable scope of changes.
  • Description contains brief notes about what needs to be added to the documentation.
  • No merge conflicts, commented blocks of code, code formatting issues.
  • Changes are backward compatible or upgrade script is provided.
  • Similar PR is opened for PE version to simplify merge. Crosslinks between PRs added. Required for internal contributors only.

Front-End feature checklist

  • Screenshots with affected component(s) are added. The best option is to provide 2 screens: before and after changes;
  • If you change the widget or other API, ensure it is backward-compatible or upgrade script is present.
  • Ensure new API is documented here

Back-End feature checklist

  • Added corresponding unit and/or integration test(s). Provide written explanation in the PR description if you have failed to add tests.
  • If new dependency was added: the dependency tree is checked for conflicts.
  • If new service was added: the service is marked with corresponding @TbCoreComponent, @TbRuleEngineComponent, @TbTransportComponent, etc.
  • If new REST API was added: the RestClient.java was updated, issue for Python REST client is created.
  • If new yml property was added: make sure a description is added (above or near the property).

@ShvaykaD ShvaykaD added bug Rule Engine Changes to Rule Engine labels Nov 16, 2023
@ShvaykaD ShvaykaD added this to the 3.6.2 milestone Nov 16, 2023
Copy link
Contributor

@smatvienko-tb smatvienko-tb left a comment

Choose a reason for hiding this comment

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

Hey!
Thank you for fixing my issue!
The fix looks quite complicated and tests are hard for me to follow.
The main concern is about changing values with non-default.
You can find my thoughts and suggestions below.

…de in rule node & minor changes to the tests
@ShvaykaD
Copy link
Contributor Author

upgrade logic were updated after review:

updateAttributesOnlyOnValueChange will be true by default(if value is "null" or missing in the configuration)

image

@ashvayka ashvayka merged commit 2b4a7e1 into thingsboard:master Dec 5, 2023
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Rule Engine Changes to Rule Engine
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants