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

feat: add draft commit workflow #681

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open

Conversation

keithmanville
Copy link
Collaborator

No description provided.

@keithmanville keithmanville linked an issue Nov 22, 2024 that may be closed by this pull request
3 tasks
@keithmanville keithmanville marked this pull request as ready for review December 5, 2024 18:05
@keithmanville keithmanville marked this pull request as draft December 5, 2024 18:17
@keithmanville keithmanville force-pushed the workflow-draft-commit branch 2 times, most recently from 63582d5 to 01f0fba Compare December 24, 2024 19:27
This commit adds a new workflow for committing drafts. Committing a draft will create a new resource
snapshot and delete the draft in a single transaction.

A draft can be either a draft of a new resource or draft modifications to an existing resource. For
draft modifications, the commit will be rejected if the snapshot the draft was based off of is not
longer the most recent snapshot. In this case an error is raised that contains detailed information
about the draft, the base snapshot, and the current snapshot so that the user can reconcile their
desired changes. A draft commit can also be rejected if the resource fails to be created for any
reason (e.g. name collisions or associations to invalid resources).

It also adds the workflow to the Python client and implements new tests for the workflow.
@keithmanville keithmanville marked this pull request as ready for review December 31, 2024 16:02
@@ -523,6 +523,32 @@ def build_group(group: models.Group) -> dict[str, Any]:
}


def build_resource(resource_type: str, resource_dict: dict) -> Any:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this isn't being used, remove it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement drafts commit workflow in the REST API
2 participants