Skip to content
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

Bump inmanta-dev-dependencies[async,core,pytest,sphinx] from 2.56.0 to 2.57.0 #5502

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions changelogs/unreleased/5502-dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
change-type: patch
description: Bump inmanta-dev-dependencies[async,core,pytest,sphinx] from 2.56.0 to
2.57.0
destination-branches:
- master
- iso6
sections: {}
2 changes: 1 addition & 1 deletion requirements.dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
inmanta-dev-dependencies[pytest,async,core,sphinx]==2.56.0
inmanta-dev-dependencies[pytest,async,core,sphinx]==2.57.0
bumpversion==0.6.0
openapi_spec_validator==0.5.4
pip2pi==0.8.2
Expand Down
1 change: 0 additions & 1 deletion src/inmanta/agent/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ def actual(f: Callable) -> T_FUNC:
myargs = list(sig.parameters.keys())[1:]

def wrapper(self, *args: object, **kwds: object) -> object:

kwds.update(dict(zip(myargs, args)))

def bound(**kwds):
Expand Down
1 change: 0 additions & 1 deletion src/inmanta/ast/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
from inmanta.execute.runtime import QueueScheduler, Resolver

if TYPE_CHECKING:

from inmanta.execute.runtime import ExecutionContext


Expand Down
1 change: 0 additions & 1 deletion src/inmanta/ast/statements/assign.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,6 @@ def receive_result(self, value: T, location: Location) -> None:


class SetAttributeHelper(ExecutionUnit):

__slots__ = ("stmt", "instance", "attribute_name")

