-
-
Notifications
You must be signed in to change notification settings - Fork 363
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
Key value state + tests refactoring #969
Closed
Closed
Changes from all commits
Commits
Show all changes
129 commits
Select commit
Hold shift + click to select a range
7035abe
Move statefile into state.file module
moretea 6da031f
Introduce different state state schemes.
moretea 8269650
Rename statefile->state in deployment.py
moretea c73773f
Move file based deployment lock to file state implementation.
moretea 8a4e34a
Fix indenting
moretea bb056ea
Bite the bullet; remove _db references from business objects + rename…
moretea 6cc171a
move get_resources_for
moretea 813a231
move set_deployment_attrs
moretea 7b58934
move del_deployment_attr
moretea 7ed3fd3
move get_deployment_attr
moretea 0db686d
move create_resource
moretea 97e0714
Move most logic in export() to get_all_deployment_attrs in statefile.
moretea 584d658
Make import use an atomic transaction thingy.
moretea 97bda1a
move clone_deployment
moretea 77e9b93
move part of delete_resource
moretea 4d33f93
missed a few _'s
moretea 5649e39
move part of delete to _delete_deployment
moretea 4075901
use state atomic
moretea 5f39278
Move part of logic of rename to _rename_resource
moretea 6605128
oh yeah, I did rename _db to __db!
moretea 5881c06
Use atomic instead of _db
moretea de9d700
Use atomic instead of _db
moretea ff23c1c
move set_resource_attrs
moretea eb2a24a
move del_resource_attr
moretea 47b3a43
move get_resource_attr
moretea 6835823
move part of export to get_all_resource_attrs
moretea 3739051
Use atomic instead of _db
moretea 66dee1d
oh yeah, I did rename _db to __db!
moretea 6254ccb
simple typo's
moretea 2d1a822
Need to pass in object; too much coupling to refactor right now
moretea 20c5e89
missed assigning to local dict
moretea 6c37bbd
typo
moretea 4baebf9
missing subclass function. Just copied for now
moretea 44652be
typo
moretea e238874
locally reachable already
moretea 56c39b7
missed the self parameter
moretea 83b5ca1
use _state.atomic instead of _db
moretea abf3d6e
schema: file -> sqlite3
moretea 0d999cf
Fix _rename_resource, needs resource_id
moretea a08de62
WIP: initial json backend.
moretea 6baf57f
Include the deployment_uuid in the API for modifying resource attributes
moretea 2dfa148
Small bug fixes
moretea 6733fa7
Utilize deployment_uid
moretea 3827e69
Also recognize json's true as a valid bool value
moretea 056ab60
Undo split between state.atomic and state.db
moretea 38aa181
Typo
moretea 4aaf084
Rename file -> sqlite3_file in tests
moretea 6950f37
Rename file -> sqlite3_file in scripts/nixops
moretea 6576e16
Rename file -> sqlite3_file in scripts/nixops
moretea 9d7cf8c
Merge branch 'master' into kv-state
rbvermaa 7c34e60
Merge branch 'kv-state' of https://github.com/moretea/nixops into mor…
mogorman ef2f480
Merge branch 'moretea-kv-state' into kv-state
mogorman 4ff5a24
fixed probable typo from fork
mogorman f7ef59f
change all instances to use state wrapper
mogorman 47684d5
integrate new state wrapper with one from fork
mogorman b0f18b5
rewrite this to use the wrapper
mogorman b3690b0
initial commit of moving over to sqlalchemy for all sql endpoints
mogorman 0b89b58
typo letter
mogorman 1ab3156
working switcher code. now rewriting sql code to use sqlalchemy
mogorman 98290e6
fixed sqlalchemy sqlite support by using internal implementation. now…
mogorman 3863edc
working sqlalchemy
mogorman c11756c
removed prints
mogorman b42814f
beginning of porting to mysql as well. will need specific sql for cre…
mogorman 19d3178
working mysql support
mogorman 5d200ee
possible row exception
mogorman 6e71adc
better locking and some temporary debugging
mogorman ceaf062
fix the past
mogorman 6f4f855
fixed unit tests
mogorman 28ac4b2
move function into the core state file
mogorman 759b96b
this simplifies to kv / sqlite for now so that we can move forward on
mogorman cc70b2a
testing this theory
mogorman 4585685
move class around
mogorman 07278c8
test
mogorman 76ffca7
remove debugging
mogorman 6cf8c02
adding unit test and testing it
mogorman f656d58
new unit tests
mogorman 83c4af9
remove debugging
mogorman 4cea4d2
fix variable name issue and move subclasses to common spot among
mogorman f477f2a
work on unit tests
mogorman 36f2479
make json match the behavior of sqlite
mogorman 0a836b6
misnamed variable
mogorman 874e7de
Merge branch 'master' into kv-state
srghma 6be85a1
fix: OperationalError no such column True -> quote booleans
srghma 666561c
fix: OperationalError no such column True -> use sqlite execute escaping
srghma dee2de2
refactor: tests -> move
srghma b24e69a
refactor: tests -> move files (WIP)
srghma d92a9cb
refactor: tests -> test_ec2_backups stops without error, but "mux_cli…
srghma 0f607c1
refactor: tests -> test_ec2_spot_instance (WIP)
srghma d853354
refactor: tests -> test_deploys_nixos
srghma c0a21c9
refactor: tests -> using_state_file -> revert implementation to creat…
srghma 047e237
refactor: tests -> refactor other tests, not checked (WIP)
srghma 04f9980
refactor: tests -> make vbox test unoptional (this should be centrali…
srghma 11aa0e3
fix: tests
srghma cf063be
fix(#970): tests.functional.test_ec2_rds_dbinstance -> remove default…
srghma e2a64a2
feat: tests -> using_state_file -> delete state file if exists before…
srghma 8511f59
feat: tests -> using_state_file -> unique state file for each test
srghma 0bd5210
refactor: tests -> use using_unique_state_file in some tests
srghma a681561
fix: json, when clone_deployment -> local variable "uuid" referenced …
srghma 5f4cd5d
fix: tests
srghma f453d6e
fix: tests.functional.test_query_deployments -> No JSON object could …
srghma 3c6433d
fix: tests (WIP)
srghma 458771e
fix: tests -> shared -> destroy_deployments
srghma 877b7fb
feat: clean_test_state_files.py
srghma 59c33cd
fix: tests.functional.test_vpc:test_deploy_vpc -> works with nixops s…
srghma e1b9158
fix: tests.functional.test_vpc:test_deploy_vpc with json state -> Typ…
srghma b30dbfe
refactor: state -> _create_state repeats
srghma 0b6c27c
refactor: test, destroy_deployments_and_remove_state_file -> print error
srghma 898107c
fix: deployment.clean_backups method -> UnboundLocalError: local vari…
srghma e554c13
fix: tests.functional.test_vpc:test_deploy_vpc -> create_exprs_dir ->…
srghma db84a8f
fix: state_dict -> An error occurred (InvalidRouteTableId.Malformed) …
srghma 2e547bd
fix: use isinstance(XXX, basestring) because isinstance(XXX, str) ret…
srghma 2f930cd
refactor: tests.functional.test_vpc
srghma 3a778db
refactor: destroy_deployments_and_remove_state_file -> change message…
srghma 1411a5a
fix: typo in message
srghma c91d5a5
fix: tests.functional.test_stopping_stops -> cannot delete this deplo…
srghma da9b31a
refactor: destroy_deployments_and_remove_state_file -> comment becaus…
srghma c21aa05
refactor: test_ec2_rds_dbinstance -> add documentation and disable te…
srghma fd81092
fix: azure -> AzureState object has no attribute user
srghma 7c15255
fix: comment
srghma c3ec96b
Merge remote-tracking branch 'upstream/master' into kv-state
srghma d912e7d
refactor: coretemp review -> change "echo -n" to "printf"
srghma b65546f
refactor: coretemp review -> fix typo -> revert "backend" to "backed"
srghma 2ceecef
refactor: coretemp review -> fix typo -> "of" to "for"
srghma b63914b
refactor: coretemp review -> json_file, _find_deployment method
srghma b5ee915
refactor: coretemp review -> fix typo -> "michine" to "machine"
srghma cb411dd
Merge branch 'master' into kv-state
srghma c4eecfb
fix: build errors
srghma e0a34e8
feat: mypy -> add mypy-parametrized
srghma 16e0b6c
fix: coretemp review -> fix typo -> change "of -> for" and revert pre…
srghma 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,4 @@ html/ | |
result | ||
*.sw[a-z] | ||
tags | ||
tests/test.nixops* | ||
tests/state_files |
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,15 @@ | ||
#! /usr/bin/env python2 | ||
# -*- coding: utf-8 -*- | ||
|
||
from nixops.util import root_dir | ||
from tests.functional.shared.destroy_deployments_and_remove_state_file import destroy_deployments_and_remove_state_file | ||
from tests.functional.shared.state_files_directory import state_files_directory | ||
import os | ||
|
||
for file in os.listdir(state_files_directory): | ||
if file.endswith(".nixops") or file.endswith(".json"): | ||
file_path = os.path.join(state_files_directory, file) | ||
|
||
print("Destroying {}".format(file_path)) | ||
|
||
destroy_deployments_and_remove_state_file(file_path) |
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 @@ | ||
fix: coretemp review -> fix typo -> change of - | ||
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 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
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.
remove file