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

refactor: point go code to the stable docs #5905

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/ddev/cmd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ func handleMainConfigArgs(cmd *cobra.Command, _ []string, app *ddevapp.DdevApp)
// If the database already exists in volume and is not of this type, then throw an error
if !nodeps.ArrayContainsString(app.GetOmittedContainers(), "db") {
if dbType, err := app.GetExistingDBType(); err != nil || (dbType != "" && dbType != app.Database.Type+":"+app.Database.Version) {
return fmt.Errorf("unable to configure project %s with database type %s because that database type does not match the current actual database. Please change your database type back to %s and start again, export, delete, and then change configuration and start. To get back to existing type use 'ddev config --database=%s', and you can try a migration with 'ddev debug migrate-database %s' see docs at %s", app.Name, dbType, dbType, dbType, app.Database.Type+":"+app.Database.Version, "https://ddev.readthedocs.io/en/latest/users/extend/database-types/")
return fmt.Errorf("unable to configure project %s with database type %s because that database type does not match the current actual database. Please change your database type back to %s and start again, export, delete, and then change configuration and start. To get back to existing type use 'ddev config --database=%s', and you can try a migration with 'ddev debug migrate-database %s' see docs at %s", app.Name, dbType, dbType, dbType, app.Database.Type+":"+app.Database.Version, "https://ddev.readthedocs.io/en/stable/users/extend/database-types/")
}
}