def __init__(
Expand Down
1 change: 0 additions & 1 deletion src/inmanta/ast/statements/call.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,6 @@ def call_in_context(


class FunctionUnit(Waiter):

__slots__ = ("result", "base_requires", "function", "resolver")

def __init__(self, queue_scheduler, resolver, result: ResultVariable, requires, function: FunctionCall) -> None:
Expand Down
8 changes: 4 additions & 4 deletions src/inmanta/ast/statements/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ def pretty_print(self) -> str:
)

def _normalize_rhs(self, index_attributes: abc.Set[str]) -> None:
for (k, v) in self.__attributes.items():
for k, v in self.__attributes.items():
# don't notify the rhs for index attributes because it won't be able to resolve the reference
# (index attributes need to be resolved before the instance can be constructed)
v.normalize(lhs_attribute=AttributeAssignmentLHS(self._self_ref, k) if k not in index_attributes else None)
Expand Down Expand Up @@ -557,7 +557,7 @@ def normalize(self, *, lhs_attribute: Optional[AttributeAssignmentLHS] = None) -

self._normalize_rhs(inindex)

for (k, v) in all_attributes.items():
for k, v in all_attributes.items():
attribute = self.type.get_attribute(k)
if attribute is None:
raise TypingException(self, "no attribute %s on type %s" % (k, self.type.get_full_name()))
Expand Down Expand Up @@ -605,7 +605,7 @@ def requires_emit(self, resolver: Resolver, queue: QueueScheduler) -> Dict[objec
if graph is not None:
node: dataflow.InstanceNodeReference = self._register_dataflow_node(graph)
# TODO: also add wrapped_kwargs
for (k, v) in chain(self._direct_attributes.items(), self._indirect_attributes.items()):
for k, v in chain(self._direct_attributes.items(), self._indirect_attributes.items()):
node.assign_attribute(k, v.get_dataflow_node(graph), self, graph)

return requires
Expand All @@ -623,7 +623,7 @@ def _collect_required_dynamic_arguments(
# kwargs
kwarg_attrs: dict[str, object] = {}
for kwargs in self.wrapped_kwargs:
for (k, v) in kwargs.execute(requires, resolver, queue):
for k, v in kwargs.execute(requires, resolver, queue):
if k in self.attributes or k in kwarg_attrs:
raise RuntimeException(
self, "The attribute %s is set twice in the constructor call of %s." % (k, self.class_type)
Expand Down
1 change: 0 additions & 1 deletion src/inmanta/compiler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ def compile(self) -> Tuple[List["Statement"], List["BasicBlock"]]:

# load plugins
for name, cls in PluginMeta.get_functions().items():

mod_ns = cls.__module__.split(".")
if mod_ns[0] != const.PLUGINS_PACKAGE:
raise Exception(
Expand Down
1 change: 1 addition & 0 deletions src/inmanta/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@ def get_default_nodename() -> str:
nodename = Option("config", "node-name", get_default_nodename, "Force the hostname of this machine to a specific value", is_str)
feature_file_config = Option("config", "feature-file", None, "The loacation of the inmanta feature file.", is_str_opt)


###############################
# Transport Config
###############################
Expand Down
2 changes: 1 addition & 1 deletion src/inmanta/data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3333,7 +3333,7 @@ async def update_primary(
primary. If the session id is None, the Agent doesn't have a primary anymore.
:param now: Timestamp of this failover
"""
for (endpoint, sid) in endpoints_with_new_primary:
for endpoint, sid in endpoints_with_new_primary:
# Lock mode is required because we will update in this transaction
# Deadlocks with cleanup otherwise
agent = await cls.get(env, endpoint, connection=connection, lock=RowLockMode.FOR_UPDATE)
Expand Down
1 change: 0 additions & 1 deletion src/inmanta/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ class ConflictingRequirements(CompilerException):
"""

def __init__(self, message: str, conflicts: Optional[Set[VersionConflict]] = None):

CompilerException.__init__(self, msg=message)
self.conflicts = conflicts

Expand Down
6 changes: 1 addition & 5 deletions src/inmanta/execute/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,6 @@ def execute(self) -> None:


class Resolver(object):

__slots__ = ("namespace", "dataflow_graph")

def __init__(self, namespace: Namespace, enable_dataflow_graph: bool = False) -> None:
Expand Down Expand Up @@ -1080,7 +1079,6 @@ def get_root_resolver(self) -> "Resolver":


class NamespaceResolver(Resolver):

__slots__ = ("parent", "root")

def __init__(self, parent: Resolver, lecial_root: Namespace) -> None:
Expand All @@ -1103,7 +1101,6 @@ def get_root_resolver(self) -> "Resolver":


class ExecutionContext(Resolver):

__slots__ = ("block", "slots", "resolver")

def __init__(self, block: "BasicBlock", resolver: Resolver):
Expand Down Expand Up @@ -1275,9 +1272,8 @@ def dump(self) -> None:
print("------------ ")
print(str(self))
print("------------ ")
for (n, v) in self.slots.items():
for n, v in self.slots.items():
if v.can_get():

value = v.value
print("%s\t\t%s" % (n, value))
else:
Expand Down
2 changes: 1 addition & 1 deletion src/inmanta/execute/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def define_types(self, compiler: "Compiler", statements: Sequence["Statement"],
k for k in [t.register_types() for t in definitions if isinstance(t, TypeDefinitionStatement)] if k is not None
]

for (name, type_symbol) in newtypes:
for name, type_symbol in newtypes:
types_and_impl[name] = type_symbol

# now that we have objects for all types, populate them
Expand Down
2 changes: 0 additions & 2 deletions src/inmanta/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ def to_dict(self) -> JsonType:

@staticmethod
def from_dict(ctx: JsonType) -> None:

return Attribute(
mytype=ctx["type"],
nullable=ctx["nullable"],
Expand Down Expand Up @@ -163,7 +162,6 @@ class ReferenceValue(Value):
"""

def __init__(self, reference):

self.reference = reference

def to_dict(self) -> JsonType:
Expand Down
4 changes: 1 addition & 3 deletions src/inmanta/moduletool.py
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,6 @@ def show_bool(b: bool) -> str:
names: Sequence[str] = sorted(project.modules.keys())
specs: Dict[str, List[InmantaModuleRequirement]] = project.collect_imported_requirements()
for name in names:

mod: Module = Project.get().modules[name]
version = str(mod.version)
if name not in specs:
Expand Down Expand Up @@ -1523,7 +1522,6 @@ def destroy(self) -> None:


class V2ModuleBuilder:

DISABLE_ISOLATED_ENV_BUILDER_CACHE: bool = False

def __init__(self, module_path: str) -> None:
Expand Down Expand Up @@ -1668,7 +1666,7 @@ def should_ignore(name: str) -> bool:
if not os.path.isdir(directory):
raise Exception(f"{directory} is not a directory")
result: Set[str] = set()
for (dirpath, dirnames, filenames) in os.walk(directory):
for dirpath, dirnames, filenames in os.walk(directory):
if should_ignore(os.path.basename(dirpath)):
# ignore whole subdirectory
continue
Expand Down
2 changes: 0 additions & 2 deletions src/inmanta/protocol/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,6 @@ class InvalidMethodDefinition(Exception):


class MethodArgumentsBaseModel(pydantic.BaseModel):

_normalize_timestamps: ClassVar[classmethod] = pydantic.validator("*", allow_reuse=True)(
validator_timezone_aware_timestamps
)
Expand Down Expand Up @@ -680,7 +679,6 @@ def arg_options(self) -> Dict[str, ArgOption]:

@property
def timeout(self) -> Optional[int]:

return self._timeout

@property
Expand Down
1 change: 0 additions & 1 deletion src/inmanta/server/agentmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,6 @@ async def request_parameter(self, env_id: uuid.UUID, resource_id: ResourceIdStr)
resource_id not in self._fact_resource_block_set
or (self._fact_resource_block_set[resource_id] + self._fact_resource_block) < now
):

agents = await data.ConfigurationModel.get_agents(env.id, version)
await self._autostarted_agent_manager._ensure_agents(env, agents)

Expand Down
1 change: 0 additions & 1 deletion src/inmanta/server/bootloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ def iter_namespace(ns_pkg: ModuleType) -> Generator[ModuleInfo, None, None]:


class PluginLoadFailed(Exception):

pass


Expand Down
1 change: 0 additions & 1 deletion src/inmanta/server/services/compilerservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,6 @@ async def get_compile_reports(
filter: Optional[Dict[str, List[str]]] = None,
sort: str = "requested.desc",
) -> ReturnValue[Sequence[model.CompileReport]]:

try:
handler = CompileReportView(env, limit, filter, sort, first_id, last_id, start, end)
return await handler.execute()
Expand Down
3 changes: 0 additions & 3 deletions src/inmanta/server/services/resourceservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,6 @@ async def resource_list(
sort: str = "resource_type.desc",
deploy_summary: bool = False,
) -> ReturnValueWithMeta[Sequence[LatestReleasedResource]]:

try:
handler = ResourceView(env, limit, first_id, last_id, start, end, filter, sort, deploy_summary)

Expand All @@ -917,7 +916,6 @@ async def resource_list(

@handle(methods_v2.resource_details, env="tid")
async def resource_details(self, env: data.Environment, rid: ResourceIdStr) -> ReleasedResourceDetails:

details = await data.Resource.get_resource_details(env.id, rid)
if not details:
raise NotFound("The resource with the given id does not exist, or was not released yet in the given environment.")
Expand Down Expand Up @@ -982,7 +980,6 @@ async def get_resources_in_version(
filter: Optional[Dict[str, List[str]]] = None,
sort: str = "resource_type.desc",
) -> ReturnValueWithMeta[Sequence[VersionedResource]]:

try:
handler = ResourcesInVersionView(env, version, limit, filter, sort, first_id, last_id, start, end)
return await handler.execute()
Expand Down
1 change: 0 additions & 1 deletion tests/agent_server/test_evolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ def update_resource(self, ctx: HandlerContext, changes: dict, resource: Purgeabl


async def test_resource_evolution(server, client, environment, no_agent_backoff, snippetcompiler, monkeypatch, async_finalizer):

provider = resource_container_a()

agent = await get_agent(server, environment, "agent1")
Expand Down
1 change: 0 additions & 1 deletion tests/compiler/test_execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,6 @@ def test_lazy_attibutes3(snippetcompiler):


def test_veryhardsequencing(snippetcompiler):

snippetcompiler.setup_for_snippet(
"""
implementation none for std::Entity:
Expand Down
1 change: 0 additions & 1 deletion tests/compiler/test_is_defined.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ def gen(var):
if mode % 2 == 0:
var = f"self.{var}"
if mode == 1 or mode == 2:

return f"""
implementation printt for A:
std::print("true")
Expand Down
3 changes: 0 additions & 3 deletions tests/compiler/test_resolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ def test_issue_110_resolution(snippetcompiler):


def test_issue_134_colliding_umplementations(snippetcompiler):

snippetcompiler.setup_for_snippet(
"""
implementation test for std::Entity:
Expand Down Expand Up @@ -122,7 +121,6 @@ def test_400_typeloops_2(snippetcompiler):


def test_438_parent_scopes_accessible(snippetcompiler):

snippetcompiler.setup_for_snippet(
"""
entity Host:
Expand Down Expand Up @@ -160,7 +158,6 @@ def test_438_parent_scopes_accessible(snippetcompiler):


def test_438_parent_scopes_accessible_2(snippetcompiler):

snippetcompiler.setup_for_snippet(
"""
entity Host:
Expand Down
2 changes: 0 additions & 2 deletions tests/data/modules/exp/plugins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ class Test2(resources.PurgeableResource):

@resources.resource("exp::Test3", id_attribute="name", agent="name")
class Test3(resources.PurgeableResource):

fields = (
"name",
"real_name",
Expand All @@ -57,7 +56,6 @@ def get_real_name(_, entity):

@resources.resource("exp::RequiresTest", agent="agent", id_attribute="name")
class RequiresTest(resources.PurgeableResource):

fields = ("name", "agent", "do_break")


Expand Down
2 changes: 0 additions & 2 deletions tests/db/test_db_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,6 @@ async def test_dbschema_ensure_self_update(


async def test_dbschema_update_db_schema(postgresql_client, get_columns_in_db_table, hard_clean_db, hard_clean_db_post):

db_schema = schema.DBSchema("test_dbschema_update_db_schema", inmanta.db.versions, postgresql_client)
await db_schema.ensure_self_update()

Expand Down Expand Up @@ -382,7 +381,6 @@ def disabled(module: types.ModuleType) -> bool:
async def test_multi_upgrade_lockout(postgresql_pool, get_columns_in_db_table, hard_clean_db):
async with postgresql_pool.acquire() as postgresql_client:
async with postgresql_pool.acquire() as postgresql_client2:

# schedule 3 updates, hang on second, unblock one, verify, unblock other, verify
corev: Set[int] = await get_core_versions(postgresql_client)

Expand Down
1 change: 0 additions & 1 deletion tests/db/test_restore_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@


async def test_pg_restore(hard_clean_db, hard_clean_db_post, postgresql_client: Connection):

inp = r"""
CREATE TABLE public.agent (
environment uuid NOT NULL,
Expand Down
1 change: 0 additions & 1 deletion tests/moduletool/test_module_tool_basics.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ def test_rewrite(tmpdir, module_type: Type[module.Module]):

def metadata_contents(version: str, version_tag: str = "") -> str:
if v1:

return f"""
name: mod
license: ASL
Expand Down
2 changes: 1 addition & 1 deletion tests/server/test_compilerservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -1184,7 +1184,7 @@ async def test_compileservice_auto_recompile_wait(

LogSequence(caplog, allow_errors=False).contains(
"inmanta.server.services.compilerservice", logging.DEBUG, "Running recompile without waiting"
).contains("inmanta.server.services.compilerservice", expected_log_level, expected_log_message,).contains(
).contains("inmanta.server.services.compilerservice", expected_log_level, expected_log_message).contains(
"inmanta.server.services.compilerservice", logging.DEBUG, "Running recompile without waiting"
)

Expand Down
1 change: 0 additions & 1 deletion tests/server/test_incremental_deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ def add_resource(
return rid

async def setup_agent(self, server, environment):

agentmanager = server.get_slice(SLICE_AGENT_MANAGER)

endpoints = list(self.results.keys())
Expand Down
2 changes: 0 additions & 2 deletions tests/server/test_resource_action_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,6 @@ async def test_filter_validation(server, client, filter, expected_status, env_wi


async def test_log_without_kwargs(server, client, environment: str):

await data.ConfigurationModel(
environment=uuid.UUID(environment),
version=1,
Expand Down Expand Up @@ -357,7 +356,6 @@ async def test_log_without_kwargs(server, client, environment: str):


async def test_log_nested_kwargs(server, client, environment: str):

await data.ConfigurationModel(
environment=uuid.UUID(environment),
version=1,
Expand Down
Loading