Skip to content

Only allow creating hotfix branches from a tag#8297

Merged
andrewlock merged 1 commit into
masterfrom
andrew/only-hotfix-from-tags
Mar 16, 2026
Merged

Only allow creating hotfix branches from a tag#8297
andrewlock merged 1 commit into
masterfrom
andrew/only-hotfix-from-tags

Conversation

@andrewlock

Copy link
Copy Markdown
Member

Summary of changes

Ensures you're creating a hotfix branch from a tag

Reason for change

The "correct" usage is to create a hotfix from a previous normal release, or from a previous hotfix. The easy way to enforce that is to ensure you create from a tag

Implementation details

Check the reference passed in, like we do for other workflows

Test coverage

Tested it here and it failed (as expected).

@andrewlock
andrewlock requested a review from a team as a code owner March 12, 2026 13:53
@andrewlock andrewlock added the area:builds project files, build scripts, pipelines, versioning, releases, packages label Mar 12, 2026

@bouwkast bouwkast left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 😄

steps:
- name: Verify running from a tag
run: |
if [[ "${{ github.ref }}" != refs/tags/* ]]; then

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just remembered, I think we are supposed to make the github.ref an ENV_VAR like in this PR #7599

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, well remembered... I actually think it's fine, seeing as this isn't triggered automatically by an action like the one fixed in that PR (that one is triggered on PR close, so is fundamentally user controlled, this one can only be manually triggered). If it was an issue, I'm pretty sure they would have flagged our release workflows too 🙂

I mean, I'm making excuses not to make changes, maybe I should just do it 😂

@andrewlock
andrewlock force-pushed the andrew/only-hotfix-from-tags branch from 29c9eb2 to 3d78450 Compare March 16, 2026 10:12
@pr-commenter

pr-commenter Bot commented Mar 16, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-03-16 10:54:08

Comparing candidate commit 3d78450 in PR branch andrew/only-hotfix-from-tags with baseline commit 7a65d1a in branch master.

Found 9 performance improvements and 4 performance regressions! Performance is the same for 157 metrics, 22 unstable metrics.

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net6.0

  • 🟩 execution_time [-80.287ms; -80.131ms] or [-39.464%; -39.387%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody net6.0

  • 🟩 execution_time [-22.818ms; -19.292ms] or [-10.395%; -8.789%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody netcoreapp3.1

  • 🟩 execution_time [-20.027ms; -14.171ms] or [-9.329%; -6.602%]

scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark netcoreapp3.1

  • 🟥 throughput [-385.326op/s; -203.206op/s] or [-18.411%; -9.709%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net6.0

  • 🟩 execution_time [-109.857ms; -108.135ms] or [-54.864%; -54.004%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 throughput [-189.918op/s; -106.296op/s] or [-16.894%; -9.456%]

scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice netcoreapp3.1

  • 🟥 throughput [-210.048op/s; -163.101op/s] or [-39.016%; -30.295%]

scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool net6.0

  • 🟩 execution_time [-61.723µs; -56.570µs] or [-5.499%; -5.040%]
  • 🟩 throughput [+47.325op/s; +51.811op/s] or [+5.312%; +5.816%]

scenario:Benchmarks.Trace.DbCommandBenchmark.ExecuteNonQuery net6.0

  • 🟩 execution_time [-14.716ms; -11.493ms] or [-6.937%; -5.417%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+14.844ms; +18.686ms] or [+8.000%; +10.070%]

scenario:Benchmarks.Trace.NLogBenchmark.EnrichedLog net6.0

  • 🟩 throughput [+12278.357op/s; +15823.830op/s] or [+6.491%; +8.366%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore netcoreapp3.1

  • 🟩 throughput [+15062718.350op/s; +16037970.402op/s] or [+6.673%; +7.105%]

@andrewlock
andrewlock merged commit 46f950d into master Mar 16, 2026
98 of 101 checks passed
@andrewlock
andrewlock deleted the andrew/only-hotfix-from-tags branch March 16, 2026 11:52
@github-actions github-actions Bot added this to the vNext-v3 milestone Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:builds project files, build scripts, pipelines, versioning, releases, packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants