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

Update Variable.set return value + docs #13557

Merged
merged 8 commits into from
Jun 5, 2024
Merged

Conversation

jakekaplan
Copy link
Contributor

@jakekaplan jakekaplan commented May 24, 2024

This PR updates Variable.set to return the newly set value by default. If you pass as_object it will return the entire Variable object. This makes it a consistent interface with the get method.

This pr also updates the docs for the new get, set and unset interfaces. It also take into account the changes to @sync_compatible for when these methods can be used synchronously vs asynchronously.

@jakekaplan jakekaplan added enhancement An improvement of an existing feature docs labels May 24, 2024
@jakekaplan jakekaplan requested review from a team as code owners May 24, 2024 14:56
Copy link
Contributor

@discdiver discdiver left a comment

Choose a reason for hiding this comment

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

Thank you. One suggestion.

docs/guides/variables.md Outdated Show resolved Hide resolved
docs/guides/variables.md Outdated Show resolved Hide resolved
docs/guides/variables.md Outdated Show resolved Hide resolved
jakekaplan and others added 3 commits May 24, 2024 11:40
Co-authored-by: Jeff Hale <discdiver@users.noreply.github.com>
Co-authored-by: Jeff Hale <discdiver@users.noreply.github.com>
Copy link
Contributor

@billpalombi billpalombi left a comment

Choose a reason for hiding this comment

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

Couple nits

docs/guides/variables.md Outdated Show resolved Hide resolved
docs/guides/variables.md Outdated Show resolved Hide resolved
Co-authored-by: Bill Palombi <bill@prefect.io>
@discdiver discdiver self-requested a review May 24, 2024 18:06
Copy link
Contributor

@discdiver discdiver left a comment

Choose a reason for hiding this comment

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

One suggestion and looks like maybe one from Bill still, but approving for docs.

docs/guides/variables.md Outdated Show resolved Hide resolved
docs/guides/variables.md Outdated Show resolved Hide resolved
jakekaplan and others added 3 commits May 24, 2024 14:10
Co-authored-by: Jeff Hale <discdiver@users.noreply.github.com>
Co-authored-by: Jeff Hale <discdiver@users.noreply.github.com>
@jakekaplan jakekaplan merged commit 7d094f6 into main Jun 5, 2024
23 of 26 checks passed
@jakekaplan jakekaplan deleted the update-variable-set branch June 5, 2024 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs enhancement An improvement of an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants