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

CORE-13335: Fix examples that assume invalid data cannot be ALIVE #645

Conversation

samuelraeburn
Copy link
Contributor

@samuelraeburn samuelraeburn commented Jan 25, 2024

Summary

Update the keyed_data example that assumes that !valid_data means an instance cannot be ALIVE.

Details and comments

The introduction of Instance State Consistency means that a sample without valid_data can be in any instance state.
The following code is no longer correct:

if (!valid_data)
     if (instance_state == NOT_ALIVE_DISPOSED) {
         // handle disposed
     } else {
         // handle NOT_ALIVE_NO_WRITERS
     }

Checks

  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.

@samuelraeburn
Copy link
Contributor Author

Failure is not in my changes. The coherent_presentation example is broken:

[ 10%] Building CXX object connext_dds/coherent_presentation/c++11/CMakeFiles/coherent_presentation_subscriber_cpp2.dir/coherent_subscriber.cxx.o
/rti/jenkins/workspace/ci_rticonnextdds-examples_PR-645@2/examples/connext_dds/coherent_presentation/c++11/coherent_subscriber.cxx: In function ‘void run_subscriber_application(unsigned int, unsigned int)’:
/rti/jenkins/workspace/ci_rticonnextdds-examples_PR-645@2/examples/connext_dds/coherent_presentation/c++11/coherent_subscriber.cxx:97:26: error: ‘shutdown_requested’ is not a member of ‘application’
   97 |     while (!application::shutdown_requested && samples_read < sample_count) {
      |                          ^~~~~~~~~~~~~~~~~~
/rti/jenkins/workspace/ci_rticonnextdds-examples_PR-645@2/examples/connext_dds/coherent_presentation/c++11/coherent_subscriber.cxx: In function ‘int main(int, char**)’:
/rti/jenkins/workspace/ci_rticonnextdds-examples_PR-645@2/examples/connext_dds/coherent_presentation/c++11/coherent_subscriber.cxx:116:5: error: ‘setup_signal_handlers’ was not declared in this scope
  116 |     setup_signal_handlers();
      |     ^~~~~~~~~~~~~~~~~~~~~
make[2]: *** [connext_dds/coherent_presentation/c++11/CMakeFiles/coherent_presentation_subscriber_cpp2.dir/build.make:63: connext_dds/coherent_presentation/c++11/CMakeFiles/coherent_presentation_subscriber_cpp2.dir/coherent_subscriber.cxx.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:5540: connext_dds/coherent_presentation/c++11/CMakeFiles/coherent_presentation_subscriber_cpp2.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

alexcamposruiz
alexcamposruiz previously approved these changes Jan 26, 2024
@alexcamposruiz
Copy link
Contributor

alexcamposruiz commented Jan 26, 2024

The destination branch should be master, not develop, since this change is fine in the current Connext release.

@alexcamposruiz
Copy link
Contributor

Failure is not in my changes. The coherent_presentation example is broken:

[ 10%] Building CXX object connext_dds/coherent_presentation/c++11/CMakeFiles/coherent_presentation_subscriber_cpp2.dir/coherent_subscriber.cxx.o
/rti/jenkins/workspace/ci_rticonnextdds-examples_PR-645@2/examples/connext_dds/coherent_presentation/c++11/coherent_subscriber.cxx: In function ‘void run_subscriber_application(unsigned int, unsigned int)’:
/rti/jenkins/workspace/ci_rticonnextdds-examples_PR-645@2/examples/connext_dds/coherent_presentation/c++11/coherent_subscriber.cxx:97:26: error: ‘shutdown_requested’ is not a member of ‘application’
   97 |     while (!application::shutdown_requested && samples_read < sample_count) {
      |                          ^~~~~~~~~~~~~~~~~~
/rti/jenkins/workspace/ci_rticonnextdds-examples_PR-645@2/examples/connext_dds/coherent_presentation/c++11/coherent_subscriber.cxx: In function ‘int main(int, char**)’:
/rti/jenkins/workspace/ci_rticonnextdds-examples_PR-645@2/examples/connext_dds/coherent_presentation/c++11/coherent_subscriber.cxx:116:5: error: ‘setup_signal_handlers’ was not declared in this scope
  116 |     setup_signal_handlers();
      |     ^~~~~~~~~~~~~~~~~~~~~
make[2]: *** [connext_dds/coherent_presentation/c++11/CMakeFiles/coherent_presentation_subscriber_cpp2.dir/build.make:63: connext_dds/coherent_presentation/c++11/CMakeFiles/coherent_presentation_subscriber_cpp2.dir/coherent_subscriber.cxx.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:5540: connext_dds/coherent_presentation/c++11/CMakeFiles/coherent_presentation_subscriber_cpp2.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

this is fixed in master. I've merged master into develop so it's now also fixed in develop.

@alexcamposruiz alexcamposruiz changed the base branch from develop to master January 26, 2024 16:49
@alexcamposruiz alexcamposruiz dismissed their stale review January 26, 2024 16:49

The base branch was changed.

@alexcamposruiz alexcamposruiz changed the base branch from master to develop January 26, 2024 16:49
Copy link
Contributor

@alexcamposruiz alexcamposruiz left a comment

Choose a reason for hiding this comment

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

Sync your repo and update destination branch.

@samuelraeburn samuelraeburn changed the base branch from develop to master January 29, 2024 07:49
Copy link
Contributor

@alexcamposruiz alexcamposruiz left a comment

Choose a reason for hiding this comment

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

the commit brings unrelated changes to master (dynamic_data_skip_serialization)

@ManuelJNunez
Copy link
Member

Retarget to a branch other than master please. For example release/7.3.0

@samuelraeburn
Copy link
Contributor Author

Retarget to a branch other than master please. For example release/7.3.0

Can we create some guidelines as to what the target branches for this repo should be? I was following this task: #645 (comment) and it has held up the PR for weeks

@samuelraeburn samuelraeburn changed the base branch from master to release/7.3.0 February 22, 2024 10:39
@samuelraeburn
Copy link
Contributor Author

Creating a new PR since this one is a mess: #668

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.

3 participants