What to call selector for currentlyDeployed+currentlySupported #440
Replies: 5 comments 13 replies
-
Giving it some more thought. Maybe I don't need a selector that covers both, because it would be covered by the "autoSelect: true" option in the "pacts for verification" query, which will would return the latest pact from the main branch + currently selected + currently deployed. |
Beta Was this translation helpful? Give feedback.
-
I suppose
Another dimension to approach it from might be: what profiles of things are people releasing/deploying/supporting? An API or app may be released and deployed, but only the deployed versions matter for support. But a non-live-only tool, such as an SDK lib or CLI tool never gets deployed, and only releases matter for support. In that case, are there any general strategies that could be useful? I'm inclined to start from a real-world representation, and then see if it can be simplified (e.g. to booleans for currently supported/deployed). It's not obvious to me that any approach is both intuitive and general enough for people to not need guiding materials. |
Beta Was this translation helpful? Give feedback.
-
Now I'm even not sure about the Here's a real world example. Pactflow is a forked version of the Pact Broker, and supports the Pact Broker Client (a library that gets released via Docker, Rubygems and Github Releases). It also supports the React UI, which is deployed in a test environment as well as a production environment. When Pactflow verifies its pacts, it needs to verify:
What should the selectors look like for that?
That leaves:
If the selector is
it's not quite accurate because every version of the PBC is still "released", but not every one is "supported". If there are super old versions of the PBC that don't work with the latest version of the Broker, they're still released, just not supported. If the selector is
then it's a bit confusing because, from an IT English language point of view, I'd say the "currently supported client versions of Pactflow" include both the prod UI and the prod versions of the client:
The term "currently supported" to me doesn't strongly imply either way whether it's a deployed app or a released app.
Just to complicate things, I don't know if anyone would want to model releasing to a non-prod environment? Is there such a thing? Would someone want to verify a pact from a version between HEAD and a production release? If a version of a library was record-released to a non-prod environment, Totally over thinking this. But I just can't find terminology I'm happy with. |
Beta Was this translation helpful? Give feedback.
-
I agree. I would not consider sub-production deployments to be supported yet. I also think there is only one kind of release -- when you publish an artifact to the production repository -- so environments shouldn't factor into releases. Technically you could differentiate production vs. non-production releases through the semantic version, but from the perspective of the tool I think any release should be considered equal.
I agree, I think |
Beta Was this translation helpful? Give feedback.
-
Btw, the logic for the pact selectors and can-i-deploy all works exactly the same way it did with tags. It's just a more explicit way of labelling things. |
Beta Was this translation helpful? Give feedback.
-
The Pact Broker now has the concept of "deployed" and "released" versions. A deployed version is "currently deployed" until another version is deployed over it. A released version is "currently supported" until "end support" is called. The CLIs for recording the release and deployment events are documented here: https://docs.pact.io/pact_broker/recording_deployments_and_releases/#recording-releases
An API that has both deployed and released consumer versions (eg. an API that supports a deployed UI and a released CLI, like Pactflow) needs to specify both "currently deployed" and "currently supported" consumer versions.
The selector
{ "currentlyDeployed": true }
for deployed versions is already implemented in the Pact Broker. I am planning on adding{ "currentlySupported": true }
for released versions. I'd like a selector that encompasses both currently deployed and supported in one go, so that there can be one simple recommended way of selecting pacts, regardless of the consumer type. I'm having trouble thinking of a term that clearly infers both though.In real life (ignoring Pact Broker terminology) one could use the term "currently supported versions" to mean "every consumer version in production", however, that (to me) doesn't cover versions deployed to test environments. It's debatable, but I don't think of something in a test environment as being "supported" yet.
I was thinking about
{ "inEnvironment": true }
. That covers all the stages of deployed versions, but a real life "released version" of a piece of software is still technically available in that environment, it's just that a decision has been made that it's no longer supported (eg. Rails v1 is still available for download, but is no longer supported).Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions