Skip to content

make target list for applications in examples_cmake.json consistent with examples.json #14507

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

Merged
merged 2 commits into from
Apr 15, 2021

Conversation

saheerb
Copy link
Contributor

@saheerb saheerb commented Apr 7, 2021

Summary of changes

Currently for some applications target list is not same for cmake builds and mbed-cli-v1 builds in CI. This was because initially cmake didn't build with all targets, now that we are trying to achieve parity target list should be same. Eventually, (when cmake builds with all the application in examples.json), there will only be example.json which will be used for building example.json and cmake_examples.json

Impact of changes

CMAKE builds in CI builds consistently with CLI1. No user impact.

Migration actions required

None

Documentation

None


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)
[] Tests / results supplied as part of this PR

Reviewers

@jamesbeyond


@ciarmcom ciarmcom added the release-type: patch Indentifies a PR as containing just a patch label Apr 7, 2021
@ciarmcom
Copy link
Member

ciarmcom commented Apr 7, 2021

@saheerb, thank you for your changes.
@jamesbeyond @ARMmbed/mbed-os-maintainers please review.

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 8, 2021

Eventually, (when cmake builds with all the application in examples.json)

Is there any example that is not building - how can we get this alignment ? CAn we run a job and create issues for failures to clear this?

@saheerb
Copy link
Contributor Author

saheerb commented Apr 8, 2021

Eventually, (when cmake builds with all the application in examples.json)

Is there any example that is not building - how can we get this alignment ? CAn we run a job and create issues for failures to clear this?

There is a nightly cmake job running against, "all supported example application" (as in uses examples.json), this sends a notification to tools team. Let's follow in internal slack channel, how the failures will be handled.

jamesbeyond
jamesbeyond previously approved these changes Apr 8, 2021
Copy link
Contributor

@jamesbeyond jamesbeyond left a comment

Choose a reason for hiding this comment

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

LGTM

@mergify mergify bot added needs: CI and removed needs: review labels Apr 8, 2021
0xc0170
0xc0170 previously approved these changes Apr 9, 2021
@0xc0170
Copy link
Contributor

0xc0170 commented Apr 9, 2021

CI started

@mergify mergify bot added needs: work and removed needs: CI labels Apr 9, 2021
@mbed-ci
Copy link

mbed-ci commented Apr 9, 2021

Jenkins CI Test : ❌ FAILED

Build Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-ARM
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️

"targets" : ["NUCLEO_F401RE"],
"targets" : ["NUCLEO_F401RE", "DISCO_L475VG_IOT01A"],
Copy link
Contributor

Choose a reason for hiding this comment

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

We can't/shouldn't add DISCO_L475VG_IOT01A, because only NUCLEO_F401RE supports both NFC examples. The compilation failure with Mbed CLI 2 is expected behaviour, whereas Mbed CLI 1 lacks a compatibility check and always builds the NFC driver regardless, so it passes unexpectedly. See #14527.

@LDong-Arm
Copy link
Contributor

We're in the process of fixing all examples. After it's done we should be able to use examples.json for both CLI 1 & 2.

@mergify mergify bot dismissed stale reviews from jamesbeyond and 0xc0170 April 9, 2021 11:22

Pull request has been modified.

@LDong-Arm
Copy link
Contributor

@saheerb Fix for mbed-os-example-lorawan on DISCO_L072CZ_LRWAN1: #14529
Either we wait for that to be merged, or skip this target in this PR and add it back later.

@saheerb
Copy link
Contributor Author

saheerb commented Apr 9, 2021

@saheerb Fix for mbed-os-example-lorawan on DISCO_L072CZ_LRWAN1: #14529
Either we wait for that to be merged, or skip this target in this PR and add it back later.

@LDong-Arm we don't have mbed-os-example-lorawan in mbed-cli2 in this build.

@LDong-Arm
Copy link
Contributor

LDong-Arm commented Apr 9, 2021

@saheerb It is in examples_cmake.json, and failed in the previous Jenkins run. It affects the Arm toolchain only.

@saheerb
Copy link
Contributor Author

saheerb commented Apr 9, 2021

@saheerb It is in examples_cmake.json, and failed in the previous Jenkins run. It affects the Arm toolchain only.

Yea you are right.... I think I am losing it :-) Anyways, I will skip that target in this PR and add it back later.

Copy link
Contributor

@Patater Patater left a comment

Choose a reason for hiding this comment

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

How can we know if CI will pass with this set of examples_cmake.json? We should verify this before we merge.

@@ -15,6 +15,38 @@
"baud_rate": 115200,
"compare_log": ["mbed-os-example-for-aws/tests/aws.log"],
"auto-update" : true
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we delete cloud_examples_cmake.json in this PR? CI can use cloud_examples.json without running into failures, even for CMake.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought about that. It's easier to update the cloud_examples_cmake.json for now as it involves no change in CI scripts. We can delete the examples_cmake.json and cloud_examples_cmake.json together?

Copy link
Contributor

Choose a reason for hiding this comment

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

yes, we should. When can we do it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When we have all the examples passing in cmake. Now just one left, mbed-os-example-mesh-minimal

@mbed-ci
Copy link

mbed-ci commented Apr 15, 2021

Jenkins CI Test : ❌ FAILED

Build Number: 2 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_greentea-test ✔️
jenkins-ci/mbed-os-ci_cmake-example-test

@LDong-Arm
Copy link
Contributor

