MCPcopy Create free account
hub / github.com/github/gh-aw / getAWFVersionForSetup

Function getAWFVersionForSetup

pkg/workflow/compiler_yaml_lookups.go:56–68  ·  view source on GitHub ↗

getAWFVersionForSetup returns the AWF runtime version to inject as GH_AW_INFO_AWF_VERSION in setup steps so all job-local OTel spans can attribute telemetry to the firewall runtime that executed the job.

(data *WorkflowData)

Source from the content-addressed store, hash-verified

54// GH_AW_INFO_AWF_VERSION in setup steps so all job-local OTel spans can
55// attribute telemetry to the firewall runtime that executed the job.
56func getAWFVersionForSetup(data *WorkflowData) string {
57 if data == nil {
58 return ""
59 }
60 firewallConfig := getFirewallConfig(data)
61 if firewallConfig == nil || !firewallConfig.Enabled {
62 return ""
63 }
64 if firewallConfig.Version != "" {
65 return firewallConfig.Version
66 }
67 return string(constants.DefaultFirewallVersion)
68}
69
70// getInstallationVersion returns the version that will be installed for the given engine.
71// This matches the logic in BuildStandardNpmEngineInstallSteps.

Calls 1

getFirewallConfigFunction · 0.85

Tested by

no test coverage detected