-
Notifications
You must be signed in to change notification settings - Fork 13
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
[Issue #2351, #2472] Migrate to platforms step function pattern #2506
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
9e4e84b
Migrate to platforms step function pattern
coilysiren 6b4038d
errant space
coilysiren 217edf4
swap over load transform as well
coilysiren 066475f
space
coilysiren ef27b86
appease checkov
coilysiren f563227
Merge branch 'main' into kai/sfns
coilysiren 1ba3d06
add state
coilysiren 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
There are no files selected for viewing
This file contains 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 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
locals { | ||
# The `task_command` is what you want your scheduled job to run, for example: ["poetry", "run", "flask"]. | ||
# Schedule expression defines the frequency at which the job should run. | ||
# The syntax for `schedule_expression` is explained in the following documentation: | ||
# https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-scheduled-rule-pattern.html | ||
# The `state` is the state of the scheduled job. It can be either "ENABLED" or "DISABLED". | ||
|
||
# See api/src/data_migration/command/load_transform.py for argument specifications. | ||
load-transform-args = { | ||
# Runs, but with everything disabled. | ||
dev = [ | ||
"poetry", | ||
"run", | ||
"flask", | ||
"data-migration", | ||
"load-transform", | ||
"--no-load", | ||
"--no-transform", | ||
"--no-set-current", | ||
], | ||
staging = [ | ||
"poetry", | ||
"run", | ||
"flask", | ||
"data-migration", | ||
"load-transform", | ||
"--load", | ||
"--transform", | ||
"--set-current", | ||
], | ||
prod = [ | ||
"poetry", | ||
"run", | ||
"flask", | ||
"data-migration", | ||
"load-transform", | ||
"--load", | ||
"--transform", | ||
"--set-current", | ||
], | ||
} | ||
scheduled_jobs = { | ||
copy-oracle-data = { | ||
task_command = ["poetry", "run", "flask", "data-migration", "copy-oracle-data"] | ||
schedule_expression = "rate(2 minutes)" | ||
state = "ENABLED" | ||
} | ||
load-transform = { | ||
task_command = local.load-transform-args[var.environment] | ||
schedule_expression = "rate(1 days)" | ||
state = "ENABLED" | ||
} | ||
} | ||
} |
This file contains 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 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 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 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we include enabled/disabled here too, or does a null schedule or something like that cause the job to just not run? Just thinking there may be times we want to keep the job from running, but not delete it from here entirely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heh, I believe I had this same question in the original PR.
I think it's a good idea, so I'm gonna add it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added! 1ba3d06