mbed-os-example-devicekey failed on DISCO_L475VG_IOT01A

[1618482180.81][CONN][RXD] --- Mbed OS DeviceKey example ---
[1618482180.81][CONN][RXD]
[1618482180.81][CONN][RXD] --- Using the following salt for key derivation: SALT1 ----- SALT1 ------ SALT1 ---
[1618482180.81][CONN][RXD] --- First call to derive key, requesting derived key of 16 byte ---
[1618482180.81][CONN][RXD]
[1618482180.81][CONN][RXD] --- Error, derive key failed with error code -5 ---

The same binary downloaded from the CI build runs totally fine on my local board. A local build also runs fine...

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 15, 2021

There was a new push, we need to restart CI anyway.

@saheerb
Copy link
Contributor Author

saheerb commented Apr 15, 2021

There was a new push, we need to restart CI anyway.

Let's investigate first the error. That push should have nothing to do with the test error we see here..

@LDong-Arm
Copy link
Contributor

@saheerb Now I can reproduce it with another board of mine. I guess the passing/failing might depend on if a preexisting is on the board's flash. Let me create an issue.

@LDong-Arm
Copy link
Contributor

Fix created: ARMmbed/mbed-os-example-devicekey#72
But to be able to merge that, again we need to fix Mbed CLI in Travis in that example... To be done later.

@saheerb
Copy link
Contributor Author

saheerb commented Apr 15, 2021

There are few differences in the way, cliv1 and cliv2 are built/tested in CI.

examples built with CLI-v1 are not tested for PR. They are only tested in nightly. This apparently was done like this when we had failures in PR. Also, tests are not performed against every available targets in board types. This I think could be due to CI scripts not keeping up with the changes in examples.json

So, to get this PR in which was created for the sake of avoiding regressions. I will disable the test on application which are not passing, and then will update CI scripts/get the other example applications tested with available boards etc.

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 15, 2021

I aborted CI

@LDong-Arm
Copy link
Contributor

#72 is ready for review now. We can either wait for it to be merged, or skip the example in examples_cmake.json and add it back in the future, with other examples we fixed in the last few days.

@saheerb
Copy link
Contributor Author

saheerb commented Apr 15, 2021

#72 is ready for review now. We can either wait for it to be merged, or skip the example in examples_cmake.json and add it back in the future, with other examples we fixed in the last few days.

I have disabled the test running part for now. Let's add it back when ARMmbed/mbed-os-example-devicekey#72 is merged

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 15, 2021

I have disabled the test running part for now. Let's add it back when ARMmbed/mbed-os-example-devicekey#72 is merged

We can get that in if approved (if not, this PR can stay as it is ), so rather wait with this one to get all green? We can wait a hour with the code freeze as this would mean we get all examples green with CMake (🎉 )

@mbed-ci
Copy link

mbed-ci commented Apr 15, 2021

Jenkins CI Test : ❌ FAILED

Build Number: 3 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-cloud-example-ARM
jenkins-ci/mbed-os-ci_cmake-example-ARM
jenkins-ci/mbed-os-ci_cmake-cloud-example-GCC_ARM
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM

@saheerb
Copy link
Contributor Author

saheerb commented Apr 15, 2021

No, then the purpose of the PR is lost. The goal of the PR is to update cmake_examples to currently passing to avoid regressions.

What I understand is devicekey application was not stable enough to have in CI test. We didn't face the issue before as we were not testing in CMake and even in CLIv1 we were not testing in PR.

Also, not all targets are currently tested(run in actual boards in RAAS). This must be updated in CI script, tested and made a PR. That can happen later. The earlier we get this PR in, we have less chances to have regression.

@mbed-ci
Copy link

mbed-ci commented Apr 15, 2021

Jenkins CI Test : ❌ FAILED

Build Number: 4 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-cloud-example-ARM

@mbed-ci
Copy link

mbed-ci commented Apr 15, 2021

Jenkins CI Test : ✔️ SUCCESS

Build Number: 5 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_greentea-test ✔️
jenkins-ci/mbed-os-ci_cmake-example-test ✔️

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 15, 2021

Devicekey was fixed.

@saheerb OK, so proposal is to get this in and do clean up of cmake/non-cmake testing examples afterwards.

@LDong-Arm Please review

@saheerb
Copy link
Contributor Author

saheerb commented Apr 15, 2021

@0xc0170 to be clear, these are our next steps:

  • Merge this PR to avoid regressions.
  • Fix PRs for minimal-mesh
  • Update CI script to make sure we indeed "test"(run the built application) in both CLIv1 and CLIv2 as defined in examples.json

@LDong-Arm
Copy link
Contributor

LDong-Arm commented Apr 15, 2021

Devicekey was fixed.

@saheerb OK, so proposal is to get this in and do clean up of cmake/non-cmake testing examples afterwards.

@LDong-Arm Please review

I'm fine either way. As the team did lots of example fixes this week, I'm okay to have this PR in, and sometime in the next few days do a follow up PR to reenable everything.

Eventually we won't need separate examples.json and examples_cmake.json.

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 15, 2021

Thank you! I'll merge this now

@0xc0170 0xc0170 merged commit 3213ea8 into ARMmbed:master Apr 15, 2021
@mergify mergify bot removed the ready for merge label Apr 15, 2021
@mbedmain mbedmain removed release-type: patch Indentifies a PR as containing just a patch Release-pending labels Apr 26, 2021
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.

8 participants