-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Update p4 to 1.12 #44301
Update p4 to 1.12 #44301
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My only concern is if this change will cause any unexpected regressions, meaning we should run it locally to validate that it doesn't break anything. As of right now I don't believe we have any automated testing around p4-fusion. Our current integration test setup just uses the git-p4 path (we should probably have an issue to remedy that). I think in this case it's probably fine to just merge it, since the changes between this version and the previous one are super small. I'll ask @ryanslade for a second opinion, though.
Looks good, but I think this is a good opportunity to create an integration test. We can get that merged and passing and then check this branch against it. Here's an issue |
Thanks for making this change 👍 I've added an integration test for this so I'm going to merge it in and test this branch so that we have more confidence that everything is ok. |
Integration tests running here: It passed, so I think we're good ✅ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
- reference issue: #44030
e137b50
to
3c62a1e
Compare
How confident are we in those tests? Do we have more P4 fusion tests than the one added here? #44346 (comment) Because I don't think in its current form it tests what we want (I don't think it tests the cloning/fetching at all). @jasonhawkharris did you try this out locally to make sure it works? I want to know with certainty that we know that this update doesn't break cloning/fetching before we merge it. |
Lets hold off merging this until we have an integration test in place that confirms we can clone a repo using p4-fusion. The test @mrnugget linked above doesn't test things 100% since the repo may already exist on disk from a previous test. I'm working on another PR that ensures the repo is not on disk first and I'm actually seeing a failure there. I'm pretty sure it's just an issue with the test itself, but still best to be safe. |
Looks like there are indeed some issues @mrnugget: |
Here is my Perforce config in
let me know if I've misconfigured something. |
I had this problem too, hopefully this helps: |
Ok, I've updated the tests so that they remove the repo before tying to clone them, here's a CI run using the new tests: https://buildkite.com/sourcegraph/sourcegraph/builds/183472 ✅ |
@ryanslade said the test passed. Do you feel good about merging, @mrnugget? |
No, I'm still not confident in that the test actually tests what we want: https://github.com/sourcegraph/sourcegraph/pull/44352/files#r1023870178 |
p4-fusion has a few tests running on Github Actions that validate some of its internal functionalities. It is certainly not fully there yet (we don't even test connecting Perforce from within the tool) but I do plan to build more Perforce API tests for p4-fusion as a part of some ongoing work. However, seeing an integration test from the Sourcegraph side is great! More testing == Less anxiety for me when I make a new p4-fusion release :D |
In order to see whether the integration test added in #44352 actually fails if something's broken I created a commit in a branch that replaces the username in the Maybe that's because So then I went nuclear and replaced the The integration test still passes. What am I missing? |
I didn't realise you were doing that so was actually trying the same thing at the same time :) I also saw the test pass. All I can think of is that maybe it's running the Fetch command instead of clone so I changed that too and re-running integration tests. |
Just to provide data to compare - this is the output you should see with exit code 1 from p4-fusion if you pass in Details
Also, p4-fusion expects these required arguments:
If you miss any of these arguments, p4-fusion will fall back to printing the help text, and thus it exits with a 0 exit code. That might be the reason why the test is not failing. |
Ok, merged some better tests. Will marge main back in here and re-run against the new integration tests. |
Latest integration tests: |
@jasonhawkharris Can you add a changelog entry for this? |
@jasonhawkharris Thanks, but I think it can be in this same PR, no need to have a second one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we now have useful tests on main
and they're running on this branch and are not breaking, then let's go ahead an merge this. Thanks!
Test plan
Followed the test plan for upgrading p4