-
Notifications
You must be signed in to change notification settings - Fork 1k
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
APIApprovals for Core #1608
APIApprovals for Core #1608
Conversation
So there is no build triggered for this PR? More see https://blog.jetbrains.com/teamcity/2013/02/automatically-building-pull-requests-from-github-with-teamcity/ |
@danielmarbach build should have been triggered - we follow that process. I'll take a look |
What do you think about the PR itself?
|
@danielmarbach I'll take a look at it today - and I'm really impressed with how quickly you did this and how thorough you were in documenting your PR :) |
@@ -76,6 +88,22 @@ | |||
<HintPath>..\..\packages\FSharp.Core.3.1.2.5\lib\net40\FSharp.Core.dll</HintPath> | |||
<Private>True</Private> | |||
</Reference> | |||
<Reference Include="Mono.Cecil, Version=0.9.5.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL"> |
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.
Why is this referenced 4 times in this .csproj file?
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.
Derp, nevermind - 4 different DLLs inside the same package. silly me.
@rogeralsing I'm torn about including this inside Akka.Tests - think we should move it to its own project? |
As a separate project imo, that way, it could run as a separate build step on the CI engine. would make it much easier to spot the reason for the failure, if it is failures in the Akka code or API changes. |
@rogeralsing I agree with that @danielmarbach could you move the API approval tests into their own project? |
Fixed the issue with the build server - apparently our Azure cloud service we use for auto-scaling build agents was permanently faulted by something that occurred at midnight 12/31. Switched to a new cloud service and everything is running correctly again. |
@rogeralsing @Aaronontheweb Thanks for the feedback. Please bear with me while I try to be the devils advocate here. The "only" reasoning I heard so far is that you guys want it to be a sep. proj because you want to run it as a sep. build step. If I understand the initial issue and the blog post from @Aaronontheweb correctly you guys want to solve the issue of accidentally breaking the API. I consider the public API of a library an integral part of the library. Therefore when you change the lib (possibly introducing a breaking change) and you only run the tests you immediately get the feedback that you did break the API. Making it a sep. proj makes it again, an afterthought. The costs of running those ApprovalTests is low and the friction introduced by leaving them where they belong, in the corresponding specs/test lib of the corresponding project, is close to non-existant. Thoughts? But hey, in the end, your project, your rules ;) |
This is just a technical thing @danielmarbach - we want to keep those API coverage tests in a separate project so those tests can be run independently on the build server separate from our massive test suite in that project. That's all - our CI process strives to keep things very granular and specific. Edit: think of it this way - I want to see a red check mark specifically if backwards compat in the API breaks and have that called out by name in our build step list. Right now it's lumped into our "unit tests" bucket, which is used to indicate that a piece of functionality broke. |
Ok, I'll move it out. How about (of course in sep. PR)
|
@danielmarbach Akka.Persistence, Akka.Remote, Akka.Cluster, and Akka.DI.Core are the big ones |
@Aaronontheweb but in the same proj? |
btw, I just realized - you'll need to name the project
|
@danielmarbach all in one project is fine |
How about |
sounds good 👍 |
dcb9641
to
239ed93
Compare
Here we go |
Build server is FUBAR at the moment - I'll need to circle back on this once I fix it. |
Looks good - just need to "approve" the current API, right @danielmarbach ? |
Hmmm... I did. is the build failing? Test was green on my machine
|
Yes, the API approval is failing. |
@danielmarbach do you need to commit the approvals file? |
Yes, hmm... Did it on the first commit but not on the revamp apparently. i'll fix
|
Hold, on it's here |
239ed93
to
08adc2a
Compare
@Aaronontheweb I think this is a classical line ending problem. Force pushed with the following
Need to crash now. Hope that fixes the problem. If it doesn't you might need to diff on the agent. |
I did a
on my machine, seems to be ok |
@Aaronontheweb can't really fix it since I don't have access to TC agents to verify. Can you check it? Does it run on your machine? |
@danielmarbach I'll take a look at this over the weekend - but yeah, looks like build server silliness is responsible |
@danielmarbach lol I think I figured out the issue - we may not have a mergetool that |
Yep, fixed it - fired up a custom VM and tried to run the approval tests. Bailed out with a vague |
Thx! There is now way I could have figured that out without spelunking on the agents
|
@danielmarbach yep, absolutely right - the error message captured in the TeamCity log was different somehow. I also believe I've fixed #1622 with some TeamCity configuration changes. Running a bunch of different builds in parallel now to find out. |
Are you going to pull it in soon then?
|
Closed via #1639 |
@danielmarbach yep, all done! I picked up your commit and included it in #1639 |
Any other API approvals that I should contribute?
|
Contributes to #1607
Here is a proposal which we at Particular Software use to make conscious decisions about API breaking changes. It doesn't address all the things raised by @Aaronontheweb but it is one step in the right direction. So basically the idea is the following:
*.approved.txt
file.*.received.txt
file. If the two files don't match the test fails on the CI server or locally. Locally on the devs machine the predefined Diff viewer pops up (never happens on CI) and the dev has to approve the API changes (therefore making a conscious decision)*.approved.txt
file in the DIFF and all reviewers can easily see the breaking changes on the public API.Below a few screenshots for better visualisation:
On local machine
Diff viewer pops up
Approve changes if consciously made
Diff
Thoughts? If you like it it can send in more for possibly:
And then later address the additional ideas raised by @Aaronontheweb
But I think this PR would already be a huge win.