agnivade
Repos
33
Followers
872

A minimalistic 12 factor log router written in Go

304
14

Go implementation to calculate Levenshtein Distance.

251
21

Image transformation in wasm using Go

128
13

Run WASM tests inside your browser

132
15

📚 Collaborative cheatsheets for console commands

41775
3421

The Go programming language

106262
14959

Events

issue comment
commands: add plan sub commands

Sorry going on vacation :) Don't have any more time to review. You'll have to ask someone else :P

Created at 2 weeks ago
Filter by templated schema name for postgres queries

This change is mainly helpful in our cloud production environment, where we use multiple instances in a single DB. Other customers should not need to know about this.

Created at 2 weeks ago
agnivade delete branch flakyDeleteChannel
Created at 2 weeks ago

MM-47465: Fix flaky TestDeleteChannel (#21686)

Creating the post in a separate goroutine would create a race condition because that method also calls GetChannel. This can cause a bug if the cache was wiped before the the other goroutine would get a chance to update the cache. And if that happens, then it would populate the cache with the old value.

Pseudo-code

func deleteChannel() {
    go func() {
        getFromCache()
    }()
    updateDB()
    wipeCache() // a
}

func getFromCache() {
    err := checkCache()
    if err == ErrNotFound {
        getFromDB() // x
        updateCache() // y
    }
}

func Test() {
    deleteChannel()
    getFromCache()
}

If the sequence of events happen like

  • x
  • a
  • y

Then the getFromCache() call later will get the wrong value from cache.

The fix is to make the call synchronous.

https://mattermost.atlassian.net/browse/MM-47465

Special thanks to @noxer for finding the root cause.

NONE
Created at 2 weeks ago
pull request closed
MM-47465: Fix flaky TestDeleteChannel

Creating the post in a separate goroutine would create a race condition because that method also calls GetChannel. This can cause a bug if the cache was wiped before the the other goroutine would get a chance to update the cache. And if that happens, then it would populate the cache with the old value.

Pseudo-code

func deleteChannel() {
    go func() {
        getFromCache()
    }()
    updateDB()
    wipeCache() // a
}

func getFromCache() {
    err := checkCache()
    if err == ErrNotFound {
        getFromDB() // x
        updateCache() // y
    }
}

func Test() {
    deleteChannel()
    getFromCache()
}

If the sequence of events happen like

  • x
  • a
  • y

Then the getFromCache() call later will get the wrong value from cache.

The fix is to make the call synchronous.

https://mattermost.atlassian.net/browse/MM-47465

Special thanks to @noxer for finding the root cause.

NONE
Created at 2 weeks ago
agnivade create branch flakyDeleteChannel
Created at 2 weeks ago
pull request opened
MM-47465: Fix flaky TestDeleteChannel

Creating the post in a separate goroutine would create a race condition because that method also calls GetChannel. This can cause a bug if the cache was wiped before the the other goroutine would get a chance to update the cache. And if that happens, then it would populate the cache with the old value.

Pseudo-code

func deleteChannel() {
    go func() {
        getFromCache()
    }()
    updateDB()
    wipeCache() // a
}

func getFromCache() {
    err := checkCache()
    if err == ErrNotFound {
        getFromDB() // x
        updateCache() // y
    }
}

func Test() {
    deleteChannel()
    getFromCache()
}

If the sequence of events happen like

  • x
  • a
  • y

Then the getFromCache() call later will get the wrong value from cache.

The fix is not make the call synchronous.

https://mattermost.atlassian.net/browse/MM-47465

Special thanks to @noxer for finding the root cause.

NONE
Created at 2 weeks ago
[MM-47896] Channel names can collide with GM names

No need for my review @mylonsuren. It was just a drive by comment :)

Created at 2 weeks ago
Failed to apply database migrations when upgrade from 6.3.3 to 7.1.4

Per Mattermost guidelines, GitHub issues are for bug reports: https://handbook.mattermost.com/contributors/contributors/ways-to-contribute/.

For troubleshooting see: https://forum.mattermost.com/. For feature proposals see: https://www.mattermost.com/feature-ideas/

If you've found a bug--something appears unintentional--please follow these steps:

  1. Confirm you’re filing a new issue. Search existing tickets in Jira to ensure that the ticket does not already exist.
  2. Confirm your issue does not involve security. Otherwise, please see our Responsible Disclosure Policy.
  3. File a new issue using the format below. Mattermost will confirm steps to reproduce and file in Jira, or ask for more details if there is trouble reproducing it. If there's already an existing bug in Jira, it will be linked back to the GitHub issue so you can track when it gets fixed.

