This repository was archived by the owner on Sep 30, 2024. It is now read-only.
sg: ignore config overwrite when generating reference for docs#39367
Merged
Conversation
Finally fixing this after it made me say "ah! oh no" one too many times in the past few weeks. Here's what previously happened on THORSTEN & SG GENERATE: 1. Thorsten has a custom commandset named `horsegraph` in `sg.config.overwrite.yaml`, along with some other custom commands. 2. Thorsten creates a database migration/GraphQL schema addition/... 3. Thorsten runs `sg generate` 4. Thorsten commits and pushes commit 5. Thorsten sees that he pushed commit in which `sg`'s reference in the documentation now contains `"horsegraph"` as an official commandset to be used with `sg start` 6. Thorsten says "ah! oh no" and undoes changes ... multiple times. So what this does here is introduce a `disable-overwrite` flag that causes only the standard config to be read. It's then used in the `go:generate` directive that runs `sg help`.
Contributor
|
Codenotify: Notifying subscribers in OWNERS files for diff e3ec56a...27f4072.
|
jhchabran
approved these changes
Jul 25, 2022
jhchabran
left a comment
Contributor
There was a problem hiding this comment.
Thank you! I was about to ask where would we need the overwrite when generating stuff, but actually we do for the ./internal/database/gen.sh script for example.
Contributor
Author
It's in that one |
coury-clark
pushed a commit
that referenced
this pull request
Jul 25, 2022
Finally fixing this after it made me say "ah! oh no" one too many times in the past few weeks. Here's what previously happened on THORSTEN & SG GENERATE: 1. Thorsten has a custom commandset named `horsegraph` in `sg.config.overwrite.yaml`, along with some other custom commands. 2. Thorsten creates a database migration/GraphQL schema addition/... 3. Thorsten runs `sg generate` 4. Thorsten commits and pushes commit 5. Thorsten sees that he pushed commit in which `sg`'s reference in the documentation now contains `"horsegraph"` as an official commandset to be used with `sg start` 6. Thorsten says "ah! oh no" and undoes changes ... multiple times. So what this does here is introduce a `disable-overwrite` flag that causes only the standard config to be read. It's then used in the `go:generate` directive that runs `sg help`.
efritz
pushed a commit
that referenced
this pull request
Jul 26, 2022
Finally fixing this after it made me say "ah! oh no" one too many times in the past few weeks. Here's what previously happened on THORSTEN & SG GENERATE: 1. Thorsten has a custom commandset named `horsegraph` in `sg.config.overwrite.yaml`, along with some other custom commands. 2. Thorsten creates a database migration/GraphQL schema addition/... 3. Thorsten runs `sg generate` 4. Thorsten commits and pushes commit 5. Thorsten sees that he pushed commit in which `sg`'s reference in the documentation now contains `"horsegraph"` as an official commandset to be used with `sg start` 6. Thorsten says "ah! oh no" and undoes changes ... multiple times. So what this does here is introduce a `disable-overwrite` flag that causes only the standard config to be read. It's then used in the `go:generate` directive that runs `sg help`.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Finally fixing this after it made me say "ah! oh no" one too many times
in the past few weeks.
Here's what previously happened on THORSTEN & SG GENERATE:
horsegraphinsg.config.overwrite.yaml, along with some other custom commands.sg generatesg's reference in thedocumentation now contains
"horsegraph"as an official commandsetto be used with
sg start... multiple times.
So what this does here is introduce a
disable-overwriteflag thatcauses only the standard config to be read.
It's then used in the
go:generatedirective that runssg help.Test plan
-disable-overwrite) but no custom commands.