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

Fix ttnv3 source related bugs #68

Merged
merged 3 commits into from
Mar 3, 2023
Merged

Conversation

happyRip
Copy link
Member

@happyRip happyRip commented Mar 2, 2023

Summary

Ref https://github.com/TheThingsIndustries/lorawan-stack-support/issues/929

Changes

  • Update End Devices ids and {created,updated}_at fields when getting the device from AS, JS and NS
    • validate that ids either match between the devices or are not present

Testing

Application https://eu1.cloud.thethings.network/console/applications/migrate-without-joineui contains a device registered without the JoinEUI that I attempted to export. The device was exported successfully.

Regressions

n/a

Notes for Reviewers

I attached other bugfix commits that otherwise would only be added in #65

Current solution only checks if the fields match and considers empty ("") fields matching any other field. This could be left for now or handled in 2 ways:

  • first
    • instead of having identifiers a and b there are dst destination and src source identifiers
    • dst ids overwrite empty src ids so that the fields that would be overwritten by an empty value won't be overwritten
  • second
    • some way of filtering paths so that when the src value is empty it is removed from the paths and then can be removed post-validation

Checklist

  • Scope: The referenced issue is addressed, there are no unrelated changes.
  • Documentation: Relevant documentation is added or updated.
  • Changelog: Significant features, behavior changes, deprecations and fixes are added to CHANGELOG.md.

@happyRip happyRip self-assigned this Mar 2, 2023
pkg/source/ttnv3/errors.go Outdated Show resolved Hide resolved
Removed `"last_dev_status_f_cnt_up"` since it is a part of `"mac_state"`.
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Show resolved Hide resolved
pkg/source/ttnv3/errors.go Outdated Show resolved Hide resolved
@happyRip happyRip marked this pull request as ready for review March 3, 2023 10:30
@happyRip happyRip merged commit df36b5b into master Mar 3, 2023
@happyRip happyRip deleted the fix/device-without-joineui branch March 3, 2023 10:37
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