Skip to content

[TT-11452] remove unused migrate func#6117

Merged
jeffy-mathew merged 1 commit into
masterfrom
chore/TT-11452/remove-unused-migrate-func
Mar 7, 2024
Merged

[TT-11452] remove unused migrate func#6117
jeffy-mathew merged 1 commit into
masterfrom
chore/TT-11452/remove-unused-migrate-func

Conversation

@jeffy-mathew

@jeffy-mathew jeffy-mathew commented Mar 7, 2024

Copy link
Copy Markdown
Contributor

User description

Description

remove unused migrate func

Related Issue

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

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

  • I ensured that the documentation is up to date
  • I explained why this PR updates go.mod in detail with reasoning why it's required
  • I would like a code coverage CI quality gate exception and have explained why

Type

enhancement


Description

  • Removed an unused Migrate method from PrePlugin struct to clean up the codebase. This contributes to maintaining a cleaner and more maintainable codebase.

Changes walkthrough

Relevant files
Enhancement
middleware.go
Remove Unused `Migrate` Function in `PrePlugin`                   

apidef/oas/middleware.go

  • Removed the unused Migrate function from the PrePlugin struct.
+0/-4     

PR-Agent usage:
Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

@jeffy-mathew
jeffy-mathew enabled auto-merge (squash) March 7, 2024 11:55
@github-actions

github-actions Bot commented Mar 7, 2024

Copy link
Copy Markdown
Contributor

PR Description updated to latest commit (c528f55)

@github-actions

github-actions Bot commented Mar 7, 2024

Copy link
Copy Markdown
Contributor

PR Review

⏱️ Estimated effort to review [1-5]

1, because the PR involves a straightforward removal of an unused function. The change is localized and does not seem to involve complex logic or dependencies that would require a deep dive.

🧪 Relevant tests

No

🔍 Possible issues

No

🔒 Security concerns

No

Code feedback:

✨ Review tool usage guide:

Overview:
The review tool scans the PR code changes, and generates a PR review. The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on any PR.
When commenting, to edit configurations related to the review tool (pr_reviewer section), use the following template:

/review --pr_reviewer.some_config1=... --pr_reviewer.some_config2=...

With a configuration file, use the following template:

[pr_reviewer]
some_config1=...
some_config2=...
Utilizing extra instructions

The review tool can be configured with extra instructions, which can be used to guide the model to a feedback tailored to the needs of your project.

Be specific, clear, and concise in the instructions. With extra instructions, you are the prompter. Specify the relevant sub-tool, and the relevant aspects of the PR that you want to emphasize.

Examples for extra instructions:

[pr_reviewer] # /review #
extra_instructions="""
In the 'possible issues' section, emphasize the following:
- Does the code logic cover relevant edge cases?
- Is the code logic clear and easy to understand?
- Is the code logic efficient?
...
"""

Use triple quotes to write multi-line instructions. Use bullet points to make the instructions more readable.

How to enable\disable automation
  • When you first install PR-Agent app, the default mode for the review tool is:
pr_commands = ["/review", ...]

meaning the review tool will run automatically on every PR, with the default configuration.
Edit this field to enable/disable the tool, or to change the used configurations

Auto-labels

The review tool can auto-generate two specific types of labels for a PR:

  • a possible security issue label, that detects possible security issues (enable_review_labels_security flag)
  • a Review effort [1-5]: x label, where x is the estimated effort to review the PR (enable_review_labels_effort flag)
Extra sub-tools

The review tool provides a collection of possible feedbacks about a PR.
It is recommended to review the possible options, and choose the ones relevant for your use case.
Some of the feature that are disabled by default are quite useful, and should be considered for enabling. For example:
require_score_review, require_soc2_ticket, and more.

Auto-approve PRs

By invoking:

/review auto_approve

The tool will automatically approve the PR, and add a comment with the approval.

To ensure safety, the auto-approval feature is disabled by default. To enable auto-approval, you need to actively set in a pre-defined configuration file the following:

[pr_reviewer]
enable_auto_approval = true

(this specific flag cannot be set with a command line argument, only in the configuration file, committed to the repository)

You can also enable auto-approval only if the PR meets certain requirements, such as that the estimated_review_effort is equal or below a certain threshold, by adjusting the flag:

[pr_reviewer]
maximal_review_effort = 5
More PR-Agent commands

To invoke the PR-Agent, add a comment using one of the following commands:

  • /review: Request a review of your Pull Request.
  • /describe: Update the PR title and description based on the contents of the PR.
  • /improve [--extended]: Suggest code improvements. Extended mode provides a higher quality feedback.
  • /ask <QUESTION>: Ask a question about the PR.
  • /update_changelog: Update the changelog based on the PR's contents.
  • /add_docs 💎: Generate docstring for new components introduced in the PR.
  • /generate_labels 💎: Generate labels for the PR based on the PR's contents.
  • /analyze 💎: Automatically analyzes the PR, and presents changes walkthrough for each component.

