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

GEODE-9478: Fix status --dir to use file controller #6737

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

gaussianrecurrence
Copy link
Contributor

  • Previously when you only specified --dir option the PID was read from
    the member workDir and the status request was attempted to solved by
    using the attachment API, and after that JMX interface.
    But given only --dir was specified the controller resolving the
    request should be FileProcessController instead.
  • Logic has been changed for both servers and locators to always use
    FileProcessConroller whenever only --dir flag is specified.
  • Added an UT to verify new code.
  • Modified several ITs to verify the new behaviour.
  • Deleted the following ITs which no longer apply with the new logic:
    • statusWithEmptyPidFileThrowsIllegalArgumentException
    • statusWithEmptyWorkingDirectoryReturnsNotRespondingWithDetails
    • statusWithStalePidFileReturnsNotResponding

Thank you for submitting a contribution to Apache Geode.

In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:

For all changes:

  • Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?

  • Has your PR been rebased against the latest commit within the target branch (typically develop)?

  • Is your initial contribution a single, squashed commit?

  • Does gradlew build run cleanly?

  • Have you written or updated unit tests to verify your changes?

  • [N/A] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?

Note:

Please ensure that once the PR is submitted, check Concourse for build issues and
submit an update to your PR as soon as possible. If you need help, please send an
email to [email protected].

@kirklund
Copy link
Contributor

Thanks for working on this change! Please give me a day or so to finish reviewing.

Copy link
Contributor

@kirklund kirklund left a comment

Choose a reason for hiding this comment

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

I would remove the @throws IllegalArgumentException javadoc clause on the new constructors of FileProcessController and then go ahead and merge.

Comment on lines 84 to 85
*
* @throws IllegalArgumentException if pid is not a positive integer
Copy link
Contributor

Choose a reason for hiding this comment

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

Delete throws since pid is not a parameter on this constructor.

Comment on lines 97 to 98
*
* @throws IllegalArgumentException if pid is not a positive integer
Copy link
Contributor

Choose a reason for hiding this comment

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

Delete throws since pid is not a parameter on this constructor.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for pointing this out. Change done!

@onichols-pivotal
Copy link
Contributor

Consider adding the windows label to this PR then pushing another commit (or an empty commit) to be sure there won't be any OS-specifc surprises.

@albertogpz albertogpz added the windows add this label to get Windows JDK11 PR checks too label Nov 12, 2021
@gaussianrecurrence
Copy link
Contributor Author

gaussianrecurrence commented Nov 12, 2021

Consider adding the windows label to this PR then pushing another commit (or an empty commit) to be sure there won't be any OS-specifc surprises.

Thanks for mentioning that. I tend to forget about Windows :)

@onichols-pivotal
Copy link
Contributor

this PR appears to be abandoned (although I'm not sure why), should it be merged or closed?

@gaussianrecurrence
Copy link
Contributor Author

this PR appears to be abandoned (although I'm not sure why), should it be merged or closed?

I haven't look into this for a long time. I'd like to get this merged if possible, so I'll work on the merge conflicts and try to get the missing reviews, if any others are needed

 - Previously when you only specified --dir option the PID was read from
   the member workDir and the status request was attempted to solved by
   using the attachment API, and after that JMX interface.
   But given only --dir was specified the controller resolving the
   request should be FileProcessController instead.
 - Logic has been changed for both servers and locators to always use
   FileProcessConroller whenever only --dir flag is specified.
 - Added an UT to verify new code.
 - Modified several ITs to verify the new behaviour.
 - Deleted the following ITs which no longer apply with the new logic:
   * statusWithEmptyPidFileThrowsIllegalArgumentException
   * statusWithEmptyWorkingDirectoryReturnsNotRespondingWithDetails
   * statusWithStalePidFileReturnsNotResponding
 - Removed throws in javadoc given new constructors doesn't have any PID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
windows add this label to get Windows JDK11 PR checks too
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants