Closed mderriey closed 1 year ago
@jchannon would you mind taking a look and letting me know if that sort of fits what you had in mind?
Very keen for feedback and happy to make changes to adjust things.
Cheers.
Looks good, the only thing I wouldnt want is a push to nuget on a PR merge. For pre-releases I'd probably tag the repo as 7.0.0-beta1
for example
Looks good, the only thing I wouldnt want is a push to nuget on a PR merge. For pre-releases I'd probably tag the repo as
7.0.0-beta1
for example
OK, got it, I'll push an update for this.
No you were right, I just couldn't envisage how we'd do two separate tag approaches :)
I am wondering if I move it out into it's own repo whether that might be clearer however I'd still somehow want to bump those external packages to use the latest carter when we release a new carter version
On Mon, 26 Sept 2022 at 12:59, Mickaël Derriey @.***> wrote:
@.**** commented on this pull request.
In .github/workflows/publish-release.yml https://github.com/CarterCommunity/Carter/pull/299#discussion_r979920266 :
@@ -0,0 +1,29 @@ +name: Main tag created workflow + +on:
- push:
- tags-ignore:
- 'newtonsoft-*'
I used different tags as I thought you wanted to be able to have different versions of the Carter and the Carter.ResponseNegotiators.Newtonsoft packages while the source stays in the same repo.
"Regular" tags, like v7.0.0, would release Carter, while newtonsoft-v7.0.0, would release the Carter.ResponseNegotiators.Newtonsoft package.
Did I make a wrong assumption thinking you might want to keep their versioning separate? My thinking was that if we keep them in sync, new versions of Carter.ResponseNegotiators.Newtonsoft could be released without any changes in them.
— Reply to this email directly, view it on GitHub https://github.com/CarterCommunity/Carter/pull/299#discussion_r979920266, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAZVJTADOJPVEIW4KOUKCDWAGFZNANCNFSM6AAAAAAQUBPU6Q . You are receiving this because you were mentioned.Message ID: @.***>
No you were right, I just couldn't envisage how we'd do two separate tag approaches :)
Cool 👍
I am wondering if I move it out into its own repo whether that might be clearer however I'd still somehow want to bump those external packages to use the latest carter when we release a new carter version.
I think there are several options here:
Carter
package, we can find/replace references to the Carter with the latest version; this works for things that are in the same repository.Whether to move it in its own repository is up to you, I'd say. If you don't foresee many other projects with a different release cycle, keeping it in here doesn't add too much "engineering" overhead in my opinion. If/when we hit issues, we can always move it. Maybe some folks at NDC will have opinions based on how painful it was for them 😉
For the template project, one thing I did in the past that worked fairly well was the following:
CarterTemplate
project would have a project reference to the Carter
project — the benefit of this is that you get immediate feedback if you make an API change that affects the template project.7.0.0
if that's what we're releasing).This way, you always keep an updated template project with the latest Carter
version.
I mean we already have a couple of external repos that depend on carter as a package reference but have not been kept up to date really because of the complexities here and me being bothered to work out to do it best :) So if we did move the newtonsoft package out then we'd have 3 or 4 repos that need the package refence updated. Whilst you say we could query nuget, how would you do that, a timer or I wonder if there is a cross repo trigger eg/Carter gets tagged and can then somehow notify other repos.
Regarding the template I also came up with that idea but never got around to doing it, if we did swap the references I'd also want to do that automatically as I already manually change it once Carter is released and I don't like that :)
Whilst you say we could query nuget, how would you do that, a timer or I wonder if there is a cross repo trigger eg/Carter gets tagged and can then somehow notify other repos.
I'm not aware of cross-repo way of triggering workflows.
My initial idea was manually triggering the workflow run (I didn't know there were other repos with package references to Carter), but scheduled runs could also work.
Regarding the template I also came up with that idea but never got around to doing it, if we did swap the references I'd also want to do that automatically as I already manually change it once Carter is released and I don't like that :)
I wasn't clear enough, apologies. Yes, the swapping was done automatically when I implemented that at work a while ago.
A manually triggered workflow that did a find and replace, commit and asked for a tag and then pushed and released to nuget could be very handy indeed!
OK, we can have a look at that in the future.
How would you like to go forward with this PR? Do you want to wait for .NET 7 to be out and your changes to be merged to main
, or should we try and get something merged soon-ish and adapt when the split-out Newtonsoft project gets merged to main
?
@jchannon friendly bump about https://github.com/CarterCommunity/Carter/pull/299#issuecomment-1259588253
👍 will take a look next week. At NDC at the mo 😁
On Fri, 30 Sep 2022 at 10:54, Mickaël Derriey @.***> wrote:
@jchannon https://github.com/jchannon friendly bump about #299 (comment) https://github.com/CarterCommunity/Carter/pull/299#issuecomment-1259588253
— Reply to this email directly, view it on GitHub https://github.com/CarterCommunity/Carter/pull/299#issuecomment-1263299576, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAZVJWPMCONT7MOVFR3XITWA2TEXANCNFSM6AAAAAAQUBPU6Q . You are receiving this because you were mentioned.Message ID: @.***>
As your PR is going to be merged into my branch which has all the .NET 7 changes on it I wonder if we can get it all working in your branch? I just approved a thing in GH Actions so any changes made in the workflow files should build here 🤞
I've made a few changes to test out the real thing, but I believe it will need to be tested on your repo as I'm fairly certain I won't have access to your repo's secrets, like the feedz.io API key.
It now says that the workflow is awaiting approval, so I suppose you need to do something on your end.
To test the whole thing, you'll need to add:
FEEDZ_KEY
, which you should already have.NUGET_KEY
.The scenarios to test those would be:
X.X.X
to trigger a release package pushed to NuGet.newtonsoft-X.X.X
to trigger a Newtonsoft release package pushed to NuGet.It's a bit awkward testing this as it will push packages to NuGet; can you unlist them afterwards? Or maybe you could create tags with versions lower than the current one so that consumers don't get asked to update?
You also mentioned earlier that you would create tags with a leading v
, like v7.0.0
; if you still want to go this way, I'll need to make a slight change to let MinVer know that the tags contain a prefix.
Ok, approved the workflow.
Tags don't seem to contain the prefix on the repo, I just checked.
Ok, approved the workflow.
Sweet, thanks.
The run failed, supposedly because the workflow didn't have access to the FEEDZ_KEY
secret, see https://github.com/CarterCommunity/Carter/actions/runs/3174168115/jobs/5201477628#step:6:8.
Maybe you need to enable forks having access to the secrets? It's a bit sketchy, unless you can do this on a case-by-case basis. Otherwise, we could look at making me a temporary contributor to this repo and I open a PR from a separate branch in this repo?
Tags don't seem to contain the prefix on the repo, I just checked.
OK, so you want to keep it this way, with no prefix?
Just given you write access! 😄 See if that helps, if not I can bump the access.
Yeah no prefix required
Just given you write access! 😄
Sweet, thanks, opened #300 and closing this PR.
Fixes #298
This is my first attempt at trying to come up with something that fits the bill. Mostly to get something in front of you and get feedback.
For now, I've created different workflows to make it easier for me to test things; in the future, we could look at consolidating them and including some logic within the workflow itself. They're mostly the same, the things that change are:
Carter
package, or the Newtonsoft one)push.sh
scriptHere's the list of actions I took on the repo, and what would happen:
6.1.3
tagnewtonsoft-6.0.0
tag