Skip to content

Commit

Permalink
widen troposphere pin to include ^3 (#902)
Browse files Browse the repository at this point in the history
  • Loading branch information
ITProKyle authored Sep 16, 2021
1 parent 5bcc12b commit 66af509
Show file tree
Hide file tree
Showing 10 changed files with 656 additions and 660 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: deepakputhraya/[email protected] # cspell:ignore deepakputhraya
with:
regex: ([a-z])+\/([a-zA-Z0-9\-\_])+
allowed_prefixes: bugfix,chore,dependabot,docs,feat,feature,fix,hotfix,maint,maintain,maintenance,release
allowed_prefixes: bugfix,chore,depend,dependabot,docs,feat,feature,fix,hotfix,maint,maintain,maintenance,release
ignore: develop,master,release,v0_47_fixes
label-pr:
name: Label PR
Expand Down
1,284 changes: 641 additions & 643 deletions poetry.lock

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ sphinx-rtd-theme = { version = "^0.5", optional = true } # docs
sphinx-tabs = { version = "^3.0", optional = true } # docs
sphinxcontrib-apidoc = { version = "^0.3", optional = true } # docs
sphinxcontrib-programoutput = { version = "^0.17", optional = true } # docs
troposphere = "^2.4"
troposphere = ">=2.4, <4"
typing_extensions = "*" # only really needed for < 3.8 but can still be used in >= 3.8
urllib3 = "*" # allow us to follow botocore's hard pinning without needing to update our own
yamllint = "*"
Expand Down Expand Up @@ -306,12 +306,14 @@ notes = ["FIXME"]
[tool.pylint.message_control]
# http://pylint.pycqa.org/en/latest/technical_reference/features.html#messages-control-options
disable = [
"consider-using-f-string", # TODO remove
"line-too-long", # flake8 overlap
"missing-class-docstring", # flake8 (pydocstyle) overlap
"missing-function-docstring", # flake8 (pydocstyle) overlap
"missing-module-docstring", # flake8 (pydocstyle) overlap
"similarities", # black overcomplicated this
"ungrouped-imports", # false positive when using TYPE_CHECKING; isort should cover this
"unspecified-encoding", # TODO remove
]

[tool.pylint.typecheck]
Expand Down
4 changes: 2 additions & 2 deletions runway/blueprints/k8s/k8s_iam.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ class Iam(Blueprint):
def create_template(self) -> None:
"""Create template (main function called by CFNgin)."""
template = self.template
template.add_version("2010-09-09")
template.add_description("Kubernetes IAM policies - V1.0.0")
template.set_version("2010-09-09")
template.set_description("Kubernetes IAM policies - V1.0.0")

# Resources
nodeinstancerole = template.add_resource(
Expand Down
4 changes: 2 additions & 2 deletions runway/blueprints/k8s/k8s_master.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ class Cluster(Blueprint):
def create_template(self) -> None:
"""Create template (main function called by CFNgin)."""
template = self.template
template.add_version("2010-09-09")
template.add_description("Kubernetes Master via EKS - V1.0.0")
template.set_version("2010-09-09")
template.set_description("Kubernetes Master via EKS - V1.0.0")

# Resources
ccpsecuritygroup = template.add_resource(
Expand Down
6 changes: 3 additions & 3 deletions runway/blueprints/k8s/k8s_workers.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,14 @@ class NodeGroup(Blueprint):
def create_template(self) -> None:
"""Create template (main function called by CFNgin)."""
template = self.template
template.add_version("2010-09-09")
template.add_description(
template.set_version("2010-09-09")
template.set_description(
"Kubernetes workers via EKS - V1.0.0 "
"- compatible with amazon-eks-node-v23+"
)

# Metadata
template.add_metadata(
template.set_metadata(
{
"AWS::CloudFormation::Interface": {
"ParameterGroups": [
Expand Down
2 changes: 1 addition & 1 deletion runway/cfngin/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ def fetch_git_package(self, config: GitCfnginPackageSourceDefinitionModel) -> No
try:
tmp_repo_path = os.path.join(tmp_dir, dir_name)
with Repo.clone_from(config.uri, tmp_repo_path) as repo:
repo.head.reference = ref
repo.head.set_reference(ref)
repo.head.reset(index=True, working_tree=True)
shutil.move(tmp_repo_path, self.package_cache_dir)
finally:
Expand Down
2 changes: 1 addition & 1 deletion runway/sources/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def fetch(self) -> Path:
with tempfile.TemporaryDirectory() as tmpdirname:
tmp_repo_path = Path(tmpdirname) / dir_name
with Repo.clone_from(self.uri, str(tmp_repo_path)) as repo:
repo.head.reference = ref
repo.head.set_reference(ref)
repo.head.reset(index=True, working_tree=True)
shutil.move(str(tmp_repo_path), self.cache_dir)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def lambda_function(self) -> awslambda.Function:

def create_template(self) -> None:
"""Create template."""
self.template.add_version("2010-09-09")
self.template.add_description("Test Lambda")
self.template.set_version("2010-09-09")
self.template.set_description("Test Lambda")
self.iam_role # pylint: disable=pointless-statement
self.lambda_function # pylint: disable=pointless-statement
4 changes: 0 additions & 4 deletions typings/troposphere/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,7 @@ class Template(object):
self, Description: Optional[str] = ..., Metadata: Optional[Dict[str, Any]] = ...
) -> None: ...
def set_description(self, description: str) -> None: ...
def add_description(self, description: str) -> None: ...
def set_metadata(self, metadata: Dict[str, Any]) -> None: ...
def add_metadata(self, metadata: Dict[str, Any]) -> None: ...
def add_condition(self, name: str, condition: AWSHelperFn) -> str: ...
def handle_duplicate_key(self, key: str) -> None: ...
def add_output(self, output: Output) -> Output: ...
Expand All @@ -225,9 +223,7 @@ class Template(object):
"""
...
def set_version(self, version: Optional[str] = ...) -> None: ...
def add_version(self, version: Optional[str] = ...) -> None: ...
def set_transform(self, transform: List[Any]) -> None: ...
def add_transform(self, transform: List[Any]) -> None: ...
def to_dict(self) -> Dict[str, Any]: ...
def set_parameter_label(self, parameter: Parameter, label: str) -> None:
"""
Expand Down

0 comments on commit 66af509

Please sign in to comment.