Skip to content

Conversation

@DaedalusG
Copy link
Contributor

This PR adds additional info to let admins know when upgrading into 6 they need to upgrade the DBs to 16 before they use migrator 6.0.0 yo conduct an upgrade

@vercel
Copy link

vercel bot commented Jan 31, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sourcegraph-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 1, 2025 2:51am

They should be "copy-pasteable" now. I put it in quotes because they
have to paste it very specifically, but I think they are sufficiently
idiot proof
@Chickensoupwithrice
Copy link
Contributor

Chickensoupwithrice commented Feb 1, 2025

i've included hand patching notes for both docker compose and deploy-sourcegraph in their relevant locations. I've also included a v6.0 "guide" that flips the script. I haven't linked to it anywhere, and it only exists for docker compose, but I tested it out and it works. I'm a little skeptical it's a good idea to move everybody to this new method, but I think having this method documented is still a good idea. I don't know where to slot it in as a link on our public facing docs?

I've tested the update for the already existing docker compose docs. They work, and are effectively copy pasteable. It requires pasting in the right place. I think this is a reasonable ask of readers.

🚨 I haven't tested out the k8s instructions yet, hence I'm unwilling to merge currently 🚨

I tested it out and it worked.

@Chickensoupwithrice
Copy link
Contributor

I gave it a test run and it worked, i'm happy with merging this now

$ git checkout v6.0.0
```

4. **Start up _only_ the database containers**:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This part is unnecessary @Chickensoupwithrice this is because the databases will automatically be started via the upgrade command provided the user has already updated their docker-compose.yaml with the changes on the version they're upgrading too.

➜  docker-compose git:(v6.0.0) ✗ docker-compose up migrator
WARN[0000] /Users/warrengifford/deploy-sourcegraph-docker/docker-compose/docker-compose.yaml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion
[+] Running 9/9
 ✔ Network docker-compose_sourcegraph                                                                                                                             Create...                                      0.1s
 ✔ Container pgsql                                                                                                                                                Created                                        0.1s
 ✔ Container codeinsights-db                                                                                                                                      Created                                        0.1s
 ✔ Container codeintel-db                                                                                                                                         Created                                        0.1s
 ! codeinsights-db The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested                                                0.0s
 ! pgsql The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested                                                          0.0s
 ! codeintel-db The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested                                                   0.0s
 ✔ Container migrator                                                                                                                                             Created                                        0.0s
 ! migrator The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested                                                       0.0s
Attaching to migrator
migrator  | ✱ Sourcegraph migrator 6.0.0
migrator  | ⚠️ Failed to check for migrator update: unexpected status code 404. Continuing...
migrator  | Attempting connection to frontend...
migrator  | ✅ Connection to frontend succeeded
migrator  | Attempting connection to frontend...
migrator  | ✅ Connection to frontend succeeded
migrator  | Attempting connection to codeintel...
migrator  | ✅ Connection to codeintel succeeded
migrator  | Attempting connection to codeinsights...
migrator  | ✅ Connection to codeinsights succeeded
migrator  | 👉 Migrating to v6.0 (step 1 of 1)
migrator  | 👉 Running schema migrations
migrator  | ✅ Schema migrations complete
migrator exited with code 0

@DaedalusG
Copy link
Contributor Author

I'm messing around with the flow of this in another PR: #946

@DaedalusG DaedalusG closed this Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants