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

Storage Integration #2

Merged
merged 186 commits into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
186 commits
Select commit Hold shift + click to select a range
59be602
update
thorrester Nov 7, 2024
61d098a
deps and pathing
thorrester Nov 7, 2024
cef3f6c
add initial logic
thorrester Nov 7, 2024
8bc318a
add upload and download
thorrester Nov 7, 2024
2a91e9b
add method for getting file
thorrester Nov 8, 2024
c94e98d
add bucket
thorrester Nov 8, 2024
8ff925a
add find
thorrester Nov 8, 2024
b0ffcd6
implementing generic storage
thorrester Nov 8, 2024
be93e93
Update google.rs
thorrester Nov 8, 2024
ff8c09d
add just parse chunks
thorrester Nov 8, 2024
d37ddd7
update types
thorrester Nov 8, 2024
b7c4a1a
working
thorrester Nov 9, 2024
562ace9
ongoing
thorrester Nov 9, 2024
c485898
moving things around for multiple packages
thorrester Nov 9, 2024
3825739
gcs ongoing
thorrester Nov 9, 2024
a640258
testing
thorrester Nov 9, 2024
dfe53dd
changes
thorrester Nov 11, 2024
dda926a
async directory write
thorrester Nov 11, 2024
7cd3dd8
add copy
thorrester Nov 11, 2024
cc9101d
add presigned
thorrester Nov 11, 2024
2bcc394
adding github
thorrester Nov 12, 2024
47f76df
working on tests
thorrester Nov 12, 2024
e766843
lints
thorrester Nov 12, 2024
e60c658
update cargo
thorrester Nov 12, 2024
d009788
Update storage-gcs-tests.yml
thorrester Nov 12, 2024
91667cf
Update storage-gcs-tests.yml
thorrester Nov 12, 2024
b8e4160
change
thorrester Nov 12, 2024
effb43d
move things around
thorrester Nov 12, 2024
52dffa5
Update _opsml_storage.pyi
thorrester Nov 12, 2024
0b298fa
update
thorrester Nov 12, 2024
72ad410
checking temp creds
thorrester Nov 12, 2024
1e28486
Update Cargo.toml
thorrester Nov 12, 2024
998bbf4
Update google.rs
thorrester Nov 12, 2024
75c3c50
Update conftest.py
thorrester Nov 12, 2024
f38b869
doesnt support external account
thorrester Nov 12, 2024
39d7a4f
update
thorrester Nov 12, 2024
d1e7ee4
Update conftest.py
thorrester Nov 12, 2024
7da77a5
adding aws
thorrester Nov 12, 2024
60c6b10
Update aws.rs
thorrester Nov 12, 2024
7371767
working on trait
thorrester Nov 13, 2024
beff8ae
adding s3 files
thorrester Nov 13, 2024
c672dd8
move files around
thorrester Nov 13, 2024
1098fca
add s3 test
thorrester Nov 13, 2024
6aa7c6d
configure aws creds
thorrester Nov 13, 2024
07e900b
Update storage-aws-tests.yml
thorrester Nov 13, 2024
0e221db
lints
thorrester Nov 13, 2024
b1a85c6
add tokio macros
thorrester Nov 13, 2024
8f4450b
update
thorrester Nov 14, 2024
65410db
Update storage-aws-tests.yml
thorrester Nov 14, 2024
1168e7f
Update storage-aws-tests.yml
thorrester Nov 14, 2024
a12208c
Update test_aws_storage.py
thorrester Nov 14, 2024
2ea9406
add working directory
thorrester Nov 14, 2024
67d5d2a
Update storage-aws-tests.yml
thorrester Nov 14, 2024
70f5335
refactoring gcs client
thorrester Nov 14, 2024
4438496
add find and find_info
thorrester Nov 14, 2024
943c33f
make things generic
thorrester Nov 14, 2024
42734c4
standardize tests
thorrester Nov 14, 2024
c964812
rust gcs tests
thorrester Nov 14, 2024
5f1f1c4
add gcs python component
thorrester Nov 14, 2024
23d6432
add workflow
thorrester Nov 14, 2024
ff06659
Update dependency-review.yml
thorrester Nov 14, 2024
74fca0f
Update google.rs
thorrester Nov 14, 2024
d579ab9
update names
thorrester Nov 14, 2024
c681f27
generic
thorrester Nov 14, 2024
9b60a1d
add python layer
thorrester Nov 14, 2024
2cca30a
updating for local storage
thorrester Nov 14, 2024
bb63e4d
add local testing and github workflow
thorrester Nov 14, 2024
fd77a15
lints
thorrester Nov 14, 2024
6a950ee
Update Makefile
thorrester Nov 14, 2024
135d797
Update test_local_storage.py
thorrester Nov 15, 2024
d81ef01
fix google
thorrester Nov 15, 2024
1cc60dd
refactor aws
thorrester Nov 15, 2024
6e6023c
adding initial route logic
thorrester Nov 15, 2024
222b183
add name to storage
thorrester Nov 15, 2024
d21c5d4
add settings and test
thorrester Nov 15, 2024
c045987
working on uploading logic for server
thorrester Nov 16, 2024
003c0c2
working on upload paths
thorrester Nov 16, 2024
5c50d46
upload logic
thorrester Nov 17, 2024
925d92d
simplifying upload chunks
thorrester Nov 17, 2024
53ce16a
add settings struct to google
thorrester Nov 17, 2024
a32ed75
remove settings requirement
thorrester Nov 17, 2024
9336ce0
refactor with new settings struct
thorrester Nov 18, 2024
3977411
movn n groovn
thorrester Nov 18, 2024
b7d5a20
update
thorrester Nov 18, 2024
ab9e848
add create multipart and upload in chunks
thorrester Nov 18, 2024
add477e
https client
thorrester Nov 18, 2024
f715afd
fix storage
thorrester Nov 18, 2024
b74efce
add http to enum
thorrester Nov 18, 2024
6a2626b
ongoing
thorrester Nov 19, 2024
6b41dcb
add create uploader enum
thorrester Nov 19, 2024
2d11d15
ongoing
thorrester Nov 19, 2024
e10cab3
ongoing
thorrester Nov 19, 2024
d9a4a76
working on generic enum for uploader
thorrester Nov 19, 2024
7e5fe1b
what is this sh$$
thorrester Nov 20, 2024
d3a9f3d
removing unneeded
thorrester Nov 20, 2024
e21345a
fix enum for multipart
thorrester Nov 20, 2024
613caf4
maybe? :)
thorrester Nov 20, 2024
0093e9e
closer to test
thorrester Nov 20, 2024
2a3b7c6
testing
thorrester Nov 20, 2024
19a7308
moving things around
thorrester Nov 21, 2024
01b5301
need to know storage type
thorrester Nov 21, 2024
189aae8
fix up enum
thorrester Nov 21, 2024
676c191
update storage clients
thorrester Nov 21, 2024
add1bed
remove uneeded rqwest fns
thorrester Nov 21, 2024
9049272
reconfigure
thorrester Nov 21, 2024
1dae3ea
testing client
thorrester Nov 21, 2024
f5f9664
testing
thorrester Nov 21, 2024
f88a0ea
better separation of concerns
thorrester Nov 21, 2024
ff2a570
re organizing
thorrester Nov 22, 2024
0ea38a7
Update Cargo.toml
thorrester Nov 22, 2024
b359439
deps
thorrester Nov 22, 2024
d2c4d57
fixing loading logic
thorrester Nov 22, 2024
b9a86ad
ongoing
thorrester Nov 22, 2024
898a2dc
add delete route
thorrester Nov 23, 2024
a842e19
add delete for http client
thorrester Nov 23, 2024
0b941e4
make contract for client and server interactions
thorrester Nov 23, 2024
adb37b3
add contracts to client
thorrester Nov 23, 2024
a5f1c2a
clean up storage type
thorrester Nov 23, 2024
697e94b
add contracts dep
thorrester Nov 23, 2024
0ab4d26
change
thorrester Nov 24, 2024
dccfac5
simplifying
thorrester Nov 24, 2024
4312cfc
fix aws
thorrester Nov 24, 2024
4009a2b
local
thorrester Nov 25, 2024
3e3dd2b
Update client.rs
thorrester Nov 25, 2024
d0d512b
reorg
thorrester Nov 25, 2024
0a68115
Create README.md
thorrester Nov 25, 2024
5290237
organized
thorrester Nov 25, 2024
21654a1
lints
thorrester Nov 25, 2024
6a2348a
formatting
thorrester Nov 25, 2024
d0bd0e4
working
thorrester Nov 25, 2024
2018dff
fix aws
thorrester Nov 26, 2024
ba6f534
working on local
thorrester Nov 26, 2024
8e09e25
local storage and formatting
thorrester Nov 26, 2024
aa75f08
working on azure
thorrester Nov 26, 2024
88df922
adding find
thorrester Nov 26, 2024
3ed91ef
working on azure
thorrester Nov 26, 2024
147dd32
cleanup imports
thorrester Nov 26, 2024
f828551
azure working
thorrester Nov 26, 2024
fb38cbd
fix imports
thorrester Nov 26, 2024
0115e32
adding in server side tests
thorrester Nov 26, 2024
e409867
simplify
thorrester Nov 27, 2024
4fb6585
fix gcs
thorrester Nov 27, 2024
0515bac
cleanup
thorrester Nov 27, 2024
46031db
gcs test passing
thorrester Nov 27, 2024
f998349
add aws tests
thorrester Nov 27, 2024
70d2b64
add azure tests
thorrester Nov 27, 2024
f10f694
add local tests
thorrester Nov 27, 2024
66cb1d4
lints
thorrester Nov 27, 2024
8d2c8b6
Create storage-tests.yml
thorrester Nov 27, 2024
11139e7
remove unused tests
thorrester Nov 27, 2024
b3eddd6
lints
thorrester Nov 27, 2024
d9a90d8
Update storage-tests.yml
thorrester Nov 27, 2024
554e2eb
Update storage-tests.yml
thorrester Nov 27, 2024
96c206e
Update storage-tests.yml
thorrester Nov 27, 2024
5ef28d6
checking
thorrester Nov 27, 2024
a243056
Update client.rs
thorrester Nov 27, 2024
f79dc4f
Update storage-tests.yml
thorrester Nov 27, 2024
5e37bee
add http
thorrester Nov 27, 2024
f78d1bf
Update makefile
thorrester Nov 27, 2024
6d50dc5
add gcs and az workflows
thorrester Nov 27, 2024
950cf12
test
thorrester Nov 27, 2024
bc82bb3
refactor bash
thorrester Nov 27, 2024
5db8a11
Update storage-tests.yml
thorrester Nov 27, 2024
94ab8c2
update
thorrester Nov 27, 2024
6d01a95
test docker
thorrester Nov 27, 2024
e167d8e
add env vars
thorrester Nov 27, 2024
77ac523
Update storage-tests.yml
thorrester Nov 27, 2024
8295851
Update storage-tests.yml
thorrester Nov 27, 2024
c83ad00
Update storage-tests.yml
thorrester Nov 27, 2024
8b1e32b
Update storage-tests.yml
thorrester Nov 27, 2024
e7126c9
test building api
thorrester Nov 27, 2024
44933ee
Update storage-tests.yml
thorrester Nov 27, 2024
04cf87b
Update storage-tests.yml
thorrester Nov 27, 2024
bdd74f7
Update storage-tests.yml
thorrester Nov 27, 2024
b459395
Update makefile
thorrester Nov 27, 2024
b6c0c0c
Update storage-tests.yml
thorrester Nov 27, 2024
15d1584
Update storage-tests.yml
thorrester Nov 27, 2024
9c462b6
Update storage-tests.yml
thorrester Nov 27, 2024
5f04bb4
Update storage-tests.yml
thorrester Nov 27, 2024
d7c165a
Update storage-tests.yml
thorrester Nov 27, 2024
a169228
rename
thorrester Nov 27, 2024
88a590f
Update storage-tests-client.yml
thorrester Nov 27, 2024
8d27e47
Update storage-tests-client.yml
thorrester Nov 27, 2024
e1bf7b9
Update makefile
thorrester Nov 27, 2024
c3e117d
add server tests
thorrester Nov 27, 2024
10e67b2
Update client.rs
thorrester Nov 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report_python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: "🐞 Bug report - Python"
description: Report an issue with Python opsml-core.
labels: [bug, python]

