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

Cellular: fix connect-disconnect sequence called many times #9898

Merged
merged 2 commits into from Mar 1, 2019

Conversation

@jarvte
Copy link
Contributor

commented Mar 1, 2019

Description

Fix connect-disconnect sequence called many times

  • Fixes #9760
  • Fix syncing back to at mode after ppp disconnect.
  • Fix AT_CellularContext flags and states to allow new connect after disconnect.
  • Fix that state machine is not reseted in disconnect is it's running (might be
    running because of another context or new connect already started).
  • Removed API get_connection_status() from CellularNetwork. This was left accidentally
    after refactoring. It wasn't giving correct states after refactoring.

Pull request type

[ ] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[X] Breaking change

Reviewers

@mirelachirica @AriParkkila

Release Notes

Removed API get_connection_status() from CellularNetwork. This was left accidentally
after refactoring. It wasn't giving correct states after refactoring. Application should use CellularContext::get_connection_status instead.

@jarvte jarvte force-pushed the jarvte:connect_disconnect_fix branch Mar 1, 2019

@ciarmcom ciarmcom requested review from AriParkkila, mirelachirica and ARMmbed/mbed-os-maintainers Mar 1, 2019

@ciarmcom

This comment has been minimized.

Copy link
Member

commented Mar 1, 2019

@jarvte

This comment has been minimized.

Copy link
Contributor Author

commented Mar 1, 2019

What is this failing test: **travis-ci/psa-autogen ** — Local psa-autogen testing has failed
It does not seem to be related to this pr.

@mikisch81

This comment has been minimized.

Copy link
Contributor

commented Mar 1, 2019

#9899 will fix the Travis issue

@0xc0170

This comment has been minimized.

Copy link
Member

commented Mar 1, 2019

Travis fixed

@0xc0170

This comment has been minimized.

Copy link
Member

commented Mar 1, 2019

Removed API get_connection_status() from CellularNetwork. This was left accidentally
after refactoring. It wasn't giving correct states after refactoring.

I assume this is targeting 5.12.0 ?

Also a question - fix involves 12 files change and has multiple fixes in (squashed?), why did you squash them?

@0xc0170

This comment has been minimized.

Copy link
Member

commented Mar 1, 2019

From the Release notes section comments, this does not answer how to migrate if its breaking change? By removing, what is the impact, how to migrate?

@jarvte

This comment has been minimized.

Copy link
Contributor Author

commented Mar 1, 2019

Removed API get_connection_status() from CellularNetwork. This was left accidentally
after refactoring. It wasn't giving correct states after refactoring.

I assume this is targeting 5.12.0 ?

Also a question - fix involves 12 files change and has multiple fixes in (squashed?), why did you squash them?

Yes, 5.12 if that possible as this is the release where we can break cellular API's.
Every fix other than removing the API were related to fixing the connect-disconnect sequence.
One amend was because I forgot to fix unit tests after API removal. Should I separate removing the API to separate commit/PR?

@jarvte

This comment has been minimized.

Copy link
Contributor Author

commented Mar 1, 2019

From the Release notes section comments, this does not answer how to migrate if its breaking change? By removing, what is the impact, how to migrate?

Updated notes.

@0xc0170

This comment has been minimized.

Copy link
Member

commented Mar 1, 2019

One amend was because I forgot to fix unit tests after API removal. Should I separate removing the API to separate commit/PR?

That should help readability, shouldn't it ? please do then. I'll run CI right after

jarvte added some commits Mar 1, 2019

Cellular: fix connect-disconnect sequence called many times
Fix syncing back to at mode after ppp disconnect.
Fix AT_CellularContext flags and states to allow new connect after disconnect.
Fix that state machine is not reseted in disconnect is it's running (might be
running because of another context or new connect already started).
Cellular: Removed API get_connection_status() from CellularNetwork
This was left accidentally after refactoring.
It wasn't giving correct states after refactoring.
CellularContext::get_connection_status should be used instead.

@jarvte jarvte force-pushed the jarvte:connect_disconnect_fix branch to 0905f01 Mar 1, 2019

@jarvte

This comment has been minimized.

Copy link
Contributor Author

commented Mar 1, 2019

One amend was because I forgot to fix unit tests after API removal. Should I separate removing the API to separate commit/PR?

That should help readability, shouldn't it ? please do then. I'll run CI right after

Yes for sure. I always tend to forget to divide into proper commits. I'll try to improve. Now it's done for this pr.

@0xc0170 0xc0170 removed the needs: review label Mar 1, 2019

@0xc0170

0xc0170 approved these changes Mar 1, 2019

@0xc0170

This comment has been minimized.

Copy link
Member

commented Mar 1, 2019

CI started

@0xc0170 0xc0170 requested a review from bulislaw Mar 1, 2019

@mbed-ci

This comment has been minimized.

Copy link

commented Mar 1, 2019

Test run: FAILED

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

Failed test jobs:

  • jenkins-ci/mbed-os-ci_tools-test

@0xc0170 0xc0170 added needs: review and removed needs: CI labels Mar 1, 2019

@0xc0170

This comment has been minimized.

Copy link
Member

commented Mar 1, 2019

@ARMmbed/mbed-os-test ^^ this needs fixing please

@bulislaw
Copy link
Member

left a comment

Why does this PR introduces multiple unrelated changes, while one of them is breaking? One PR should be fixing the connect-disconnect issue and second, separate, one should be addressing the cleanup (and be labeled as breaking).
It's very late before the code freeze so we will take it as it is, but in the future please remember to have one PR for each logical change. It's especially important for breaking changes as they are considered on case to case basis.

@0xc0170

This comment has been minimized.

Copy link
Member

commented Mar 1, 2019

The failure above was unrelated, CI config , fixed now.

@0xc0170 0xc0170 merged commit 10f2c05 into ARMmbed:master Mar 1, 2019

28 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci/build-ARMC5 Success
Details
jenkins-ci/build-ARMC6 Success
Details
jenkins-ci/build-GCC_ARM Success
Details
jenkins-ci/build-IAR8 Success
Details
jenkins-ci/cloud-client-test Success
Details
jenkins-ci/dynamic-memory-usage RTOS ROM(-24 bytes) RAM(+0 bytes)
Details
jenkins-ci/exporter Success
Details
jenkins-ci/greentea-test Success
Details
jenkins-ci/mbed2-build-ARMC5 Success
Details
jenkins-ci/mbed2-build-ARMC6 Success
Details
jenkins-ci/mbed2-build-GCC_ARM Success
Details
jenkins-ci/mbed2-build-IAR8 Success
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Local astyle testing has passed
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/doxy-spellcheck Local doxy-spellcheck testing has passed
Details
travis-ci/events Passed, runtime is 8986 cycles
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/include_check Local include_check testing has passed
Details
travis-ci/licence_check Local licence_check testing has passed
Details
travis-ci/littlefs Passed, code size is 8408B
Details
travis-ci/psa-autogen Local psa-autogen testing has passed
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details
travis-ci/tools-py3.5 Local tools-py3.5 testing has passed
Details
travis-ci/tools-py3.6 Local tools-py3.6 testing has passed
Details
travis-ci/tools-py3.7 Local tools-py3.7 testing has passed
Details

@0xc0170 0xc0170 removed the ready for merge label Mar 1, 2019

@jarvte jarvte deleted the jarvte:connect_disconnect_fix branch Mar 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.