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 versions and changelog for hotfix v2.32.1 #1740

Merged
merged 3 commits into from
Dec 5, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
)
from .model import ( # noqa: F401
BaseConfigModel,
BaseEndpointConfigModel,
ManagerEndpointConfigModel,
UserEndpointConfigModel,
)
Expand Down
41 changes: 20 additions & 21 deletions compute_endpoint/globus_compute_endpoint/endpoint/config/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,8 @@ def inner(cls, model: t.Optional[BaseModel]):


class BaseConfigModel(BaseModel):
multi_user: t.Optional[bool]
display_name: t.Optional[str]
allowed_functions: t.Optional[t.List[uuid.UUID]]
authentication_policy: t.Optional[uuid.UUID]
subscription_id: t.Optional[uuid.UUID]
amqp_port: t.Optional[int]
heartbeat_period: t.Optional[int]
environment: t.Optional[str]
local_compute_services: t.Optional[bool]
debug: t.Optional[bool]
class Config:
extra = "allow"


class AddressModel(BaseConfigModel):
Expand Down Expand Up @@ -81,9 +73,6 @@ class ChannelModel(BaseConfigModel):


class ProviderModel(BaseConfigModel):
class Config:
extra = "allow"

type: str
channel: t.Optional[ChannelModel]
launcher: t.Optional[LauncherModel]
Expand Down Expand Up @@ -154,7 +143,23 @@ def _validate_provider_container_compatibility(cls, values: dict):
return values


class UserEndpointConfigModel(BaseConfigModel):
class BaseEndpointConfigModel(BaseModel):
multi_user: t.Optional[bool]
display_name: t.Optional[str]
allowed_functions: t.Optional[t.List[uuid.UUID]]
authentication_policy: t.Optional[uuid.UUID]
subscription_id: t.Optional[uuid.UUID]
amqp_port: t.Optional[int]
heartbeat_period: t.Optional[int]
environment: t.Optional[str]
local_compute_services: t.Optional[bool]
debug: t.Optional[bool]

class Config:
extra = "forbid"


class UserEndpointConfigModel(BaseEndpointConfigModel):
engine: EngineModel
heartbeat_threshold: t.Optional[int]
idle_heartbeats_soft: t.Optional[int]
Expand All @@ -168,9 +173,6 @@ class UserEndpointConfigModel(BaseConfigModel):

_validate_engine = _validate_params("engine")

class Config:
extra = "forbid"

def dict(self, *args, **kwargs):
# Slight modification is needed here since we still
# store the engine/executor in a list named executors
Expand All @@ -181,12 +183,9 @@ def dict(self, *args, **kwargs):
return ret


class ManagerEndpointConfigModel(BaseConfigModel):
class ManagerEndpointConfigModel(BaseEndpointConfigModel):
public: t.Optional[bool]
identity_mapping_config_path: t.Optional[FilePath]
force_mu_allow_same_user: t.Optional[bool]
mu_child_ep_grace_period_s: t.Optional[float]
pam: t.Optional[PamConfiguration]

class Config:
extra = "forbid"
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,12 @@ def load_config_yaml(config_str: str) -> UserEndpointConfig | ManagerEndpointCon
try:
ConfigClass: type[UserEndpointConfig | ManagerEndpointConfig]
if is_templatable:
from . import BaseConfigModel, ManagerEndpointConfigModel
from . import BaseEndpointConfigModel, ManagerEndpointConfigModel

ConfigClass = ManagerEndpointConfig
config_schema: BaseConfigModel = ManagerEndpointConfigModel(**config_dict)
config_schema: BaseEndpointConfigModel = ManagerEndpointConfigModel(
**config_dict
)
else:
from . import UserEndpointConfigModel

Expand Down
2 changes: 1 addition & 1 deletion compute_endpoint/globus_compute_endpoint/version.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# single source of truth for package version,
# see https://packaging.python.org/en/latest/single_source_version/
__version__ = "2.32.0"
__version__ = "2.32.1"

# TODO: remove after a `globus-compute-sdk` release
# this is needed because it's imported by `globus-compute-sdk` to do the version check
Expand Down
2 changes: 1 addition & 1 deletion compute_endpoint/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
REQUIRES = [
"requests>=2.31.0,<3",
"globus-sdk", # version will be bounded by `globus-compute-sdk`
"globus-compute-sdk==2.32.0",
"globus-compute-sdk==2.32.1",
"globus-compute-common==0.5.0",
"globus-identity-mapping==0.4.0",
# table printing used in list-endpoints
Expand Down
17 changes: 17 additions & 0 deletions compute_endpoint/tests/unit/test_endpoint_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,3 +229,20 @@ def test_managerconfig_repr_nondefault_kwargs(
repr_c = repr(ManagerEndpointConfig(**{kw: val}))

assert f"{kw}={repr(val)}" in repr_c


def test_engine_model_objects_allow_extra():
config_dict = {
"engine": {
"type": "GlobusComputeEngine",
"address": {
"type": "address_by_interface",
"ifname": "lo", # Not specified in model
},
"provider": {
"type": "LocalProvider",
"max_blocks": 2, # Not specified in model
},
}
}
UserEndpointConfigModel(**config_dict)
2 changes: 1 addition & 1 deletion compute_sdk/globus_compute_sdk/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# single source of truth for package version,
# see https://packaging.python.org/en/latest/single_source_version/
__version__ = "2.32.0"
__version__ = "2.32.1"


def compare_versions(
Expand Down
11 changes: 11 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@ Changelog

.. scriv-insert-here

.. _changelog-2.32.1:

globus-compute-sdk & globus-compute-endpoint v2.32.1
----------------------------------------------------

Bug Fixes
^^^^^^^^^

- Fixed an issue where valid endpoint configuration variables were ignored,
causing spurious validation errors.

.. _changelog-2.32.0:

globus-compute-sdk & globus-compute-endpoint v2.32.0
Expand Down
Loading