-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(release controller): Only update posts if different and can_edit (#…
…391) * fix(release controller): Only update posts if different and can_edit Also update some related tests * Some missing files * some missing files and reviewer feedback applied * Add back attributes required in tests
- Loading branch information
1 parent
d328d8d
commit 846345a
Showing
9 changed files
with
106 additions
and
52 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,57 +1,61 @@ | ||
# generated by datamodel-codegen: | ||
# filename: release-index-schema.json | ||
|
||
from __future__ import annotations | ||
|
||
from datetime import date | ||
from typing import List, Optional | ||
from typing import List | ||
from typing import Optional | ||
|
||
from pydantic import BaseModel, ConfigDict, RootModel | ||
from pydantic import BaseModel | ||
from pydantic import ConfigDict | ||
from pydantic import RootModel | ||
|
||
|
||
class Version(BaseModel): | ||
model_config = ConfigDict( | ||
extra='forbid', | ||
) | ||
"""A version of the release.""" | ||
|
||
model_config = ConfigDict(extra="forbid") | ||
version: str | ||
name: str | ||
subnets: Optional[List[str]] = None | ||
|
||
|
||
class Stage(BaseModel): | ||
model_config = ConfigDict( | ||
extra='forbid', | ||
) | ||
"""A stage in the rollout.""" | ||
|
||
model_config = ConfigDict(extra="forbid") | ||
subnets: Optional[List[str]] = None | ||
bake_time: Optional[str] = None | ||
update_unassigned_nodes: Optional[bool] = None | ||
wait_for_next_week: Optional[bool] = None | ||
|
||
|
||
class Release(BaseModel): | ||
model_config = ConfigDict( | ||
extra='forbid', | ||
) | ||
"""A release.""" | ||
|
||
model_config = ConfigDict(extra="forbid") | ||
rc_name: str | ||
versions: List[Version] | ||
|
||
|
||
class Rollout(BaseModel): | ||
model_config = ConfigDict( | ||
extra='forbid', | ||
) | ||
"""A rollout.""" | ||
|
||
model_config = ConfigDict(extra="forbid") | ||
pause: Optional[bool] = None | ||
skip_days: Optional[List[date]] = None | ||
stages: List[Stage] | ||
|
||
|
||
class ReleaseIndex(BaseModel): | ||
model_config = ConfigDict( | ||
extra='forbid', | ||
) | ||
"""The release index.""" | ||
|
||
model_config = ConfigDict(extra="forbid") | ||
rollout: Rollout | ||
releases: List[Release] | ||
|
||
|
||
class Model(RootModel[ReleaseIndex]): | ||
"""The root model.""" | ||
|
||
root: ReleaseIndex |
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