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-1740 Adding fallback scenario for ctx Get Apidef and Session #3875

Merged
merged 8 commits into from
Feb 16, 2022

Conversation

tbuchaillot
Copy link
Contributor

@tbuchaillot tbuchaillot commented Feb 7, 2022

Description

Adding a fallback scenario to avoid panics in plugin developments where the plugin compiler has missversion.
This

Related Issue

https://tyktech.atlassian.net/browse/TT-1740

Motivation and Context

How This Has Been Tested

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Refactoring or add test (improvements in base code or adds test coverage to functionality)

Checklist

  • Make sure you are requesting to pull a topic/feature/bugfix branch (right side). If pulling from your own
    fork, don't request your master!
  • Make sure you are making a pull request against the master branch (left side). Also, you should start
    your branch off our latest master.
  • My change requires a change to the documentation.
    • If you've changed APIs, describe what needs to be updated in the documentation.
    • If new config option added, ensure that it can be set via ENV variable
  • I have updated the documentation accordingly.
  • Modules and vendor dependencies have been updated; run go mod tidy && go mod vendor
  • When updating library version must provide reason/explanation for this update.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • Check your code additions will not fail linting checks:
    • go fmt -s
    • go vet

@Tyk-ITS
Copy link
Contributor

Tyk-ITS commented Feb 7, 2022

API tests result: success
Branch used: refs/pull/3875/merge
Commit:
Triggered by: pull_request (@tbuchaillot)
Execution page

@Tyk-ITS
Copy link
Contributor

Tyk-ITS commented Feb 7, 2022

API tests result: success
Branch used: refs/pull/3875/merge
Commit: 81b6c72
Triggered by: pull_request (@tbuchaillot)
Execution page

@sredxny
Copy link
Contributor

sredxny commented Feb 9, 2022

@tbuchaillot if this doesn't panic how will the user know that its a compiler version issue?does this display any log?

@tbuchaillot
Copy link
Contributor Author

@tbuchaillot if this doesn't panic how will the user know that its a compiler version issue?does this display any log?

@sredxny I added a log but it shouldn't happen. It's just a fallback scenario based on #3612 (comment) workaround for when this error was present.
The original issue was solved in #3750 and #3820

@Tyk-ITS
Copy link
Contributor

Tyk-ITS commented Feb 9, 2022

API tests result: success
Branch used: refs/pull/3875/merge
Commit: 96ebee6
Triggered by: pull_request (@tbuchaillot)
Execution page

@Tyk-ITS
Copy link
Contributor

Tyk-ITS commented Feb 9, 2022

API tests result: success
Branch used: refs/pull/3875/merge
Commit: 5662c25
Triggered by: pull_request (@tbuchaillot)
Execution page

Copy link
Contributor

@sredxny sredxny left a comment

Choose a reason for hiding this comment

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

lgtm

@tbuchaillot tbuchaillot changed the title Adding fallback scenario for ctx Get Apidef and Session TT-1740 Adding fallback scenario for ctx Get Apidef and Session Feb 9, 2022
@Tyk-ITS
Copy link
Contributor

Tyk-ITS commented Feb 11, 2022

API tests result: success
Branch used: refs/pull/3875/merge
Commit: b3a90b4
Triggered by: pull_request (@tbuchaillot)
Execution page

Copy link
Contributor

@matiasinsaurralde matiasinsaurralde left a comment

Choose a reason for hiding this comment

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

Looks good

@Tyk-ITS
Copy link
Contributor

Tyk-ITS commented Feb 15, 2022

API tests result: skipped 🚫
Branch used: refs/pull/3875/merge
Commit: 5ccee19
Triggered by: pull_request (@tbuchaillot)
Execution page

2 similar comments
@Tyk-ITS
Copy link
Contributor

Tyk-ITS commented Feb 15, 2022

API tests result: skipped 🚫
Branch used: refs/pull/3875/merge
Commit: 5ccee19
Triggered by: pull_request (@tbuchaillot)
Execution page

@Tyk-ITS
Copy link
Contributor

Tyk-ITS commented Feb 16, 2022

API tests result: skipped 🚫
Branch used: refs/pull/3875/merge
Commit: 5ccee19
Triggered by: pull_request (@tbuchaillot)
Execution page

@sonarcloud
Copy link

sonarcloud bot commented Feb 16, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@Tyk-ITS
Copy link
Contributor

Tyk-ITS commented Feb 16, 2022

API tests result: skipped 🚫
Branch used: refs/pull/3875/merge
Commit: d9c2517
Triggered by: pull_request (@tbuchaillot)
Execution page

@tbuchaillot tbuchaillot merged commit 44d50eb into master Feb 16, 2022
@tbuchaillot tbuchaillot deleted the bugfix/plugin-ctx-get branch February 16, 2022 10:47
@tbuchaillot
Copy link
Contributor Author

/release to release-4

@Tyk-ITS
Copy link
Contributor

Tyk-ITS commented Feb 16, 2022

API tests result: skipped 🚫
Branch used: refs/heads/master
Commit: 44d50eb TT-1740 Adding fallback scenario for ctx Get Apidef and Session (#3875)

  • adding fallback scenario for missversions in ctx Apidef and Session

  • Adding test to check go plugin API ctx

  • adding log in unmarshalling
    Triggered by: push (@tbuchaillot)
    Execution page

@tbuchaillot
Copy link
Contributor Author

/release to release-4

@tykbot
Copy link

tykbot bot commented Feb 16, 2022

Working on it! Note that it can take a few minutes.

@tykbot
Copy link

tykbot bot commented Feb 16, 2022

@tbuchaillot Succesfully merged 44d50ebeef73dfcd351a30551d23e99719770263 to release-4 branch.

tykbot bot pushed a commit that referenced this pull request Feb 16, 2022
* adding fallback scenario for missversions in ctx Apidef and Session

* Adding test to check go plugin API ctx

* adding log in unmarshalling

(cherry picked from commit 44d50eb)
@tbuchaillot
Copy link
Contributor Author

/release to release-4-lts

@tykbot
Copy link

tykbot bot commented Feb 16, 2022

Working on it! Note that it can take a few minutes.

tykbot bot pushed a commit that referenced this pull request Feb 16, 2022
* adding fallback scenario for missversions in ctx Apidef and Session

* Adding test to check go plugin API ctx

* adding log in unmarshalling

(cherry picked from commit 44d50eb)
@tykbot
Copy link

tykbot bot commented Feb 16, 2022

@tbuchaillot Succesfully merged 44d50ebeef73dfcd351a30551d23e99719770263 to release-4-lts branch.

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

Successfully merging this pull request may close these issues.

4 participants