body:
- type: checkboxes
id: checks
attributes:
label: Checks
options:
- label: >
I have checked that this issue has not already been reported.
required: true
- label: >
I have confirmed this bug exists on the
latest version.
required: true

- type: textarea
id: example
attributes:
label: Reproducible example
description: >
Please follow [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) on how to
provide a minimal, copy-pastable example. Include the (wrong) output if applicable.
value: |
```python

```
validations:
required: true

- type: textarea
id: logs
attributes:
label: Log output
description: >
Provide any relevant log output or stack trace.
render: shell

- type: textarea
id: problem
attributes:
label: Issue description
description: >
Provide any additional information you think might be relevant.
validations:
required: true

- type: textarea
id: expected-behavior
attributes:
label: Expected behavior
description: >
Describe or show a code example of the expected behavior.
validations:
required: true
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Ref: https://help.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository#configuring-the-template-chooser
blank_issues_enabled: true
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: '📖 Documentation improvement'
description: Report an issue with the documentation.
labels: [documentation]

body:
- type: textarea
id: description
attributes:
label: Description
description: >
Describe the issue with the documentation and how it can be fixed or improved.
validations:
required: true

- type: input
id: link
attributes:
label: Link
description: >
Provide a link to the existing documentation, if applicable.
validations:
required: false
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: "✨ Feature request"
description: Suggest a new feature or enhancement for Opsml.
labels: [enhancement]