Summary

Upgrade from 6.3.3 to 7.1.4 Also noticed there are missing tables like the db_migrations table

Steps to reproduce

noticed error in the logs about migrations not running

Expected behavior

NA

Observed behavior (that appears unintentional)

mattermost db migrate {"level":"warn","msg":"DefaultServerLocale must be one of the supported locales. Setting DefaultServerLocale to en as default value."} {"level":"warn","msg":"DefaultClientLocale must be one of the supported locales. Setting DefaultClientLocale to en as default value."} {"level":"warn","msg":"AvailableLocales must include DefaultClientLocale. Setting AvailableLocales to all locales as default value."} {"level":"warn","msg":"DefaultServerLocale must be one of the supported locales. Setting DefaultServerLocale to en as default value."} {"level":"warn","msg":"DefaultClientLocale must be one of the supported locales. Setting DefaultClientLocale to en as default value."} {"level":"info","msg":"Pinging SQL","fields":{"database":"master"}} {"level":"fatal","msg":"Failed to apply database migrations.","fields":{"error":""open migrations\mysql: file does not exist""}} {"level":"debug","msg":"Deleting any unused pre-release features"} Database successfully migrated

Also when running the version cmd I get the error below {"level":"warn","msg":"DefaultServerLocale must be one of the supported locales. Setting DefaultServerLocale to en as default value."} {"level":"warn","msg":"DefaultClientLocale must be one of the supported locales. Setting DefaultClientLocale to en as default value."} {"level":"warn","msg":"AvailableLocales must include DefaultClientLocale. Setting AvailableLocales to all locales as default value."} {"level":"warn","msg":"DefaultServerLocale must be one of the supported locales. Setting DefaultServerLocale to en as default value."} {"level":"warn","msg":"DefaultClientLocale must be one of the supported locales. Setting DefaultClientLocale to en as default value."} {"level":"info","msg":"Pinging SQL","fields":{"database":"master"}} {"level":"fatal","msg":"Failed to apply database migrations.","fields":{"error":""open migrations\mysql: file does not exist""}} {"level":"debug","msg":"Deleting any unused pre-release features"} Error: failed to get schema version: unable to select from db_migrations: Error 1146: Table 'mattermost.db_migrations' doesn't exist

Possible fixes

Created at 2 weeks ago
Failed to apply database migrations when upgrade from 6.3.3 to 7.1.4

Hey @mrpolaris - let's use the forum post to continue the conversation: https://forum.mattermost.com/t/mattermost-7-4-failed-to-apply-database-migrations/14464. I'll close this one.

Created at 2 weeks ago

MM-47034: Update dependencies (#21676)

https://mattermost.atlassian.net/browse/MM-47034

NONE
Created at 2 weeks ago
agnivade delete branch bumpdep
Created at 2 weeks ago
pull request closed
MM-47034: Update dependencies

https://mattermost.atlassian.net/browse/MM-47034

NONE
Created at 2 weeks ago
issue comment
`total length of command line and environment variables exceeds limit` in GitHub Actions

Sorry, I forgot about this. I'll need to think some more on what the right solution should be. I'll keep you posted.

Created at 2 weeks ago
delete branch
agnivade delete branch agnivade-patch-1
Created at 2 weeks ago

Update README.md

Created at 2 weeks ago
pull request closed
Update README.md
Created at 2 weeks ago
pull request opened
Update README.md
Created at 2 weeks ago
create branch
agnivade create branch agnivade-patch-1
Created at 2 weeks ago
MM-47034: Update dependencies

100% pass in e2e tests: Embassy New Delhi 50-N Shantipath, Chanakyapuri 110021 New Delhi India

Created at 2 weeks ago
MM-47034: Update dependencies

/e2e-test

Created at 2 weeks ago
agnivade create branch bumpdep
Created at 2 weeks ago
pull request opened
MM-47034: Update dependencies

https://mattermost.atlassian.net/browse/MM-47034

NONE
Created at 2 weeks ago
delete branch
agnivade delete branch agnivade-patch-1
Created at 2 weeks ago

Populate README

Created at 2 weeks ago
pull request closed
Populate README
Created at 2 weeks ago
pull request opened
Populate README
Created at 2 weeks ago
create branch
agnivade create branch agnivade-patch-1
Created at 2 weeks ago