Fix release pipelines to pick up latest Go patch TT-16060#7512
Fix release pipelines to pick up latest Go patch TT-16060#7512Razeen-Abdal-Rahman wants to merge 23 commits intomasterfrom
Conversation
|
API Changes --- prev.txt 2025-11-10 15:34:03.828324448 +0000
+++ current.txt 2025-11-10 15:33:54.183317709 +0000
@@ -128,8 +128,6 @@
ErrUpstreamOAuthAuthorizationTypeRequired = errors.New("upstream OAuth authorization type is required")
// ErrInvalidUpstreamOAuthAuthorizationType is the error to return when configured OAuth authorization type is invalid.
ErrInvalidUpstreamOAuthAuthorizationType = errors.New("invalid OAuth authorization type")
- // ErrAllLoadBalancingTargetsZeroWeight is the error to return when all load balancing targets have weight 0.
- ErrAllLoadBalancingTargetsZeroWeight = errors.New("all load balancing targets have weight 0, at least one target must have weight > 0")
)
var DefaultValidationRuleSet = ValidationRuleSet{
&RuleUniqueDataSourceNames{},
@@ -137,7 +135,6 @@
&RuleValidateIPList{},
&RuleValidateEnforceTimeout{},
&RuleUpstreamAuth{},
- &RuleLoadBalancingTargets{},
}
var ErrAllAuthSourcesDisabled = "all auth sources are disabled for %s, at least one of header/cookie/query must be enabled"
var ErrDuplicateDataSourceName = errors.New("duplicate data source names are not allowed")
@@ -323,21 +320,6 @@
func (a *APIDefinition) GetScopeToPolicyMapping() map[string]string
-func (a *APIDefinition) IsBaseAPI() bool
- IsBaseAPI returns true if this API is a base API with child versions.
- A base API is identified by having versions defined and either no BaseID or
- BaseID equal to its own APIID.
-
-func (a *APIDefinition) IsBaseAPIWithVersioning() bool
- IsBaseAPIWithVersioning returns true if this API is a base API with
- versioning explicitly enabled. This is similar to IsBaseAPI but additionally
- requires versioning to be enabled and have a version name.
-
-func (a *APIDefinition) IsChildAPI() bool
- IsChildAPI returns true if this API is a child API in a versioning
- hierarchy. A child API is identified by having a BaseID that differs from
- its own APIID.
-
func (a *APIDefinition) Migrate() (versions []APIDefinition, err error)
func (a *APIDefinition) MigrateAuthentication()
@@ -1245,14 +1227,6 @@
func (r *RuleAtLeastEnableOneAuthSource) Validate(apiDef *APIDefinition, validationResult *ValidationResult)
-type RuleLoadBalancingTargets struct{}
- RuleLoadBalancingTargets implements validations for load balancing target
- configurations.
-
-func (r *RuleLoadBalancingTargets) Validate(apiDef *APIDefinition, validationResult *ValidationResult)
- Validate validates that when load balancing is enabled, at least one target
- has weight > 0.
-
type RuleUniqueDataSourceNames struct{}
func (r *RuleUniqueDataSourceNames) Validate(apiDef *APIDefinition, validationResult *ValidationResult)
@@ -2097,16 +2071,6 @@
ExampleExtractor returns an example payload according to the
openapi3.SchemaRef object.
-func ExtractUserServers(
- existingServers openapi3.Servers,
- apiDef *apidef.APIDefinition,
- baseAPI *apidef.APIDefinition,
- config ServerRegenerationConfig,
- versionName string,
-) (openapi3.Servers, error)
- ExtractUserServers extracts user provided servers from an existing OAS API
- by regenerating what the Tyk servers should be and filtering them out.
-
func GetDefaultSecurityProcessingMode() string
GetDefaultSecurityProcessingMode returns the default security processing
mode.
@@ -2123,29 +2087,10 @@
it fills an OAS with it. To be able to make it a valid OAS, it adds some
required fields. It returns base API and its versions if any.
-func ShouldUpdateChildAPIs(newAPI, oldAPI *apidef.APIDefinition) bool
- ShouldUpdateChildAPIs checks if child APIs need server updates after a base
- API change.
-
- Configuration changes that trigger child API updates: - Versioning method
- changed (url/url-param/header) - Versioning key changed (parameter/header
- name) - Base API's listen path changed - FallbackToDefault setting changed
- (affects fallback URL generation) - Default version changed (affects which
- child is the default)
-
-func ShouldUpdateOldDefaultChild(
- setDefault bool,
- oldDefaultVersion string,
- newDefaultVersion string,
-) bool
- ShouldUpdateOldDefaultChild determines if the old default child API needs
- server regeneration when creating a new child version with set_default=true.
- This is necessary to remove the fallback URL from the old default child
- since it's no longer the default.
-
- Returns true when: - A new version is being set as default (setDefault=true)
- - There was a previous default version - The default version actually
- changed - The old default wasn't the base API itself ("Self")
+func RetainOldServerURL(oldServers, newServers openapi3.Servers) openapi3.Servers
+ RetainOldServerURL retains the first entry from old servers provided
+ tyk adds a server URL to the start of oas.Servers to add the gw URL
+ RetainOldServerURL can be used when API def is patched.
func ValidateOASObject(documentBody []byte, oasVersion string) error
ValidateOASObject validates an OAS document against a particular OAS
@@ -2850,14 +2795,6 @@
DomainToCertificate holds a single mapping of domain name into a
certificate.
-type EdgeEndpoint struct {
- // Endpoint is the edge gateway URL (e.g., "http://edge1.example.com").
- Endpoint string
- // Tags are the tags associated with this edge gateway.
- Tags []string
-}
- EdgeEndpoint represents an edge gateway endpoint configuration.
-
type EndpointPostPlugin struct {
// Enabled activates post plugin.
//
@@ -3800,21 +3737,6 @@
any logic to ensure the Tyk oas API is backwards compatible with previous
versions of the gateway should be placed in here.
-func (s *OAS) RegenerateServers(
- newAPIData *apidef.APIDefinition,
- oldAPIData *apidef.APIDefinition,
- newBaseAPI *apidef.APIDefinition,
- oldBaseAPI *apidef.APIDefinition,
- config ServerRegenerationConfig,
- versionName string,
-) error
- RegenerateServers updates the servers section of an OAS API definition
- 1. Computes old Tyk-generated servers from oldAPIData state (if provided)
- 2. Removes old Tyk servers from the OAS spec
- 3. Generates new Tyk servers based on newAPIData configuration
- 4. Merges them: Tyk servers first, then user servers
- 5. Deduplicates by normalized URL
-
func (s *OAS) RemoveServer(serverUrl string) error
RemoveServer removes the server from the server list if it's
already present. It accepts regex-based server URLs, such as
@@ -4503,17 +4425,6 @@
func (s *Server) Fill(api apidef.APIDefinition)
Fill fills *Server from apidef.APIDefinition.
-type ServerRegenerationConfig struct {
- // Protocol is the URL scheme (http:// or https://).
- Protocol string
- // DefaultHost is the default gateway host (e.g., "localhost:8080").
- DefaultHost string
- // EdgeEndpoints contains edge gateway configurations.
- EdgeEndpoints []EdgeEndpoint
-}
- ServerRegenerationConfig holds the configuration required for server URL
- regeneration.
-
type ServiceDiscovery struct {
// Enabled activates Service Discovery.
// |
🔍 Code Analysis ResultsThis PR updates the Go version used in release pipelines to In addition to the version bump, this PR introduces several other significant changes:
Files Changed AnalysisThe changes are concentrated in CI/CD and build configuration files:
Architecture & Impact Assessment
Scope Discovery & Context Expansion
Metadata
Powered by Visor from Probelabs Last updated: 2025-11-10T15:44:51.452Z | Triggered by: synchronize | Commit: a0e1395 💡 TIP: You can chat with Visor using |
🔍 Code Analysis ResultsSecurity Issues (2)
✅ Architecture Check PassedNo architecture issues found – changes LGTM. Performance Issues (1)
Quality Issues (3)
✅ Dependency Check PassedNo dependency issues found – changes LGTM. ✅ Connectivity Check PassedNo connectivity issues found – changes LGTM. Powered by Visor from Probelabs Last updated: 2025-11-10T15:44:52.686Z | Triggered by: synchronize | Commit: a0e1395 💡 TIP: You can chat with Visor using |
Co-authored-by: Gromit <policy@gromit>
Co-authored-by: Gromit <policy@gromit>
Co-authored-by: Gromit <policy@gromit>
🎯 Recommended Merge TargetsBased on JIRA ticket TT-16060: Fix release pipelines to pick up latest Go patch Fix Version: Tyk 5.10.1Required:
📋 Workflow
|
|



User description
Go version for release pipelines updated to 1.24-bookworm.
Other changes from gromit carried over:
.github/workflows/release.ymlupgrade tests (logic added for handling scenarios where no previous version is available, used for new product launches) and steps to push docker images for fipsci/Dockerfileupdated to fix bugs when building locallyci/goreleaser/goreleaser.ymlproperly imports env value for fips and adds docker builds to goreleaser for local testing, these are skipped in pipeline runsci/install/post_install.shfix reversed logic and add handling if config file doesn't existDescription
All versions of golang in the
relese.ymlfile have been updated from1.24-bullseyeto1.24-bookwormRelated Issue
Jira ticket: TT-16060
Motivation and Context
This update is required so the CI pipeline can pick up the latest Go patch, which addresses newly reported CVEs in
stdlibTypes of changes
Checklist
Ticket Details
TT-16060
Generated at: 2025-11-10 15:33:45