body:
- type: textarea
id: description
attributes:
label: Description
description: >
Describe the feature or enhancement and explain why it should be implemented.
Include a code example if applicable.
validations:
required: true
13 changes: 13 additions & 0 deletions .github/reviewer_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Set to true to add reviewers to pull requests
addReviewers: true

# Set to true to add assignees to pull requests
addAssignees: false

# A list of reviewers to be added to pull requests (GitHub user name)
reviewers:
- thorrester

# A number of reviewers added to the pull request
# Set 0 to add all the reviewers (default: 0)
numberOfReviewers: 1
12 changes: 12 additions & 0 deletions .github/workflows/auto-assign-py.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: "Auto Assign PR"
on:
pull_request:
types: [opened, ready_for_review]

jobs:
add-reviewers:
runs-on: ubuntu-latest
steps:
- uses: kentaro-m/[email protected]
with:
configuration-path: ".github/reviewer_config.yml"
23 changes: 23 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Dependency Review

on:
pull_request:
types:
- opened
- synchronize
permissions:
contents: read
# this is required to comment on PRs
pull-requests: write

jobs:
Dependency-Review:
runs-on: ubuntu-latest
steps:
- name: "Checkout Repository"
uses: actions/checkout@v4
- name: "Dependency Review"
uses: actions/dependency-review-action@v3
with:
fail-on-severity: critical
comment-summary-in-pr: always
223 changes: 223 additions & 0 deletions .github/workflows/storage-tests-client.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,223 @@
name: Client Storage Tests

