SwiftPackageIndex-Server
SwiftPackageIndex-Server copied to clipboard
Add a true `staging` environment setting rather than depending on `development`
Currently, we rely on the default production and development environments supplied with Vapor:
https://github.com/vapor/vapor/blob/73d57959a96ceca719558e70c320b2f729d2b25b/Sources/Vapor/Environment/Environment.swift#L90-L96
This has worked well enough for now but has always been a little limiting and now there's a concrete benefit from adding a third environment in #1182, let's consider adding a dedicated staging environment.
I'm not quite sure what the intention here was. development is staging. We've got the following three environments:
- production → swiftpackageindex.com
- development → staging.swiftpackageindex.com
- testing → tests or local env
Since #1182 was fixed without this, should we close this?
developmentisstaging
That's my point. It's odd to me that those two environments are the same.
In previous projects I have created/worked on there have been four environments (development, staging, production, testing) and it's useful to be able to differentiate between development (where you might not want to do something like report metrics, as we saw in that issue).
Ah, I see. I've always called that dev, hence spi_dev etc everywhere. If anything I'd have called it dev.swiftpackageindex.com 🤷♂️🙂
I'm not sure what the actual suggested change here is, or if it's worth messing with development as representing our dev/staging environment at this point.
What would this change look like and what would be its benefit?