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

Restructure storage kvstore directory #13307

Merged
merged 5 commits into from
Jul 23, 2020

Conversation

rajkan01
Copy link
Contributor

@rajkan01 rajkan01 commented Jul 17, 2020

Summary of changes

Preceding PR: #13300

Restructured storage/kvstore as per the new directory structure proposal:

storage
├── blockdevice
├── filesystem
├── kvstore
│   ├── include
│   │   └── kvstore // All headers previously in filesystemstore, global_api, kv_map, tdbstore
│   │       ├── kvstore_global_api.h
│   │       ├── KVStore.h
│   │       └── [...]
│   ├── source // All sources previously in filesystemstore, global_api, kv_map, tdbstore
│   │   ├── kvstore_global_api.cpp
│   │   └── [...]
│   ├── tests
│   ├── kv_config   // Renamed from "conf". In future, consider removing; application should provide the storage configuration
│   │   ├── mbed_lib.json
│   │   ├── include
│   │   │   └── kv_config
│   │   │       └── kv_config.h
│   │   ├── source
│   │   │   └── kv_config.cpp
│   │   ├── filesystem
│   │   │   └── mbed_lib.json
│   │   ├── filesystem_no_rbp
│   │   │   └── mbed_lib.json
│   │   └── [...]
│   ├── direct_access_devicekey // Used by bootloader so kept in a separate folder
│   │   ├── mbed_lib.json
│   │   ├── include
│   │   │   └── direct_access_devicekey
│   │   └── source
│   └── securestore
│       ├── mbed_lib.json
│       ├── include
│       │   └── securestore
│       └── source

Impact of changes

None.

Migration actions required

None.

Documentation

To Be Updated.


Pull request type

