Skip to content

Conversation

@akash-manna-sky
Copy link
Contributor

Fixes #1686

JENKINS-73427

With 'Accept first connection' host key verification, and JGit, newly added known_hosts entries are malformed

Testing done

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests that demonstrate the feature works or the issue is fixed

@github-actions github-actions bot added the tests Automated test addition or improvement label Dec 13, 2025
@akash-manna-sky
Copy link
Contributor Author

Hello @MarkEWaite, can you please review this PR?

@MarkEWaite
Copy link
Contributor

Hello @MarkEWaite, can you please review this PR?

Needs one or more tests that show the issue and confirm that the issue is resolved by the code change. In this case, it may be better to not pass the HashKnownHosts argument at all so that users can configure it in their ssh_config if they really want it. Refer to issue report:

@akash-manna-sky
Copy link
Contributor Author

Can you please review the changes? @MarkEWaite

Copy link
Contributor

@MarkEWaite MarkEWaite left a comment

Choose a reason for hiding this comment

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

First review comments. More in another day


// This should not throw an exception when reading the malformed entry
// The connection might fail to verify, but it shouldn't crash
try {
Copy link
Contributor

Choose a reason for hiding this comment

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

If it is expected to throw an exception, please use assertThrows

@akash-manna-sky akash-manna-sky marked this pull request as ready for review December 14, 2025 02:14
@akash-manna-sky akash-manna-sky requested a review from a team as a code owner December 14, 2025 02:14
@akash-manna-sky
Copy link
Contributor Author

Please have a look. @MarkEWaite

@MarkEWaite
Copy link
Contributor

@akash-manna-sky I would like to test this in my development environment, but I'm not allowed to merge the master branch to it. Could you merge the master branch into it so that the latest fixes and releases are included?

@akash-manna-sky
Copy link
Contributor Author

@akash-manna-sky I would like to test this in my development environment, but I'm not allowed to merge the master branch to it. Could you merge the master branch into it so that the latest fixes and releases are included?

I rebase my branch with master branch, so all the latest fixes and releases are included now. You can test it now.

@MarkEWaite
Copy link
Contributor

I rebase my branch with master branch, so all the latest fixes and releases are included now. You can test it now.

Thanks. Generally it is better to merge rather than rebase in a pull request. When you rebase, it often disconnects comments from the changes. The change will be squash merged eventually, so the various steps in the pull request commit history will be collapsed into a single commit on the master branch.

MarkEWaite added a commit to MarkEWaite/docker-lfs that referenced this pull request Dec 19, 2025
@MarkEWaite MarkEWaite added the bug Incorrect or flawed behavior label Dec 19, 2025
@akash-manna-sky
Copy link
Contributor Author

Have you tested the changes? Please tell me if anything I need to modify or update. @MarkEWaite

@MarkEWaite
Copy link
Contributor

Have you tested the changes? Please tell me if anything I need to modify or update. @MarkEWaite

No issues detected in my testing thus far, but I'm testing mostly by using the plugin in other work. I will need to do more specific testing by changing the host key verification strategy to look for surprises.

@akash-manna-sky
Copy link
Contributor Author

Have you tested the changes? Please tell me if anything I need to modify or update. @MarkEWaite

No issues detected in my testing thus far, but I'm testing mostly by using the plugin in other work. I will need to do more specific testing by changing the host key verification strategy to look for surprises.

Thanks for testing! That makes sense. I’ll wait for your additional host key verification testing—please let me know if you’d like me to make changes on my side. @MarkEWaite

Copy link
Contributor

@MarkEWaite MarkEWaite left a comment

Choose a reason for hiding this comment

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

Two minor changes to test assertions based on my review from inside a debugger.

@akash-manna-sky
Copy link
Contributor Author

Is this PR fine now ? Please let me know if there’s anything I need to update. @MarkEWaite

@MarkEWaite
Copy link
Contributor

Is this PR fine now ? Please let me know if there’s anything I need to update. @MarkEWaite

I'm still testing and exploring.

@MarkEWaite MarkEWaite removed the tests Automated test addition or improvement label Dec 21, 2025
@MarkEWaite MarkEWaite linked an issue Dec 21, 2025 that may be closed by this pull request
Copy link
Contributor

@MarkEWaite MarkEWaite left a comment

Choose a reason for hiding this comment

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

It has passed all my tests. Code review prompted me to make a slight improvement in coverage with another test, but otherwise I think it is ready to be tested again in plugin BOM and tested in the acceptance test harness.

@MarkEWaite MarkEWaite merged commit f225e90 into jenkinsci:master Dec 23, 2025
18 checks passed
@akash-manna-sky
Copy link
Contributor Author

It is good to see that my changes have passed all the tests and have been merged. Please assign or suggest me a few issues in this plugin, or in other plugins you maintain, that are higher priority to fix and for which you are willing to accept new pull requests, so that I can continue contributing. I am especially interested in back-end–related tasks. Thank you!

@MarkEWaite

@akash-manna-sky akash-manna-sky deleted the JENKINS-73427 branch December 23, 2025 05:19
@MarkEWaite
Copy link
Contributor

Please assign or suggest me a few issues in this plugin, or in other plugins you maintain,

No, I won't. I'm growing weary of your repeated requests.

Please close pull requests that you're not continuing, like:

Please invest more of your time to deeply test the changes you're proposing. Describe the ways that you've deeply tested those proposed changes. Show that you've exhausted all your own ideas for testing the changes that you are proposing. Then allow time for the maintainers to review them.

In the case of this specific pull request, there was no clear evidence in the pull request description that you were able to duplicate the issue yourself. You disabled hashing of the known hosts file, but didn't describe how you had tested it yourself. I spent multiple hours performing various tests trying to assure that the change is ready to ship.

Please allow changes from maintainers on your pull request branches. When you disallow changes from maintainers, you make the interaction more complicated for maintainers that are reviewing your proposed changes.

Please reduce the frequency at which you ask for updates. Most maintainers will ignore you if you request too frequently or they will ask that you be banned from the organization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Incorrect or flawed behavior

Projects

None yet

2 participants