on:
push:
branches:
- main
- master
pull_request:

env:
RUSTFLAGS: -C debuginfo=0 # Do not produce debug symbols to keep memory usage down
OPSML_SERVER_PORT: 3000

# aws args
AWS_REGION: "${{ secrets.AWS_REGION }}"
PYTHON_VERSION: "3.11"
AWS_CLOUD_BUCKET_NAME: "${{ secrets.AWS_CLOUD_BUCKET_NAME }}"

# gcs args
GOOGLE_ACCOUNT_JSON_BASE64: ${{ secrets.GOOGLE_ACCOUNT_JSON_BASE64 }}
GCS_CLOUD_BUCKET_NAME: "${{ secrets.GCS_CLOUD_BUCKET_NAME }}"

#azure args
AZURE_STORAGE_ACCOUNT: ${{ secrets.AZURE_STORAGE_ACCOUNT }}
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
AZURE_CLOUD_BUCKET_NAME: "${{ secrets.AZURE_CLOUD_BUCKET_NAME }}"

jobs:
aws-lints-client-test:
permissions:
id-token: write
contents: read
env:
OPSML_STORAGE_URI: s3://${{ secrets.AWS_CLOUD_BUCKET_NAME }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v3
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: ${{ env.AWS_REGION }}

- name: Set up Rust
run: rustup override set stable && rustup update

- name: Install clippy
run: rustup component add clippy

- name: Cache Rust
uses: Swatinem/rust-cache@v2