Expand Down
6 changes: 3 additions & 3 deletions cmd/ddev/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var RootCmd = &cobra.Command{
Short: "DDEV local development environment",
Long: `Create and maintain a local web development environment.
Docs: https://ddev.readthedocs.io
Support: https://ddev.readthedocs.io/en/stable/users/support`,
Support: https://ddev.readthedocs.io/en/stable/users/support/`,
Version: versionconstants.DdevVersion,
PersistentPreRun: func(cmd *cobra.Command, args []string) {
command := os.Args[1]
Expand Down Expand Up @@ -175,7 +175,7 @@ func init() {
_, err := dockerutil.GetDockerVersion()
// ddev --version may be called without Docker available.
if err != nil && len(os.Args) > 1 && os.Args[1] != "--version" && os.Args[1] != "hostname" {
util.Failed("Could not connect to a Docker provider. Please start or install a Docker provider.\nFor install help go to: https://ddev.readthedocs.io/en/latest/users/install/")
util.Failed("Could not connect to a Docker provider. Please start or install a Docker provider.\nFor install help go to: https://ddev.readthedocs.io/en/stable/users/install/docker-installation/")
}

// Populate custom/script commands so they're visible.
Expand All @@ -202,7 +202,7 @@ func init() {
// and update the info.
func checkDdevVersionAndOptInInstrumentation(skipConfirmation bool) error {
if !output.JSONOutput && semver.Compare(versionconstants.DdevVersion, globalconfig.DdevGlobalConfig.LastStartedVersion) > 0 && globalconfig.DdevGlobalConfig.InstrumentationOptIn == false && !globalconfig.DdevNoInstrumentation && !skipConfirmation {
allowStats := util.Confirm("It looks like you have a new DDEV release.\nMay we send anonymous DDEV usage statistics and errors?\nTo know what we will see please take a look at\nhttps://ddev.readthedocs.io/en/latest/users/usage/diagnostics/#opt-in-usage-information\nPermission to beam up?")
allowStats := util.Confirm("It looks like you have a new DDEV release.\nMay we send anonymous DDEV usage statistics and errors?\nTo know what we will see please take a look at\nhttps://ddev.readthedocs.io/en/stable/users/usage/diagnostics/#opt-in-usage-information\nPermission to beam up?")
if allowStats {
globalconfig.DdevGlobalConfig.InstrumentationOptIn = true
client, _ := analytics.NewWithConfig(versionconstants.SegmentKey, analytics.Config{
Expand Down
2 changes: 1 addition & 1 deletion pkg/ddevapp/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ func (app *DdevApp) ValidateConfig() error {
// If the database already exists in volume and is not of this type, then throw an error
// if !nodeps.ArrayContainsString(app.GetOmittedContainers(), "db") {
// if dbType, err := app.GetExistingDBType(); err != nil || (dbType != "" && dbType != app.Database.Type+":"+app.Database.Version) {
// return fmt.Errorf("unable to configure project %s with database type %s because that database type does not match the current actual database. Please change your database type back to %s and start again, export, delete, and then change configuration and start. To get back to existing type use 'ddev config --database=%s', see docs at %s", app.Name, dbType, dbType, dbType, "https://ddev.readthedocs.io/en/latest/users/extend/database-types/")
// return fmt.Errorf("unable to configure project %s with database type %s because that database type does not match the current actual database. Please change your database type back to %s and start again, export, delete, and then change configuration and start. To get back to existing type use 'ddev config --database=%s', see docs at %s", app.Name, dbType, dbType, dbType, "https://ddev.readthedocs.io/en/stable/users/extend/database-types/")
// }
// }

Expand Down
4 changes: 2 additions & 2 deletions pkg/ddevapp/ddevapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,7 @@ Fix with 'ddev config global --required-docker-compose-version="" --use-docker-c
if !nodeps.ArrayContainsString(app.GetOmittedContainers(), "db") {
// OK to start if dbType is empty (nonexistent) or if it matches
if dbType, err := app.GetExistingDBType(); err != nil || (dbType != "" && dbType != app.Database.Type+":"+app.Database.Version) {
return fmt.Errorf("unable to start project %s because the configured database type does not match the current actual database. Please change your database type back to %s and start again, export, delete, and then change configuration and start. To get back to existing type use 'ddev config --database=%s' and then you might want to try 'ddev debug migrate-database %s', see docs at %s", app.Name, dbType, dbType, app.Database.Type+":"+app.Database.Version, "https://ddev.readthedocs.io/en/latest/users/extend/database-types/")
return fmt.Errorf("unable to start project %s because the configured database type does not match the current actual database. Please change your database type back to %s and start again, export, delete, and then change configuration and start. To get back to existing type use 'ddev config --database=%s' and then you might want to try 'ddev debug migrate-database %s', see docs at %s", app.Name, dbType, dbType, app.Database.Type+":"+app.Database.Version, "https://ddev.readthedocs.io/en/stable/users/extend/database-types/")
}
}

Expand Down Expand Up @@ -2908,7 +2908,7 @@ func (app *DdevApp) CheckAddonIncompatibilities() error {
}
// Look for missing "networks" stanza and request it.
for s, v := range app.ComposeYaml["services"].(map[string]interface{}) {
errMsg := fmt.Errorf("service '%s' does not have the 'networks: [default, ddev_default]' stanza, required since v1.19, please add it, see %s", s, "https://ddev.readthedocs.io/en/latest/users/extend/custom-compose-files/#docker-composeyaml-examples")
errMsg := fmt.Errorf("service '%s' does not have the 'networks: [default, ddev_default]' stanza, required since v1.19, please add it, see %s", s, "https://ddev.readthedocs.io/en/stable/users/extend/custom-compose-files/#docker-composeyaml-examples")
var nets map[string]interface{}
x := v.(map[string]interface{})
ok := false
Expand Down
4 changes: 2 additions & 2 deletions pkg/ddevapp/mutagen_config_assets/mutagen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# and add your own configuration. If you override it you will
# probably want to check it in.
# Please do `ddev mutagen reset` after changing the file.
# See ddev mutagen docs at
# https://ddev.readthedocs.io/en/latest/users/install/performance/
# See DDEV Mutagen docs at
# https://ddev.readthedocs.io/en/stable/users/install/performance/#mutagen
# For detailed information about mutagen configuration options, see
# https://mutagen.io/documentation/introduction/configuration
sync:
Expand Down
2 changes: 1 addition & 1 deletion pkg/ddevapp/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func StartDdevRouter() error {

err = CheckRouterPorts()
if err != nil {
return fmt.Errorf("unable to listen on required ports, %v,\nTroubleshooting suggestions at https://ddev.readthedocs.io/en/stable/users/basics/troubleshooting/#unable-listen", err)
return fmt.Errorf("unable to listen on required ports, %v,\nTroubleshooting suggestions at https://ddev.readthedocs.io/en/stable/users/usage/troubleshooting/#unable-listen", err)
}

// Run docker-compose up -d against the ddev-router full compose file
Expand Down
6 changes: 3 additions & 3 deletions pkg/ddevapp/templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const ConfigInstructions = `
# http://projectname.ddev.site and https://projectname.ddev.site

# type: <projecttype> # backdrop, craftcms, django4, drupal6/7/8/9/10, laravel, magento, magento2, php, python, shopware6, silverstripe, typo3, wordpress
# See https://ddev.readthedocs.io/en/latest/users/quickstart/ for more
# See https://ddev.readthedocs.io/en/stable/users/quickstart/ for more
# information on the different project types

# docroot: <relative_path> # Relative path to the directory containing index.php.
Expand Down Expand Up @@ -130,8 +130,8 @@ const ConfigInstructions = `
# - "mutagen": enables Mutagen for this project.
# - "nfs": enables NFS for this project.
#
# See https://ddev.readthedocs.io/en/latest/users/install/performance/#nfs
# See https://ddev.readthedocs.io/en/latest/users/install/performance/#mutagen
# See https://ddev.readthedocs.io/en/stable/users/install/performance/#nfs
# See https://ddev.readthedocs.io/en/stable/users/install/performance/#mutagen

# fail_on_hook_fail: False
# Decide whether 'ddev start' should be interrupted by a failing hook
Expand Down
7 changes: 3 additions & 4 deletions pkg/fileutil/files.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,16 @@ import (
"crypto/rand"
"encoding/hex"
"fmt"
"github.com/ddev/ddev/pkg/nodeps"
"io"
"io/fs"
"os"
"path/filepath"
"regexp"
"runtime"
"strings"
"text/template"

"runtime"

"github.com/ddev/ddev/pkg/nodeps"
"github.com/ddev/ddev/pkg/output"
"github.com/ddev/ddev/pkg/util"
)
Expand Down Expand Up @@ -368,7 +367,7 @@ func ReplaceSimulatedLinks(path string) {
}

if !CanCreateSymlinks() {
util.Warning("This host computer is unable to create real symlinks, please see the docs to enable developer mode:\n%s\nNote that the simulated symlinks created inside the container will work fine for most projects.", "https://ddev.readthedocs.io/en/stable/users/basics/developer-tools/#windows-os-and-ddev-composer")
util.Warning("This host computer is unable to create real symlinks, please see the docs to enable developer mode:\n%s\nNote that the simulated symlinks created inside the container will work fine for most projects.", "https://ddev.readthedocs.io/en/stable/users/usage/developer-tools/#windows-os-and-ddev-composer")
return
}

Expand Down
6 changes: 3 additions & 3 deletions pkg/globalconfig/global_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,8 @@ func WriteGlobalConfig(config GlobalConfig) error {
# - "mutagen": enables Mutagen.
# - "nfs": enables NFS.
#
# See https://ddev.readthedocs.io/en/latest/users/install/performance/#mutagen
# and https://ddev.readthedocs.io/en/latest/users/install/performance/#nfs.
# See https://ddev.readthedocs.io/en/stable/users/install/performance/#mutagen
# and https://ddev.readthedocs.io/en/stable/users/install/performance/#nfs.

# You can set the global project_tld. This way any project will use this tld. If not
# set the local project_tld is used, or the default of DDEV.
Expand Down Expand Up @@ -792,7 +792,7 @@ func IsInternetActive() bool {
active := err == nil && ctx.Err() == nil
if os.Getenv("DDEV_DEBUG") != "" {
if active == false {
output.UserErr.Println("Internet connection not detected, DNS may not work, see https://ddev.readthedocs.io/en/stable/users/basics/faq/ for info.")
output.UserErr.Println("Internet connection not detected, DNS may not work, see https://ddev.readthedocs.io/en/stable/users/usage/faq/ for info.")
}
output.UserErr.Debugf("IsInternetActive(): err=%v ctx.Err()=%v addrs=%v IsInternetactive==%v, testURL=%v internet_detection_timeout_ms=%dms\n", err, ctx.Err(), addrs, active, testURL, DdevGlobalConfig.InternetDetectionTimeout)
}
Expand Down