-
-
Notifications
You must be signed in to change notification settings - Fork 60
profile constraint follow-up: #3009
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 all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
b00f59d
profile constraint follow-up:
ikreymer a4a2445
fix typo!
ikreymer ad66915
none check
ikreymer 8ce01dc
org import: attempt to debug test failure
ikreymer c667ede
fix
ikreymer b40294c
add 'id: UUID' to Profile to fix import
ikreymer 24f0c5f
tests: attempt to set lower storage sizes for crawler, redis and prof…
ikreymer d09bcb5
fix no_profile condition
ikreymer b8e8777
check profile.proxyId
ikreymer ba7388f
Apply suggestion from @ikreymer
ikreymer 0c568a4
ci: add cleanup action
ikreymer 4576d6d
fix
ikreymer f77ecca
tests: test simple profile update
ikreymer eb83653
tests: retry if non-json response (eg. error code)
ikreymer 9044714
fix profile updating to different profile!
ikreymer 76816b2
fix test
ikreymer 3270b12
fix typo
ikreymer 668671e
fix tests, allow retry if deletion returns an invalid status
ikreymer 52daf2f
undo test changes, try to optimize delete
ikreymer c2f8071
undo change
ikreymer 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 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
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
36 changes: 36 additions & 0 deletions
36
backend/btrixcloud/migrations/migration_0054_clear_proxyid_when_using_profiles.py
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| """ | ||
| Migration 0054 -- clear proxyId on workflows that have profile set | ||
| using proxyId from profile always | ||
| """ | ||
|
|
||
| from btrixcloud.migrations import BaseMigration | ||
|
|
||
|
|
||
| MIGRATION_VERSION = "0054" | ||
|
|
||
|
|
||
| class Migration(BaseMigration): | ||
| """Migration class.""" | ||
|
|
||
| # pylint: disable=unused-argument | ||
| def __init__(self, mdb, **kwargs): | ||
| super().__init__(mdb, migration_version=MIGRATION_VERSION) | ||
|
|
||
| async def migrate_up(self): | ||
| """Perform migration up. | ||
|
|
||
| Unset proxyId on workflows that have a profileid set | ||
| """ | ||
| crawl_configs = self.mdb["crawl_configs"] | ||
|
|
||
| try: | ||
| await crawl_configs.update_many( | ||
| {"profileid": {"$ne": None}, "proxyId": {"$ne": None}}, | ||
| {"$set": {"proxyId": None}}, | ||
| ) | ||
| # pylint: disable=broad-exception-caught | ||
| except Exception as err: | ||
| print( | ||
| f"Error update crawl_configs: {err}", | ||
| flush=True, | ||
| ) |
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
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.
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.