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

DDO-3269: Environment V3 SQL Migrations #356

Merged
merged 23 commits into from
Nov 16, 2023

Conversation

katiewelch
Copy link
Contributor

@katiewelch katiewelch commented Nov 7, 2023

We want to add the environment type to sherlock v3. This PR is doing the database migrations for that table based off of this function from the deprecated model.

Testing
I tested this locally by

  1. starting up my local Sherlock. Doing this will run all the migrations and fail if there are any errors.
    Screenshot 2023-11-07 at 11 28 03 AM

  2. using the golang-migrate/migrate tool to test run my up and down migrations. I used
    migrate -path sherlock/db/migrations -database 'postgres://sherlock:password@localhost:5432/sherlock?sslmode=disable' goto 61
    and
    migrate -path sherlock/db/migrations -database 'postgres://sherlock:password@localhost:5432/sherlock?sslmode=disable' goto 62
    to test down and up, respectively.
    Screenshot 2023-11-07 at 11 28 55 AM

@katiewelch katiewelch requested a review from a team as a code owner November 7, 2023 16:19
Copy link

github-actions bot commented Nov 7, 2023

Published image from 7eed757 (merge d7b3664):

us-central1-docker.pkg.dev/dsp-artifact-registry/sherlock/sherlock:v0.2.43-d7b3664

Copy link

github-actions bot commented Nov 8, 2023

No API changes detected

Copy link

codecov bot commented Nov 8, 2023

Codecov Report

Merging #356 (7eed757) into main (49d1ed8) will increase coverage by 0.02%.
Report is 1 commits behind head on main.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #356      +/-   ##
==========================================
+ Coverage   68.50%   68.52%   +0.02%     
==========================================
  Files         157      157              
  Lines       10253    10250       -3     
==========================================
  Hits         7024     7024              
+ Misses       2742     2740       -2     
+ Partials      487      486       -1     
Files Coverage Δ
...internal/deprecated_models/v2models/environment.go 37.23% <ø> (+0.34%) ⬆️
sherlock/internal/models/test_data.go 99.52% <100.00%> (ø)

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 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Contributor

@jack-r-warren jack-r-warren left a comment

Choose a reason for hiding this comment

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

LGTM!

@katiewelch katiewelch merged commit 81ad492 into main Nov 16, 2023
15 checks passed
@katiewelch katiewelch deleted the DDO-3269-enviornment-sql-migration branch November 16, 2023 18:37
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.

2 participants