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

Mbed OS 5.15: Warn on unrecognised error #13031

Merged

Conversation

dgreen-arm
Copy link
Contributor

@dgreen-arm dgreen-arm commented May 29, 2020

Summary of changes

Mbed OS will be adding features that are experimental under a FEATURE_EXPERIMENTAL_API folder. This caused compatibility issues, as the EXPERIMENTAL_API feature is not recognised in all examples. This PR changes the error that's raised when a feature is unrecognised to a warning.

Impact of changes

Migration actions required

Documentation


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


@ciarmcom
Copy link
Member

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

@ciarmcom ciarmcom requested a review from a team May 29, 2020 11:00
@0xc0170
Copy link
Contributor

0xc0170 commented May 29, 2020

We discussed this internally, will be updated to provide better backward compatible way on master and 5.15

@Patater
Copy link
Contributor

Patater commented May 29, 2020

This PR will be updated with the new approach. The purpose of this PR was to prevent errors when using the EXPERIMENTAL_API flag, and there are multiple ways to accomplish that.

Use "not a supported feature" instead of "not a supported features".
@dgreen-arm dgreen-arm force-pushed the add-feature-experimental-5.15 branch from a33b45a to 4f991d0 Compare May 29, 2020 11:57
@dgreen-arm dgreen-arm changed the title [Mbed OS 5.15] Add experimental feature folder [Mbed OS 5.15] Warn on unrecognised error May 29, 2020
raise ConfigException(
"Feature '%s' is not a supported features" % feature)
print("[WARNING] Feature '%s' is not a supported feature" % feature)
self.target.features.remove(feature)
Copy link
Contributor

Choose a reason for hiding this comment

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

Removing this feature will prevent that feature from being defined or having any effect, which is a nice guarantee.

@@ -1354,10 +1354,10 @@ def get_features(self):
self.cumulative_overrides['features']\
.update_target(self.target)

for feature in self.target.features:
for feature in list(self.target.features):
Copy link
Contributor

Choose a reason for hiding this comment

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

You might consider adding a comment why this needs to be a list (because we are modifying the features list and need to iterate on a copy).

Give a warning rather than error if an unrecognised feature is used.
This will help compatibility when new features are added.

Signed-off-by: Darryl Green <darryl.green@arm.com>
@dgreen-arm dgreen-arm force-pushed the add-feature-experimental-5.15 branch from 4f991d0 to cd1b59b Compare May 29, 2020 12:18
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.

LGTM

@mergify mergify bot added needs: CI and removed needs: review labels May 29, 2020
@0xc0170 0xc0170 changed the title [Mbed OS 5.15] Warn on unrecognised error Mbed OS 5.15: Warn on unrecognised error May 29, 2020
@0xc0170
Copy link
Contributor

0xc0170 commented May 29, 2020

I'll start CI once the other job 6.0 rc2 completes

@0xc0170
Copy link
Contributor

0xc0170 commented May 29, 2020

CI started

@mbed-ci
Copy link

mbed-ci commented May 29, 2020

Test run: FAILED

Summary: 1 of 10 test jobs failed
Build number : 1
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_cloud-client-pytest-lts

@mergify mergify bot added needs: work and removed needs: CI labels May 29, 2020
@Patater
Copy link
Contributor

Patater commented May 29, 2020

CI started

@mbed-ci
Copy link

mbed-ci commented May 29, 2020

Test run: FAILED

Summary: 2 of 10 test jobs failed
Build number : 2
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_cloud-client-pytest-lts
  • jenkins-ci/mbed-os-ci_exporter-lts

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 3, 2020

CI restarted

@mergify mergify bot added needs: CI and removed needs: work labels Jun 3, 2020
@mbed-ci
Copy link

mbed-ci commented Jun 3, 2020

Test run: SUCCESS

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

@mergify mergify bot removed the needs: CI label Jun 3, 2020
@0xc0170 0xc0170 requested a review from andypowers June 4, 2020 13:17
Copy link
Collaborator

@andypowers andypowers left a comment

Choose a reason for hiding this comment

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

Approved

@0xc0170 0xc0170 merged commit d0fb06e into ARMmbed:mbed-os-5.15 Jun 8, 2020
@mergify mergify bot removed the ready for merge label Jun 8, 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.

6 participants