- name: Run cargo clippy
working-directory: ./crates
run: cargo clippy --workspace --all-targets -- -D warnings

- name: Build opsml_server
run: cargo build -p opsml-server

- name: Upload opsml_server binary
uses: actions/upload-artifact@v4
with:
name: opsml_server
path: ./target/debug/opsml-server

- name: Run opsml_server in the background
run: ./target/debug/opsml-server &
env:
OPSML_STORAGE_URI: ${{ env.OPSML_STORAGE_URI }}
OPSML_SERVER_PORT: ${{ env.OPSML_SERVER_PORT }}

- name: Tests
working-directory: ./crates
run: |
make test.storage.aws.client
env:
RUST_BACKTRACE: 1
OPSML_TRACKING_URI: http://0.0.0.0:3000

- name: Shutdown background processes
run: |
lsof -ti tcp:3000 | xargs kill -9

gcs-client-test:
permissions:
id-token: write
contents: read
env:
OPSML_STORAGE_URI: gs://${{ secrets.GCS_CLOUD_BUCKET_NAME }}
GOOGLE_ACCOUNT_JSON_BASE64: ${{ secrets.GOOGLE_ACCOUNT_JSON_BASE64 }}
runs-on: ubuntu-latest
needs: aws-lints-client-test
steps:
- uses: actions/checkout@v4

- name: Set up Rust
run: rustup override set stable && rustup update

- name: Cache Rust
uses: Swatinem/rust-cache@v2

- name: Download opsml_server binary
uses: actions/download-artifact@v4
with:
name: opsml_server
path: target/debug/

- name: Make opsml_server executable
run: chmod +x target/debug/opsml-server

- name: Run opsml_server in the background
run: target/debug/opsml-server &
env:
OPSML_STORAGE_URI: ${{ env.OPSML_STORAGE_URI }}
OPSML_SERVER_PORT: ${{ env.OPSML_SERVER_PORT }}

- name: Tests
working-directory: ./crates
run: |
make test.storage.gcs.client
env:
RUST_BACKTRACE: 1
OPSML_TRACKING_URI: http://0.0.0.0:3000

- name: Shutdown background processes
run: |
lsof -ti tcp:3000 | xargs kill -9

azure-client-test:
needs: gcs-client-test
permissions:
id-token: write
contents: read
env:
OPSML_STORAGE_URI: az://${{ secrets.AZURE_CLOUD_BUCKET_NAME }}
AZURE_STORAGE_ACCOUNT: ${{ secrets.AZURE_STORAGE_ACCOUNT }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: "Az CLI login"
uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}

- name: Set up Rust
run: rustup override set stable && rustup update

- name: Cache Rust
uses: Swatinem/rust-cache@v2

- name: Download opsml_server binary
uses: actions/download-artifact@v4
with:
name: opsml_server
path: target/debug/

- name: Make opsml_server executable
run: chmod +x target/debug/opsml-server

- name: Run opsml_server in the background
run: target/debug/opsml-server &
env:
OPSML_STORAGE_URI: ${{ env.OPSML_STORAGE_URI }}
OPSML_SERVER_PORT: ${{ env.OPSML_SERVER_PORT }}

- name: Tests
working-directory: ./crates
run: |
make test.storage.azure.client
env:
RUST_BACKTRACE: 1
OPSML_TRACKING_URI: http://0.0.0.0:3000

- name: Shutdown background processes
run: |
lsof -ti tcp:3000 | xargs kill -9

local-client-test:
needs: azure-client-test
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Rust
run: rustup override set stable && rustup update

- name: Cache Rust
uses: Swatinem/rust-cache@v2

- name: Download opsml_server binary
uses: actions/download-artifact@v4
with:
name: opsml_server
path: target/debug/

- name: Make opsml_server executable
run: chmod +x target/debug/opsml-server

- name: Run opsml_server in the background
run: target/debug/opsml-server &
env:
OPSML_SERVER_PORT: ${{ env.OPSML_SERVER_PORT }}

- name: Tests
working-directory: ./crates
run: |
make test.storage.local.client
env:
RUST_BACKTRACE: 1
OPSML_TRACKING_URI: http://0.0.0.0:3000

- name: Shutdown background processes
run: |
lsof -ti tcp:3000 | xargs kill -9
Loading