Skip to content

Commit

Permalink
Fix integration tests (#843)
Browse files Browse the repository at this point in the history
* add pathspec to pyproject

* poetry lock --no-update

* fix calc_patch call
  • Loading branch information
helenlyang committed Feb 28, 2024
1 parent f097ab4 commit 92d1eed
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ inquirerpy = "^0.3.4"
google-cloud-storage = "2.10.0"
loguru = ">=0.7.2"
uvloop = "^0.19.0"
pathspec = ">=0.9.0"


[tool.poetry.group.builder.dependencies]
Expand All @@ -64,6 +65,7 @@ huggingface_hub = ">=0.19.4"
google-cloud-storage = "2.10.0"
boto3 = "^1.26.157"
loguru = ">=0.7.2"
pathspec = ">=0.9.0"

[tool.poetry.dev-dependencies]
ipython = "^7.16"
Expand Down
10 changes: 8 additions & 2 deletions truss/truss_handle.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,12 @@
from truss.truss_config import BaseImage, ExternalData, ExternalDataItem, TrussConfig
from truss.truss_spec import TrussSpec
from truss.types import Example, PatchDetails, PatchRequest
from truss.util.path import copy_file_path, copy_tree_path, get_max_modified_time_of_dir
from truss.util.path import (
copy_file_path,
copy_tree_path,
get_max_modified_time_of_dir,
load_trussignore_patterns,
)
from truss.validation import validate_secret_name

logger: logging.Logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -891,7 +896,8 @@ def _try_patch(self):
"Truss supports patching and a running "
"container found: attempting to patch the container"
)
patch_details = self.calc_patch(running_truss_hash)
truss_ignore_patterns = load_trussignore_patterns()
patch_details = self.calc_patch(running_truss_hash, truss_ignore_patterns)
if patch_details is None:
logger.info("Unable to calculate patch.")
return None
Expand Down

0 comments on commit 92d1eed

Please sign in to comment.