See the tools guide for more details.
To list the possible configuration parameters, add a /config comment.

See the review usage page for a comprehensive guide on using this tool.

@github-actions

github-actions Bot commented Mar 7, 2024

Copy link
Copy Markdown
Contributor

API Changes

--- prev.txt	2024-03-07 20:44:11.681427931 +0000
+++ current.txt	2024-03-07 20:44:08.853431719 +0000
@@ -3652,8 +3652,6 @@
 func (p *PrePlugin) Fill(api apidef.APIDefinition)
     Fill fills PrePlugin from supplied Tyk classic api definition.
 
-func (p *PrePlugin) Migrate() CustomPlugins
-
 type Provider struct {
 	// Issuer contains a validation value for the issuer claim, usually a domain name e.g. `accounts.google.com` or similar.
 	Issuer string `bson:"issuer,omitempty" json:"issuer,omitempty"`

@github-actions

github-actions Bot commented Mar 7, 2024

Copy link
Copy Markdown
Contributor

PR Code Suggestions

No code suggestions found for PR.

@buger

buger commented Mar 7, 2024

Copy link
Copy Markdown
Member

API tests result - mongo44-sha256 env: success
Branch used: refs/heads/master
Commit: 0497abf TT-11452 remove unused migrate func (#6117)

Description

remove unused migrate func

Related Issue

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

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

  • I ensured that the documentation is up to date
  • I explained why this PR updates go.mod in detail with reasoning
    why it's required
  • I would like a code coverage CI quality gate exception and have
    explained why
    Triggered by: push (@jeffy-mathew)
    Execution page

@buger

buger commented Mar 7, 2024

Copy link
Copy Markdown
Member

API tests result - postgres15-sha256 env: success
Branch used: refs/heads/master
Commit: 0497abf TT-11452 remove unused migrate func (#6117)

Description

remove unused migrate func

Related Issue

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

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

  • I ensured that the documentation is up to date
  • I explained why this PR updates go.mod in detail with reasoning
    why it's required
  • I would like a code coverage CI quality gate exception and have
    explained why
    Triggered by: push (@jeffy-mathew)
    Execution page

@sonarqubecloud

sonarqubecloud Bot commented Mar 7, 2024

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@jeffy-mathew
jeffy-mathew force-pushed the chore/TT-11452/remove-unused-migrate-func branch from ae9b56a to e9aa589 Compare March 7, 2024 20:43
@sonarqubecloud

sonarqubecloud Bot commented Mar 7, 2024

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@jeffy-mathew
jeffy-mathew merged commit 0497abf into master Mar 7, 2024
@jeffy-mathew
jeffy-mathew deleted the chore/TT-11452/remove-unused-migrate-func branch March 7, 2024 21:08
@buger

buger commented Mar 7, 2024

Copy link
Copy Markdown
Member

API tests result - postgres15-murmur64 env: success
Branch used: refs/heads/master
Commit: 0497abf TT-11452 remove unused migrate func (#6117)

Description

remove unused migrate func

Related Issue

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

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

  • I ensured that the documentation is up to date
  • I explained why this PR updates go.mod in detail with reasoning
    why it's required
  • I would like a code coverage CI quality gate exception and have
    explained why
    Triggered by: push (@jeffy-mathew)
    Execution page

@buger

buger commented Mar 7, 2024

Copy link
Copy Markdown
Member

API tests result - mongo44-murmur64 env: success
Branch used: refs/heads/master
Commit: 0497abf TT-11452 remove unused migrate func (#6117)

Description

remove unused migrate func

Related Issue

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

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

  • I ensured that the documentation is up to date
  • I explained why this PR updates go.mod in detail with reasoning
    why it's required
  • I would like a code coverage CI quality gate exception and have
    explained why
    Triggered by: push (@jeffy-mathew)
    Execution page

@jeffy-mathew

Copy link
Copy Markdown
Contributor Author

/release to release-5.3

@jeffy-mathew

Copy link
Copy Markdown
Contributor Author

/release to release-5.3.0

@tykbot

tykbot Bot commented Mar 8, 2024

Copy link
Copy Markdown

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

1 similar comment
@tykbot

tykbot Bot commented Mar 8, 2024

Copy link
Copy Markdown

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

tykbot Bot pushed a commit that referenced this pull request Mar 8, 2024
<!-- Provide a general summary of your changes in the Title above -->

## Description

remove unused migrate func

## Related Issue
https://tyktech.atlassian.net/browse/TT-11452

## Motivation and Context

<!-- Why is this change required? What problem does it solve? -->

## How This Has Been Tested

<!-- Please describe in detail how you tested your changes -->
<!-- Include details of your testing environment, and the tests -->
<!-- you ran to see how your change affects other areas of the code,
etc. -->
<!-- This information is helpful for reviewers and QA. -->

## Screenshots (if appropriate)

## Types of changes

<!-- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->

- [ ] 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

<!-- Go over all the following points, and put an `x` in all the boxes
that apply -->
<!-- If there are no documentation updates required, mark the item as
checked. -->
<!-- Raise up any additional concerns not covered by the checklist. -->

- [ ] I ensured that the documentation is up to date
- [ ] I explained why this PR updates go.mod in detail with reasoning
why it's required
- [ ] I would like a code coverage CI quality gate exception and have
explained why

(cherry picked from commit 0497abf)
buger added a commit that referenced this pull request Mar 8, 2024
[TT-11452] remove unused migrate func (#6117)

<!-- Provide a general summary of your changes in the Title above -->

## Description

remove unused migrate func

## Related Issue
https://tyktech.atlassian.net/browse/TT-11452

## Motivation and Context

<!-- Why is this change required? What problem does it solve? -->

## How This Has Been Tested

<!-- Please describe in detail how you tested your changes -->
<!-- Include details of your testing environment, and the tests -->
<!-- you ran to see how your change affects other areas of the code,
etc. -->
<!-- This information is helpful for reviewers and QA. -->

## Screenshots (if appropriate)

## Types of changes

<!-- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->

- [ ] 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

<!-- Go over all the following points, and put an `x` in all the boxes
that apply -->
<!-- If there are no documentation updates required, mark the item as
checked. -->
<!-- Raise up any additional concerns not covered by the checklist. -->

- [ ] I ensured that the documentation is up to date
- [ ] I explained why this PR updates go.mod in detail with reasoning
why it's required
- [ ] I would like a code coverage CI quality gate exception and have
explained why
@tykbot

tykbot Bot commented Mar 8, 2024

Copy link
Copy Markdown

@jeffy-mathew Succesfully merged PR

tykbot Bot pushed a commit that referenced this pull request Mar 8, 2024
<!-- Provide a general summary of your changes in the Title above -->

## Description

remove unused migrate func

## Related Issue
https://tyktech.atlassian.net/browse/TT-11452

## Motivation and Context

<!-- Why is this change required? What problem does it solve? -->

## How This Has Been Tested

<!-- Please describe in detail how you tested your changes -->
<!-- Include details of your testing environment, and the tests -->
<!-- you ran to see how your change affects other areas of the code,
etc. -->
<!-- This information is helpful for reviewers and QA. -->

## Screenshots (if appropriate)

## Types of changes

<!-- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->

- [ ] 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

<!-- Go over all the following points, and put an `x` in all the boxes
that apply -->
<!-- If there are no documentation updates required, mark the item as
checked. -->
<!-- Raise up any additional concerns not covered by the checklist. -->

- [ ] I ensured that the documentation is up to date
- [ ] I explained why this PR updates go.mod in detail with reasoning
why it's required
- [ ] I would like a code coverage CI quality gate exception and have
explained why

(cherry picked from commit 0497abf)
@tykbot

tykbot Bot commented Mar 8, 2024

Copy link
Copy Markdown

Still working...

buger added a commit that referenced this pull request Mar 8, 2024
[TT-11452] remove unused migrate func (#6117)

<!-- Provide a general summary of your changes in the Title above -->

## Description

remove unused migrate func

## Related Issue
https://tyktech.atlassian.net/browse/TT-11452

## Motivation and Context

<!-- Why is this change required? What problem does it solve? -->

## How This Has Been Tested

<!-- Please describe in detail how you tested your changes -->
<!-- Include details of your testing environment, and the tests -->
<!-- you ran to see how your change affects other areas of the code,
etc. -->
<!-- This information is helpful for reviewers and QA. -->

## Screenshots (if appropriate)

## Types of changes

<!-- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->

- [ ] 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

<!-- Go over all the following points, and put an `x` in all the boxes
that apply -->
<!-- If there are no documentation updates required, mark the item as
checked. -->
<!-- Raise up any additional concerns not covered by the checklist. -->

- [ ] I ensured that the documentation is up to date
- [ ] I explained why this PR updates go.mod in detail with reasoning
why it's required
- [ ] I would like a code coverage CI quality gate exception and have
explained why
@tykbot

tykbot Bot commented Mar 8, 2024

Copy link
Copy Markdown

@jeffy-mathew Succesfully merged PR

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.

3 participants