Create --variant flag, deprecate --tag flag#1849
Merged
JakeDawkins merged 21 commits intomasterfrom Mar 25, 2020
Merged
Conversation
4 tasks
JakeDawkins
reviewed
Mar 25, 2020
|
|
||
| set tag(tag: string) { | ||
| this._tag = tag; | ||
| set variant(tag: string) { |
Contributor
There was a problem hiding this comment.
My only concern is if this breaks anything in vs code. But I don’t think it should
Contributor
Author
There was a problem hiding this comment.
I admit I didn't test with VS code, but mainly because I don't know how to test a local build! Is there a QA practice we go through before release?
Contributor
There was a problem hiding this comment.
Not in a consistent way! I’ll run through all this before releasing, but I don’t expect any issue here since it only interfaces with the language server anyway :)
JakeDawkins
reviewed
Mar 25, 2020
|
|
||
| - `apollo` | ||
| - <First `apollo` related entry goes here> | ||
| - https://github.com/apollographql/apollo-tooling/pull/1849 |
Contributor
There was a problem hiding this comment.
Formatting of this entry isn’t consistent with what we have but I’m not concerned too much there, and that’s non blocking. I can amend before releasing since I’ll have to do that anyway
added 21 commits
March 25, 2020 11:19
These default flags were still referencing Apollo Engine instead of Graph Manager (even though some were hidden). Additionally, this updates the docs to be more accurate. Happy to take this commit into another PR if you'd like!
This change supports the variant flag (with character -v) in addition to the "tag" flag, which allows us to start using the new terminology. The '--tag' flag is still supported, and there is verification that the two sibling flags cannot be used together.
Also remove an unused variable in service:list
Also update description of the flags
Also simplify an import in apollo-language-server Also add a XXX comment to service:download to illustrate a problem
Additionally, this updates the text output in the service:check command to consistently use graph@variant everywhere
This is a find and replace all, and I verified every command still works after this (both with --tag and --variant). Will post screenshots of how everything looks in the PR :)
A previous commit added `@variant` everywhere, and these snapshot updates should be ONLY that.
All of the client commands share common flags, so no further changes are required. Also, all of them use config.variant, so yay! :)
Remove the deprecation warning from specific callsites and rely on the deprecation warning appearing when the config.variant value is set
Also, this changes the default value of the flag, but it does NOT change the behaviour, since `config.variant` always defaults to "current" if flags and configuration are not set. The reason this was done is because flags.tag will be non-null if there is a default, which causes the deprecation message to always print
Mainly renaming service to graph and "schema" to service, which felt a little meh, but more in line with the name of the command
This should only include changes to some minor message changes in service:check
2497248 to
85e49e9
Compare
zionts
pushed a commit
that referenced
this pull request
Mar 27, 2020
This supports a more modern name for the API key and adds deprecation messages for the (now legacy) ENGINE_API_KEY. Much in the same spirit as #1849, the goal is to modernize our documentation to no longer use the out-of-date name "engine". This also modifies tests to support the new version and adds a test that ensures an error is thrown when a user sets _both_ keys.
This was referenced Mar 27, 2020
JakeDawkins
pushed a commit
that referenced
this pull request
Mar 30, 2020
* Support APOLLO_KEY, deprecate ENGINE_API_KEY This supports a more modern name for the API key and adds deprecation messages for the (now legacy) ENGINE_API_KEY. Much in the same spirit as #1849, the goal is to modernize our documentation to no longer use the out-of-date name "engine". This also modifies tests to support the new version and adds a test that ensures an error is thrown when a user sets _both_ keys.
4 tasks
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR changes all commands that previously used a
--tagflag to additionally include a--variant(alias -v) flag that can be used instead. These two different flags are exclusive, so no command can pass both a --tag and a --variant. The PR may look daunting at a glance, but please go commit-by-commit to see the progression, and I hope that will make it really manageable! These changes were QA'ed manually, and all tests were updated and inspected to ensure that they continued to work as expected. Some other small changes were added, which are noted in commit messages.This is rebased off of #1847 , so check that one out first :)
See apollographql/apollo#819 for the corresponding documentation update 🎉
Notably, they include:
service:checkto include@variantwhere appropriateflags.tagdirectly rather thanconfig.tag, in GraphQL commands. This could have caused issues for people that were not using a--tagflag but instead were usingservice { name: 'blah@foo' }, in that their command would fail unexpectedly.Error message when both --tag and --variant are set:

client:pushwith --tag (note deprecation warning):client:pushwith --variant:client:checkwith --tag:client:checkwith --variant:client:codegenwith --tag:client:codegenwith --variant:service:push(federated) with --tag:service:push(un-federated) with --variant:service:check(un-federated) with --tag:service:check(federated) with --variant:service:listwith --tag:service:listwith --variant:service:listwith neither --tag nor --variant, just to show that defaults work :)Also throwback to #1398 🎉 Credit to former me & @jgzuke for inspiration, along with whomever made the
configmagic (which I think may have been @trevor-scheer?), which I relied on heavily here :)TODO:
*Make sure changelog entries note which project(s) has been affected. See older entries for examples on what this looks like.