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

Add support for running an embedded cloud_sql_proxy #60

Merged
merged 6 commits into from
Jul 29, 2020

Conversation

sritchie
Copy link
Collaborator

@sritchie sritchie commented Jul 29, 2020

This PR:

  • adds a script to resources that is capable of running a cloud_sql_proxy instance inside the container
  • adds support for injecting this script into the generated Dockerfile

This does this always, though we may want to control the behavior with a flag. @ajslone , I moved the resources into their own folder inside the container so we don't mount over them when we run caliban shell. This way if a user wants they can test the behavior with a command inside caliban shell.

@sritchie sritchie requested a review from ajslone July 29, 2020 15:49
@sritchie sritchie changed the title Add support for running an embedded cloud_sql_proxy Add support for running an embedded cloud_sql_proxy [in progress] Jul 29, 2020
@codecov
Copy link

codecov bot commented Jul 29, 2020

Codecov Report

Merging #60 into master will decrease coverage by 0.17%.
The diff coverage is 44.89%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #60      +/-   ##
==========================================
- Coverage   51.58%   51.41%   -0.18%     
==========================================
  Files          28       30       +2     
  Lines        2929     2970      +41     
==========================================
+ Hits         1511     1527      +16     
- Misses       1418     1443      +25     
Impacted Files Coverage Δ
caliban/docker/build.py 33.50% <21.05%> (-0.37%) ⬇️
caliban/resources/cloud_sql_proxy.py 52.00% <52.00%> (ø)
caliban/util/metrics.py 100.00% <100.00%> (ø)
caliban/platform/gke/util.py 70.38% <0.00%> (-1.93%) ⬇️
caliban/util/fs.py 89.62% <0.00%> (-0.95%) ⬇️
caliban/platform/cloud/types.py 89.47% <0.00%> (-0.66%) ⬇️
caliban/util/auth.py 76.19% <0.00%> (+9.52%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5c9efd5...6f3d41c. Read the comment docs.

@sritchie sritchie changed the base branch from sritchie/resource_path to master July 29, 2020 16:26
@sritchie sritchie changed the title Add support for running an embedded cloud_sql_proxy [in progress] Add support for running an embedded cloud_sql_proxy Jul 29, 2020
Copy link
Collaborator

@ajslone ajslone left a comment

Choose a reason for hiding this comment

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

LGTM

@sritchie sritchie merged commit af9dd99 into master Jul 29, 2020
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.

None yet

2 participants