[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[x] Covered by existing mbed-os tests (Greentea or Unittest)
[x] Tests / results supplied as part of this PR

Manual testing: (Build for K64F target with GCC_ARM toolchain)

  • mbed-os-example-blockdevice
  • mbed-os-example-filesystem
  • mbed-os-example-kvstore
  • Greentea tests: Full and Bare metal profiles
  • Unit tests build and run

Reviewers

@0xc0170 @ARMmbed/mbed-os-core


@mergify
Copy link

mergify bot commented Jul 17, 2020

This PR cannot be merged due to conflicts. Please rebase to resolve them.

@mergify mergify bot added the needs: work label Jul 17, 2020
@rajkan01 rajkan01 force-pushed the storage_kv_dir_resturcture branch 3 times, most recently from 2b302ee to 676633d Compare July 17, 2020 19:58
@rajkan01 rajkan01 changed the title Storage kv dir resturcture Restructure storage kvstore directory Jul 17, 2020
@ciarmcom ciarmcom added the release-type: patch Indentifies a PR as containing just a patch label Jul 17, 2020
@ciarmcom ciarmcom requested review from 0xc0170 and a team July 17, 2020 21:00
@ciarmcom
Copy link
Member

@rajkan01, thank you for your changes.
@0xc0170 @ARMmbed/mbed-os-storage @ARMmbed/mbed-os-maintainers please review.

Copy link
Contributor

@LDong-Arm LDong-Arm left a comment

Choose a reason for hiding this comment

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

LGTM

@rajkan01 rajkan01 requested a review from evedon July 20, 2020 14:42
evedon
evedon previously approved these changes Jul 20, 2020
@rajkan01
Copy link
Contributor Author

@0xc0170 Could you please start CI...

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 21, 2020

CI started

@mergify mergify bot added the needs: work label Jul 21, 2020
@mergify mergify bot dismissed evedon’s stale review July 21, 2020 14:10

Pull request has been modified.

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 22, 2020

CI restarted

@mbed-ci
Copy link

mbed-ci commented Jul 22, 2020

Test run: FAILED

Summary: 1 of 6 test jobs failed
Build number : 2
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_dynamic-memory-usage

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 22, 2020

@rajkan01 Can you review failures in dynamic memory?


[2020-07-22T09:39:33.931Z] [Fatal Error] DeviceKey.cpp@22,10: kvstore/KVStore.h: No such file or directory

[2020-07-22T09:39:33.931Z] [ERROR] ./mbed-os/features/device_key/source/DeviceKey.cpp:22:10: fatal error: kvstore/KVStore.h: No such file or directory

[2020-07-22T09:39:33.931Z]    22 | #include "kvstore/KVStore.h"

They look related to the changes.

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 22, 2020

@0xc0170 Could you please start CI...

@rajkan01 Once you rebase or update PR to address the reviewers comment, please state what has changed. It helps everyone to get the state without going through all reviewers comments and commits to find out what has changed and if all was addressed.

@rajkan01
Copy link
Contributor Author

rajkan01 commented Jul 22, 2020

@rajkan01 Can you review failures in dynamic memory?

[2020-07-22T09:39:33.931Z] [Fatal Error] DeviceKey.cpp@22,10: kvstore/KVStore.h: No such file or directory

[2020-07-22T09:39:33.931Z] [ERROR] ./mbed-os/features/device_key/source/DeviceKey.cpp:22:10: fatal error: kvstore/KVStore.h: No such file or directory

[2020-07-22T09:39:33.931Z] 22 | #include "kvstore/KVStore.h"

They look related to the changes.

@0xc0170 As part of new storage/kvstore directory restructure, we added mbed_lib.json at kvstore root directory with config "kvstore" to prevent build tools includes kvstore source by default.
This causes a failure in mbed-bootloader CI dynamic-memory-usage builds, so updated "kvstore" config in mbed_app.json to include kvstore library in mbed-bootloader.
PR: PelionIoT/mbed-bootloader#80

@evedon
Copy link
Contributor

evedon commented Jul 22, 2020

@rajkan01 Can you review failures in dynamic memory?
[2020-07-22T09:39:33.931Z] [Fatal Error] DeviceKey.cpp@22,10: kvstore/KVStore.h: No such file or directory
[2020-07-22T09:39:33.931Z] [ERROR] ./mbed-os/features/device_key/source/DeviceKey.cpp:22:10: fatal error: kvstore/KVStore.h: No such file or directory
[2020-07-22T09:39:33.931Z] 22 | #include "kvstore/KVStore.h"
They look related to the changes.

@0xc0170 As part of new storage/kvstore directory restructure, we added mbed_lib.json at kvstore root directory with config "kvstore" to prevent build tools includes kvstore source by default.
This causes a failure in mbed-bootloader CI dynamic-memory-usage builds, so updated "kvstore" config in mbed_app.json to include kvstore library in mbed-bootloader.
PR: ARMmbed/mbed-bootloader#80

To prevent breaking changes to applications, instead of introducing a new library name like kvstore, we could re-use one of the existing storage library that we removed, for example kv-global-api. Of course kvstore is a more appropriate name but we could change that at a later stage.

@rajkan01
Copy link
Contributor Author

rajkan01 commented Jul 22, 2020

@rajkan01 Can you review failures in dynamic memory?
[2020-07-22T09:39:33.931Z] [Fatal Error] DeviceKey.cpp@22,10: kvstore/KVStore.h: No such file or directory
[2020-07-22T09:39:33.931Z] [ERROR] ./mbed-os/features/device_key/source/DeviceKey.cpp:22:10: fatal error: kvstore/KVStore.h: No such file or directory
[2020-07-22T09:39:33.931Z] 22 | #include "kvstore/KVStore.h"
They look related to the changes.

@0xc0170 As part of new storage/kvstore directory restructure, we added mbed_lib.json at kvstore root directory with config "kvstore" to prevent build tools includes kvstore source by default.
This causes a failure in mbed-bootloader CI dynamic-memory-usage builds, so updated "kvstore" config in mbed_app.json to include kvstore library in mbed-bootloader.
PR: PelionIoT/mbed-bootloader#80

To prevent breaking changes to applications, instead of introducing a new library name like kvstore, we could re-use one of the existing storage library that we removed, for example kv-global-api. Of course kvstore is a more appropriate name but we could change that at a later stage.

@evedon Yes I will re-use kv-global-api to unblock this PR to get merged to master at first level.

@rajkan01
Copy link
Contributor Author

rajkan01 commented Jul 23, 2020

@0xc0170 mbed-bootloader issue resolved by re-using existing library name kv-global-api config. Could you restart the CI

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 23, 2020

CI restarted

@mbed-ci
Copy link

mbed-ci commented Jul 23, 2020

Test run: SUCCESS

Summary: 6 of 6 test jobs passed
Build number : 3
Build artifacts

@rajkan01
Copy link
Contributor Author

@0xc0170 CI passed, Could you review and merge

@0xc0170 0xc0170 merged commit 1d9c13e into ARMmbed:master Jul 23, 2020
@mergify mergify bot removed the ready for merge label Jul 23, 2020
@mbedmain mbedmain added release-version: 6.2.1 Release-pending and removed release-type: patch Indentifies a PR as containing just a patch Release-pending labels Aug 16, 2020
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.

7 participants