Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Environments #386

Merged
merged 80 commits into from
Sep 9, 2019
Merged

Environments #386

merged 80 commits into from
Sep 9, 2019

Conversation

EverlastingBugstopper
Copy link
Contributor

@EverlastingBugstopper EverlastingBugstopper commented Aug 2, 2019

This PR will add the feature described in #385.

TL;DR: Wrangler users want to be able to push their same workers project to multiple places, perhaps they have a production, staging, and dev worker. This PR allows them to do so with the introduction of the --env flag and some changes to wrangler.toml. Most notably, private has been deprecated, workers_dot_dev has been added as a boolean field, and you can specify new environments with [env.foo]. To read more, please see this document.

Contains

  • Adds tests for building with multiple environments
  • Separate deprecated tomls in fixture directory
  • parse multiple environments from wrangler.toml
  • deprecate --release
  • pass desired environment via --env or -e for wrangler publish from command line
  • add workers_dot_dev to wrangler.toml
  • define default behaviors at top of wrangler.toml and inherit throughout each environment
  • renames Project to Target, the reasoning behind this is that Project seems to describe an entire codebase, when what we're really doing is passing around an object that specifies where the worker is deployed to -- seems like Target is a more suitable name.
  • documentation for environments feature

Completed issues

Fixes #357, #385, #388

@EverlastingBugstopper EverlastingBugstopper changed the title [WIP] Add test for building with multiple environments [WIP] Add support with multiple environments Aug 9, 2019
@ashleygwilliams ashleygwilliams modified the milestones: 1.2.0, 1.3.0 Aug 12, 2019
@ashleymichal ashleymichal removed this from the 1.3.0 milestone Aug 15, 2019
@EverlastingBugstopper EverlastingBugstopper added status - needs review regression Something is broken, but works in previous releases and removed status - work in progress labels Sep 9, 2019
Copy link
Contributor

@ashleymichal ashleymichal left a comment

Choose a reason for hiding this comment

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

one weird comment on a result ? that appears impossible to hit in this implementation so prolly is fine.

src/commands/publish/mod.rs Show resolved Hide resolved
Copy link
Contributor

@gabbifish gabbifish left a comment

Choose a reason for hiding this comment

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

Since this is an amalgamation of smaller PRs I have already approved, reading through this didn't surface much for me to comment on. LGTM!

@EverlastingBugstopper EverlastingBugstopper merged commit 5d7b36f into master Sep 9, 2019
@delete-merged-branch delete-merged-branch bot deleted the avery/environments branch September 9, 2019 22:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
regression Something is broken, but works in previous releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unclear messaging of wrangler publish
4 participants