-
Notifications
You must be signed in to change notification settings - Fork 2
Updated Mutexbot CLI flow to use DB #42
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
Merged
Merged
Changes from 85 commits
Commits
Show all changes
115 commits
Select commit
Hold shift + click to select a range
7572dfe
Update Mutexbot CLI flow to use DB - insert and loop only (without re…
Shugenya 2e8c2b2
Replaced tokio postgres with sqlx.
Shugenya c9988d1
Renamed project to "Deploy queue".
Shugenya 18c066c
Added DB schema.
Shugenya 7212f4d
Changed results from tuples to struct.
Shugenya 084417c
Removed test DB credentials
Shugenya b39cc40
Store the deployment_id as a GitHub output
Shugenya e8a1ccf
Fixed enum error.
Shugenya e10b526
Added component param to CLI.
Shugenya 6dea204
Fixed function param
Shugenya 3229502
Removed unused code.
Shugenya 7fd437a
Replaced chrono with time.
Shugenya c4c1c9f
Use macro sqlx::query!.
Shugenya f53ef71
Moved DB connection outside the match block (so it can be used by oth…
Shugenya eabeb8a
Added conversion logic for DeploymentState.
Shugenya b4ee882
Added buffer time for deployments.
Shugenya f9c64a6
Changed CLI interface - new operation modes and params
Shugenya 0d7dda9
Fixed comment.
Shugenya 3a81c4f
Renamed Reserve Mode.
Shugenya 77ac924
Updated region param name.
Shugenya 4eac83d
Changed environment to enum.
Shugenya db2533a
Updated Finish and Cancel to use deployment_id
Shugenya 68a3d1c
Merged environment fetching into 1 single query.
Shugenya 28765f9
Replaced `query_as` with `query!` macro.
Shugenya 6502f64
Composite index on (region, component) for better performance.
Shugenya da2261b
renamed struct PendingDeployment to Deployment.
Shugenya ec16bf5
Added all fields + buffer_time in Deployment strucy.
Shugenya bc8856b
Improved impl for DeploymentState to include also Finished and Cancel…
Shugenya af8b6ae
simplified error handling.
Shugenya 7a5389b
Added logic to finish, cancel and start deployment.
Shugenya 2d60b64
Update deploy-queue/src/main.rs
Shugenya 9cf9cd7
Update deploy-queue/src/main.rs
Shugenya 855c792
Update deploy-queue/src/main.rs
Shugenya 65a4bc0
separate `update_deployment_record` into 3 separate methods.
Shugenya 24bdd81
Update deploy-queue/src/main.rs
Shugenya a365bbe
Update deploy-queue/src/main.rs
Shugenya c442947
read database_url from env variable.
Shugenya e9580a2
Update deploy-queue/src/main.rs
Shugenya b844607
Update deploy-queue/src/main.rs
Shugenya d910544
Update deploy-queue/src/main.rs
Shugenya 866cc94
Update deploy-queue/src/main.rs
Shugenya 565462b
Removed unused variable.
Shugenya 32cbe04
Moved state validation to DB level.
Shugenya 6816f9b
Added info mode.
Shugenya c25e012
Update deploy-queue/src/main.rs
Shugenya a1e5ad0
Version is not mandatory field.
Shugenya d74eb98
Added immutable fields check on update.
Shugenya fe30c8e
Added validation that cancellation note can only be set when cancelling.
Shugenya 94ca009
Make version param optional also in the CLI method.
Shugenya 474437c
Removed reqwest and serde dependency.
Shugenya 24c1508
Update deploy-queue/src/cli.rs
Shugenya fb5d77c
Added migrate macro dependency.
Shugenya d53d9ea
Added AsRef and ToString implementation for Environment.
Shugenya bf7a009
Added rerun if migrations change.
Shugenya d1b13da
Moved DB schema into migrations folder.
Shugenya 743d4bb
Add Migrator and run_migrations function.
Shugenya f395690
Fixed Display method for Environment.
Shugenya 2a31174
Fixed Deploy Queue GitHub action.
Shugenya 908ab6d
Added migration run after connecting to DB.
Shugenya 9065cbf
Removed validation on no state-related fields
Shugenya 651bcf1
Update deploy-queue/src/main.rs
Shugenya a1367df
Fixed conflicting implementations of trait `ToString` for type `Envir…
Shugenya d0b3481
Fixed error with input parameters for insert_deployment_record.
Shugenya d20d4d6
Fixed build errors with time libraries.
Shugenya c618145
Fixed build error with reference.
Shugenya bba89e1
Fixed build error with Option<NonZero<u64>>.
Shugenya 1cc0d66
Removed unused reference.
Shugenya d7de52f
Fixed deployment variable reference error.
Shugenya 5fd99e1
Fixed type mismatch in db connection error handling.
Shugenya b474a56
Fixed error type mismatch
Shugenya f2fe421
Type inference error fixed.
Shugenya 572a341
Fixed i32 to i64 conversion.
Shugenya 075ead8
Clone borrowed values to fix build error.
Shugenya 5fc0d2e
Added missing Ok statement.
Shugenya f69f2f1
Fixed ownership error.
Shugenya df69bdb
added DEPLOY_QUEUE_DATABASE_URL variable to yml.
Shugenya f01ad60
Added DB schema setup step.
Shugenya 9ed8acf
Fixed missing table error on build.
Shugenya 1688622
Missing version field in query.
Shugenya 7143bf9
Setup database schema step also for build-image job.
Shugenya bad81e9
missing version field in DB query.
Shugenya 60ec676
Added query cache for build-image job.
Shugenya 8475f37
Added dependency check.
Shugenya 288de19
Fixed dependency - sqlx
Shugenya cf2d885
Replaced MutexBot reference in creating release.
Shugenya 50a4880
Info was printing wrong ID.
Shugenya 1fea9e9
Update deploy-queue/src/main.rs
Shugenya 8b53447
Added back download binary step.
Shugenya b008e95
Added concurrency key parameter.
Shugenya fd29d56
owned data + move instead of borrowed data + clone for Deployment struct
jcgruenhage 1ac5f53
Renamed first migration for consistency with sqlx migrate add.
Shugenya aa9630a
Added constraint for environment allowed values on DB level.
Shugenya c43e72e
Added `concurrency_key` input to yml.
Shugenya 4a774e1
Fixed mutexbot reference.
Shugenya d6fe4ab
Fixed failed test (environment constraint)
Shugenya e604b07
Fixed error when triggering start deployment action.
Shugenya e39ecf2
Removed not needed env variable.
Shugenya ffdef95
Reset version to 0.1.0
Shugenya c8d32c4
Added DB service in the test-deploy-queue-action.
Shugenya 895a24b
Update deploy-queue/src/cli.rs
Shugenya 9ebf2b6
Added job for pre-release cleanup.
Shugenya 80508fe
Fixed error with cli arguments.
Shugenya 9873003
Fixed optional input parameters in Deploy Queue action.
Shugenya 1165b4f
Fixed error with cancellation note parameter.
Shugenya 268e1d7
Separate lint job with DB migration check.
Shugenya baab6d7
Extracted logic for printing summary.
Shugenya 396a19e
Fixed imports.
Shugenya 9069578
Add SQLx query cache for offline compilation
Shugenya 7e3a08d
Move migration macro inline.
Shugenya bbc3ab2
Fixed lint errors
Shugenya aa21f2a
Updated lock file
Shugenya 7661a6a
Removed `cargo clippy --locked`
Shugenya c802064
Added `cargo clippy --locked` back.
Shugenya 39a05a9
rework summary
jcgruenhage ade9e8f
reformat
jcgruenhage File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.