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

Transaction helper #21

Closed
trieloff opened this issue Jan 14, 2019 · 1 comment · Fixed by #22
Closed

Transaction helper #21

trieloff opened this issue Jan 14, 2019 · 1 comment · Fixed by #22
Labels
enhancement New feature or request released

Comments

@trieloff
Copy link

It would be cool to wrap the boilerplate code needed to make modifications (create version, activate version) in a small transaction helper like this:

await fastly.transact(async (newversion) => {
  await fastly.doSomething(newversion);
});
// new version has been activated

or

fastly.dryrun(async (newversion) => {
  await fastly.doSomething(newversion);
});
// new version will not be activated
@trieloff trieloff added the enhancement New feature or request label Jan 14, 2019
trieloff added a commit that referenced this issue Jan 14, 2019
Adds two functions `transact` and `dryrun` that both create a new version of the currently active
service config, then apply a set of changes (specified in a function) to it and either activate the
new version (`transact`) or leave it as is (`dryrun`)

fixes #21
trieloff pushed a commit that referenced this issue Jan 14, 2019
# [1.1.0](v1.0.3...v1.1.0) (2019-01-14)

### Features

* **fastly:** Add basic transaction support ([15a4f29](15a4f29)), closes [#21](#21)
@trieloff
Copy link
Author

🎉 This issue has been resolved in version 1.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant