Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TT-12965] Fix/improve ctx allocation with clone #6855

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

titpetric
Copy link
Contributor

@titpetric titpetric commented Feb 3, 2025

@titpetric titpetric force-pushed the fix/improve-ctx-allocation-with-clone branch 2 times, most recently from 5833b35 to a1319ec Compare February 3, 2025 19:49
@buger
Copy link
Member

buger commented Feb 3, 2025

A JIRA Issue ID is missing from your branch name, PR title and PR description! 🦄

Your branch: fix/improve-ctx-allocation-with-clone

Your PR title: Fix/improve ctx allocation with clone

Your PR description: null

If this is your first time contributing to this repository - welcome!


Please refer to jira-lint to get started.

Without the JIRA Issue ID in your branch name you would lose out on automatic updates to JIRA via SCM; some GitHub status checks might fail.

Valid sample branch names:

‣ feature/shiny-new-feature--mojo-10'
‣ 'chore/changelogUpdate_mojo-123'
‣ 'bugfix/fix-some-strange-bug_GAL-2345'

Copy link
Contributor

github-actions bot commented Feb 3, 2025

API Changes

--- prev.txt	2025-02-03 20:24:38.038822561 +0000
+++ current.txt	2025-02-03 20:24:33.412831166 +0000
@@ -3240,9 +3240,6 @@
     BuildDefaultTykExtension builds a default tyk extension in *OAS based on
     function arguments.
 
-func (s *OAS) Clone() (*OAS, error)
-    Clone creates a deep copy of the OAS object and returns a new instance.
-
 func (s *OAS) ExtractTo(api *apidef.APIDefinition)
     ExtractTo extracts *OAS into *apidef.APIDefinition.
 
@@ -7015,12 +7012,17 @@
 
 func GetAuthToken(r *http.Request) string
 func GetDefinition(r *http.Request) *apidef.APIDefinition
+    GetDefinition will return a deep copy of the API definition valid for the
+    request.
+
 func GetOASDefinition(r *http.Request) *oas.OAS
-    GetOASDefinition returns a deep copy of the OAS definition of the called
-    API.
+    GetOASDefinition will return a deep copy of the OAS API definition valid for
+    the request.
 
 func GetSession(r *http.Request) *user.SessionState
 func SetDefinition(r *http.Request, s *apidef.APIDefinition)
+    SetDefinition sets an API definition object to the request context.
+
 func SetSession(r *http.Request, s *user.SessionState, scheduleUpdate bool, hashKey ...bool)
 
 TYPES

@titpetric titpetric changed the title Fix/improve ctx allocation with clone [TT-12965] Fix/improve ctx allocation with clone Feb 3, 2025
@TykTechnologies TykTechnologies deleted a comment from buger Feb 3, 2025
@buger
Copy link
Member

buger commented Feb 3, 2025

💔 The detected issue is not in one of the allowed statuses 💔

Detected Status Open
Allowed Statuses In Dev,In Code Review,Ready for Testing,In Test,In Progress,In Review ✔️

Please ensure your jira story is in one of the allowed statuses

ctx/ctx.go Outdated Show resolved Hide resolved
ctx/ctx.go Outdated Show resolved Hide resolved
ctx/ctx.go Outdated Show resolved Hide resolved
Revise godoc comments a bit.
@buger
Copy link
Member

buger commented Feb 3, 2025

💔 The detected issue is not in one of the allowed statuses 💔

Detected Status Open
Allowed Statuses In Dev,In Code Review,Ready for Testing,In Test,In Progress,In Review ✔️

Please ensure your jira story is in one of the allowed statuses

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants