-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: make image builder timeout configurable (#992)
* chore: change default value for `IMAGE_BUILD_TIMEOUT` Signed-off-by: Guilhem Barthés <[email protected]> * feat: add `builder.timeout` to change `IMAGE_BUILD_TIMEOUT` Signed-off-by: Guilhem Barthés <[email protected]> * feat: add test for `substrap.lock_local.lock_resource` Signed-off-by: Guilhem Barthés <[email protected]> * chore: remove unused `IMAGE_BUILD_TIMEOUT` Signed-off-by: Guilhem Barthés <[email protected]> * fix: replace `Exception` by `LockError` as `Exception` does not accept custom named arguments Signed-off-by: Guilhem Barthés <[email protected]> * chore: update chart changelog Signed-off-by: Guilhem Barthés <[email protected]> * doc: update chart changelog Signed-off-by: Guilhem Barthés <[email protected]> * doc: change fragment Signed-off-by: Guilhem Barthés <[email protected]> --------- Signed-off-by: Guilhem Barthés <[email protected]>
- Loading branch information
1 parent
288005b
commit 513842f
Showing
11 changed files
with
49 additions
and
4 deletions.
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
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,20 @@ | ||
from pathlib import Path | ||
|
||
import pytest | ||
|
||
from substrapp import lock_local | ||
from substrapp.exceptions import LockError | ||
|
||
|
||
# Test that `lock_local.lock_resource() returns the correct excception | ||
def test_lock_local_timeout(): | ||
resource_type = "test" | ||
unique_identifier = "1" | ||
# Create fake lock | ||
slug = f"{resource_type}_{unique_identifier}" | ||
lock_path = Path(lock_local._get_lock_file_path(slug)) | ||
lock_path.write_text("unique_id") | ||
|
||
with pytest.raises(LockError): | ||
with lock_local.lock_resource(resource_type, unique_identifier, timeout=1): | ||
pass |
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 @@ | ||
Add configurable builder timeout through the env var `IMAGE_BUILD_TIMEOUT` |
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