-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add Prout to guardian/story-packages
#187
Conversation
This is prompted by the outage caused by #184, where new PROD instances of https://packages.gutools.co.uk/ couldn't start up. Although more specific testing would catch this issue before it went live, as a last resort, it's good to know that a pull request has _not_ gone live after merging, and that's one of the things Prout can help with - posting a 'OVERDUE' message against the PR. See also: * https://github.com/guardian/prout * https://www.theguardian.com/info/developer-blog/2015/feb/03/prout-is-your-pull-request-out * Other examples of configuring Prout: * guardian/mobile-apps-api#2507 * guardian/apple-news#232
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.
Think this looks good looking at other examples and the prout repo 👍 Just a couple of comments/questions more for my understanding than anything else!
Resolver.typesafeRepo("releases") | ||
) | ||
) ++ Resolver.sonatypeOssRepos("releases") |
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.
From a quick look around, it sounds like this is the right/required way to declare this plugin so I'm curious as to why it wasn't the case already!
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.
Yeah, there are currently 24 repos still using the deprecated syntax! Only 21 with the updated syntax, eg guardian/frontend#25803.
@@ -53,6 +55,10 @@ resolvers ++= Seq( | |||
Resolver.file("Local", file(Path.userHome.absolutePath + "/.ivy2/local"))(Resolver.ivyStylePatterns) | |||
) | |||
|
|||
buildInfoPackage := "app" | |||
buildInfoOptions += BuildInfoOption.BuildTime | |||
buildInfoKeys += "gitCommitId" -> env.getOrElse("GITHUB_SHA", "Unknown") |
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.
Just wondering about this, if a build ends up in prod, isn't it pretty much necessarily going to have github info? i.e. could env
ever not have a Github_SHA
?
Having said that, never a bad shout to have a fallback.
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.
The build info stuff runs in Dev, on our laptops (which won't have GITHUB_SHA!), as well as in CI - so we need to have a fallback for when we're running on locally!
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.
Oh of course, this still gets evaluated in those environments 🤦
Yep, the fallback is definitely required then!
Looks like the tests in story-package are a little flakey: |
I'm now removing the RiffRaff deployment restriction added by @twrichards on Wednesday: ...I don't think I've used the deployment restriction feature before, but obviously a very good idea to add it when the latest commit on this repo was unusuable do to #184 👍 |
Well, the deploy has gone out, and PROD (https://packages.gutools.co.uk/editorial) is running (hasn't crashed like #184), so far as I can see: Unfortunately though, the commit id does not come through!
I guess |
Oh yeah.... There is no GITHUB_SHA - because this build is currently built on TeamCity, not GitHub Actions 💥 Love it. |
Not yet anyway, but I'm not quite sure when we'll have that done for this project. Is it worth using |
I've opened #188 to cope with TeamCity for now! |
Why are you doing this?
Prout tells you when your pull request is actually deployed - or warns you if it's overdue, and should have been deployed by now.
Other examples of configuring Prout:
Interestingly, as the deploy of #184 did 'succeed', Prout wouldn't have given an Overdue warning - but would at least have prompted a good moment to test the PROD server.