SwiftPackageIndex-Server icon indicating copy to clipboard operation
SwiftPackageIndex-Server copied to clipboard

Add a true `staging` environment setting rather than depending on `development`

Open daveverwer opened this issue 3 years ago • 4 comments

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.

daveverwer avatar Dec 20 '21 16:12 daveverwer

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?

finestructure avatar Jun 23 '22 06:06 finestructure

development is staging

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).

daveverwer avatar Jun 23 '22 08:06 daveverwer

Ah, I see. I've always called that dev, hence spi_dev etc everywhere. If anything I'd have called it dev.swiftpackageindex.com 🤷‍♂️🙂

finestructure avatar Jun 23 '22 08:06 finestructure

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?

finestructure avatar Feb 28 '23 09:02 finestructure