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-7953 use storage library #244

Merged
merged 19 commits into from
Mar 20, 2023
Merged

TT-7953 use storage library #244

merged 19 commits into from
Mar 20, 2023

Conversation

sredxny
Copy link
Contributor

@sredxny sredxny commented Mar 6, 2023

Description

Replaced all the mongo code that was using mgo with the new storage library of tyk. An upgrade of Go is pending to be done

Related Issue

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

Motivation and Context

Be consistent in all the tyk components

How This Has Been Tested

  • Ran TIB
  • Consumed the CRUD endpoints via postman
  • Embeded TIB into the dashboard

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

@sredxny sredxny requested a review from tbuchaillot March 7, 2023 00:01
@sredxny sredxny requested a review from mativm02 March 7, 2023 00:11
@sredxny sredxny requested a review from a team as a code owner March 7, 2023 20:43
go.mod Outdated Show resolved Hide resolved
@github-actions
Copy link

Terraform Format and Style 🖌``

Terraform Initialization ⚙️success

Terraform Plan 📖success

Terraform Validation 🤖success

Show Plan

terraform
Running plan in the remote backend. Output will stream here. Pressing Ctrl-C
will stop streaming the logs, but will not stop the plan running remotely.

Preparing the remote plan...

To view this run in a browser, visit:
https://app.terraform.io/app/Tyk/repo-policy-tyk-identity-broker/runs/run-EJEuUmEivhBxK8mg

Waiting for the plan to start...

Terraform v1.3.8
on linux_amd64
Initializing plugins and modules...
module.tyk-identity-broker.github_repository.repository: Refreshing state... [id=tyk-identity-broker]
module.tyk-identity-broker.github_branch.release_branches["release-1.2"]: Refreshing state... [id=tyk-identity-broker:release-1.2]
module.tyk-identity-broker.github_branch.release_branches["master"]: Refreshing state... [id=tyk-identity-broker:master]
module.tyk-identity-broker.github_branch.release_branches["release-1.3"]: Refreshing state... [id=tyk-identity-broker:release-1.3]
module.tyk-identity-broker.github_branch.default: Refreshing state... [id=tyk-identity-broker:master]
module.tyk-identity-broker.github_branch_protection.automerge["release-1.3"]: Refreshing state... [id=BPR_kwDOAtnrYs4B_GQn]
module.tyk-identity-broker.github_branch_protection.automerge["master"]: Refreshing state... [id=MDIwOkJyYW5jaFByb3RlY3Rpb25SdWxlMTUzMTE5Nzc=]
module.tyk-identity-broker.github_branch_protection.automerge["release-1.2"]: Refreshing state... [id=BPR_kwDOAtnrYs4B_GQp]
module.tyk-identity-broker.github_branch_default.default: Refreshing state... [id=tyk-identity-broker]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # module.tyk-identity-broker.github_branch_protection.automerge["master"] will be updated in-place
  ~ resource "github_branch_protection" "automerge" {
        id                              = "MDIwOkJyYW5jaFByb3RlY3Rpb25SdWxlMTUzMTE5Nzc="
        # (11 unchanged attributes hidden)

      ~ required_status_checks {
          ~ contexts = [
              - "1.15",
              + "1.16",
            ]
            # (1 unchanged attribute hidden)
        }

        # (1 unchanged block hidden)
    }

  # module.tyk-identity-broker.github_branch_protection.automerge["release-1.2"] will be updated in-place
  ~ resource "github_branch_protection" "automerge" {
        id                              = "BPR_kwDOAtnrYs4B_GQp"
        # (11 unchanged attributes hidden)

      ~ required_status_checks {
          ~ contexts = [
              - "1.15",
              + "1.16",
            ]
            # (1 unchanged attribute hidden)
        }

        # (1 unchanged block hidden)
    }

  # module.tyk-identity-broker.github_branch_protection.automerge["release-1.3"] will be updated in-place
  ~ resource "github_branch_protection" "automerge" {
        id                              = "BPR_kwDOAtnrYs4B_GQn"
        # (11 unchanged attributes hidden)

      ~ required_status_checks {
          ~ contexts = [
              - "1.15",
              + "1.16",
            ]
            # (1 unchanged attribute hidden)
        }

        # (1 unchanged block hidden)
    }

Plan: 0 to add, 3 to change, 0 to destroy.


Pushed by: @sredxny, Action: pull_request

Copy link
Contributor

@mativm02 mativm02 left a comment

Choose a reason for hiding this comment

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

lgtm!

@ermirizio
Copy link
Contributor

@sredxny changes were applied, now 1.13 and master will require workflow 1.16 instead of 1.15. make sure source code changes are ported to 1.13, ci changes will be taken care by sync automation, watch for a new PR being opened after you merge to master

@github-actions
Copy link

Terraform Format and Style 🖌``

Terraform Initialization ⚙️success

Terraform Plan 📖success

Terraform Validation 🤖success

Show Plan

terraform
Running plan in the remote backend. Output will stream here. Pressing Ctrl-C
will stop streaming the logs, but will not stop the plan running remotely.

Preparing the remote plan...

To view this run in a browser, visit:
https://app.terraform.io/app/Tyk/repo-policy-tyk-identity-broker/runs/run-KxcTkhGPU8uqsT5A

Waiting for the plan to start...

Terraform v1.3.8
on linux_amd64
Initializing plugins and modules...
module.tyk-identity-broker.github_repository.repository: Refreshing state... [id=tyk-identity-broker]
module.tyk-identity-broker.github_branch.default: Refreshing state... [id=tyk-identity-broker:master]
module.tyk-identity-broker.github_branch.release_branches["master"]: Refreshing state... [id=tyk-identity-broker:master]
module.tyk-identity-broker.github_branch.release_branches["release-1.2"]: Refreshing state... [id=tyk-identity-broker:release-1.2]
module.tyk-identity-broker.github_branch.release_branches["release-1.3"]: Refreshing state... [id=tyk-identity-broker:release-1.3]
module.tyk-identity-broker.github_branch_protection.automerge["master"]: Refreshing state... [id=MDIwOkJyYW5jaFByb3RlY3Rpb25SdWxlMTUzMTE5Nzc=]
module.tyk-identity-broker.github_branch_protection.automerge["release-1.2"]: Refreshing state... [id=BPR_kwDOAtnrYs4B_GQp]
module.tyk-identity-broker.github_branch_protection.automerge["release-1.3"]: Refreshing state... [id=BPR_kwDOAtnrYs4B_GQn]
module.tyk-identity-broker.github_branch_default.default: Refreshing state... [id=tyk-identity-broker]

No changes. Your infrastructure matches the configuration.

Terraform has compared your real infrastructure against your configuration
and found no differences, so no changes are needed.

Pushed by: @sredxny, Action: pull_request

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

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

No Coverage information No Coverage information
0.0% 0.0% Duplication

@sredxny sredxny merged commit 1c25e92 into master Mar 20, 2023
@sredxny sredxny deleted the TT-7953-use-storage-library branch March 20, 2023 15:20
@sredxny
Copy link
Contributor Author

sredxny commented Mar 20, 2023

/release to release-1.4

@tykbot
Copy link

tykbot bot commented Mar 20, 2023

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

@tykbot
Copy link

tykbot bot commented Mar 20, 2023

@sredxny Succesfully merged PR

tykbot bot pushed a commit that referenced this pull request Mar 20, 2023
* Integrated the storage library

(cherry picked from commit 1c25e92)
buger added a commit that referenced this pull request Mar 20, 2023
TT-7953 use storage library (#244)

* Integrated the storage library
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