crypto/internal/backend: add deprecation warnings for specific crypto backends#1884
Closed
gdams wants to merge 3 commits intomicrosoft/mainfrom
Closed
crypto/internal/backend: add deprecation warnings for specific crypto backends#1884gdams wants to merge 3 commits intomicrosoft/mainfrom
gdams wants to merge 3 commits intomicrosoft/mainfrom
Conversation
… backends Add deprecation warnings for opensslcrypto, cngcrypto, and darwincrypto GOEXPERIMENT values in CI environments (GitHub Actions and Azure DevOps). These specific backend experiments are deprecated in favor of systemcrypto, which automatically selects the appropriate backend for the target platform. The warnings use CI-specific formats: - GitHub Actions: ::warning:: annotation - Azure DevOps: ##vso[task.logissue type=warning] command Warnings are only emitted when: 1. Running in a detected CI environment 2. The deprecated backend was explicitly specified by the user (not auto-selected by systemcrypto) This helps users migrate away from the specific backend experiments without breaking existing tooling that might parse stdout/stderr, and avoids warning when systemcrypto automatically selects a backend.
Member
Author
0998bf2 to
17a0655
Compare
d6535f5 to
8c2e476
Compare
dagood
requested changes
Sep 24, 2025
Member
dagood
left a comment
There was a problem hiding this comment.
This is better than emitting some unformatted string to stdout, but only because it's more likely to be seen, as far as I can tell. It can still cause breakage:
- It's still something being printed to a std output stream, just in a way that some environments can automatically parse.
- A warning is often considered an error in principle, even if that logic is not directly implemented in AzDO/Actions.
- Arguably it's worse to detect environment because then it's less reproducible. If the output is causing an error in a non-obvious way (e.g. if stderr is parsed by something else, never reported directly and therefore never seen by AzDO/Actions), this could be quite a challenge to debug.
- Or: it might simply show up as an error, which is already bad.
But even without that, I don't think we have justification for removing or even discouraging the old experiment values. What's the problem if people keep using them? Who benefits from this warning?
dagood
reviewed
Sep 24, 2025
| + backend) | ||
| + } | ||
| + // For other environments, we don't emit warnings to avoid breaking | ||
| + // users who might be parsing stdout/stderr |
Member
There was a problem hiding this comment.
I don't think this logic holds: I would expect child processes to inherit the variables, so e.g. even if isAzureDevOps() is true, there might be a wrapper process doing parsing.
Member
Author
|
Closing as we will panic in go 1.27 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Add deprecation warnings for opensslcrypto, cngcrypto, and darwincrypto GOEXPERIMENT values in CI environments (GitHub Actions and Azure DevOps). These specific backend experiments are deprecated in favor of systemcrypto, which automatically selects the appropriate backend for the target platform.
The warnings use CI-specific formats:
Warnings are only emitted when:
This helps users migrate away from the specific backend experiments without breaking existing tooling that might parse stdout/stderr, and avoids warning when systemcrypto automatically selects a backend.
A few test outputs to confirm functionality: