profile
viewpoint

agnivade/funnel 266

A minimalistic 12 factor log router written in Go

agnivade/shimmer 92

Image transformation in wasm using Go

agnivade/levenshtein 71

Go implementation to calculate Levenshtein Distance.

agnivade/easy-scrypt 20

This is a nice and simple wrapper in Go over the scrypt password based key derivation algorithm.

agnivade/sqlargs 6

A vet analyzer which checks sql queries for correctness

agnivade/mdns 1

A helper library to refactor some boilerplate code for publishing mdns services

agnivade/quictionary 1

A small and concise dictionary interface built using React + Material UI

agnivade/react-starter 1

My own version of react starter kit

agnivade/adda 0

Forum software - Full client side. Offline capable. :electric_plug: Elegant. :sparkles:

agnivade/adsb-decode-guide 0

ADS-B Decoding Guide

pull request commentmattermost/mattermost-server

update golang.org/x/crypto

Ah much better now.

cpanato

comment created time in 4 hours

pull request commentmattermost/mattermost-server

update golang.org/x/crypto

I made some changes to go.mod to remove the struct2interface and other stuff. Interesting that it's not showing merge conflicts. Updating branch.

/update-branch

cpanato

comment created time in 4 hours

Pull request review commenttldr-pages/tldr

Tar: Add extraction of file without folder structure

 - Extract files matching a pattern:  `tar xf {{source.tar}} --wildcards {{"*.html"}}`++- Extract a specific file without the folder structure++`tar xf {{source.tar}} {{source.tar}}/path/to/binary.sh --strip-components={{amount-of-folders-deep}}`

I think the strip-components could be explained better. I would say something in the lines of - "Extract a file without creating the given level of directories".

And also, I think just mentioning --strip-components is enough. There's no need to extract a single file. The most common usage is to just skip a directory.

Lastly, we use snake_case in our tokens. But we can just shorten it to - {{depth}}

Firesphere

comment created time in 5 hours

issue commenttldr-pages/tldr

Add GitHub Sponsorship to tldr pages?

Set to 0 now.

owenvoke

comment created time in 6 hours

PR opened mattermost/mattermost-server

Reviewers
MM-22190: Add error checks to TestUnlinkGroupTeam 2: Dev Review Tests/Not Needed

<!-- Thank you for contributing a pull request! Here are a few tips to help you:

  1. If this is your first contribution, make sure you've read the Contribution Checklist https://developers.mattermost.com/contribute/getting-started/contribution-checklist/
  2. Read our blog post about "Submitting Great PRs" https://developers.mattermost.com/blog/2019-01-24-submitting-great-prs
  3. Take a look at other repository specific documentation at https://developers.mattermost.com/contribute -->

Summary

<!-- A description of what this pull request does. --> I could not figure out the actual root cause for this.

But a possible area of concern is that somewhere in the call stack, the login failed partially. Therefore, the session did not have the teamMembers populated. And the permission check failed therefore. Since the errors from login are actually masked, unless we check them, we would never know what failed.

Adding the error checks should let us know in future if this is not the case.

Another possible case is the app.ClearTeamMembersCache which gets called in the goroutine app.SyncRolesAndMembership. If this races with the session, then it's possible that the teamMember is wiped off from the session. But this happens after the permission check. So it's not very likely.

Also, while we are here, I found that (*app).ClearTeamMembersCache does not log the internal error bubbled up. This prevents us from understanding what actually happened. Added that logging.

Ticket Link

<!-- If this pull request addresses a Help Wanted ticket, please link the relevant GitHub issue, e.g.

Fixes https://github.com/mattermost/mattermost-server/issues/XXXXX

Otherwise, link the JIRA ticket. --> https://mattermost.atlassian.net/browse/MM-22190

+6 -4

0 comment

2 changed files

pr created time in 6 hours

create barnchmattermost/mattermost-server

branch : unlink2

created branch time in 6 hours

pull request commentmattermost/mattermost-server

Remove goroutines from session_store.go

Let me know if this makes sense. I can link it to a jira ticket and assign QA then.

agnivade

comment created time in 8 hours

PR opened mattermost/mattermost-server

Reviewers
Remove goroutines from session_store.go 2: Dev Review

<!-- Thank you for contributing a pull request! Here are a few tips to help you:

  1. If this is your first contribution, make sure you've read the Contribution Checklist https://developers.mattermost.com/contribute/getting-started/contribution-checklist/
  2. Read our blog post about "Submitting Great PRs" https://developers.mattermost.com/blog/2019-01-24-submitting-great-prs
  3. Take a look at other repository specific documentation at https://developers.mattermost.com/contribute -->

Summary

<!-- A description of what this pull request does. --> There isn't much benefit of running these 2 queries concurrently versus just serially. These queries are not in the hot path anyways. Maybe just simpler to keep it serial.

+10 -27

0 comment

1 changed file

pr created time in 8 hours

create barnchmattermost/mattermost-server

branch : removesessiongoroutine

created branch time in 8 hours

issue commentgolang/go

question: "go: cannot find main module; see 'go help modules'"

Hello @marcelotoledo, unlike other projects, we do not use the issue tracker for questions such as these. It is only used for bugs and feature proposals. Please feel free to ask it in any of these forums below:

Thanks

s681562

comment created time in 8 hours

Pull request review commentmattermost/mattermost-server

MM-21552: Adding SaveMultiple to posts

 func TestImportImportDirectPost(t *testing.T) { 		th.BasicUser2.Id, 		user3.Id, 	}-	channel, err = th.App.createGroupChannel(userIds, th.BasicUser.Id)-	require.Equal(t, err.Id, store.CHANNEL_EXISTS_ERROR)+	channel, appErr = th.App.createGroupChannel(userIds, th.BasicUser.Id)+	require.Equal(t, appErr.Id, store.CHANNEL_EXISTS_ERROR) 	groupChannel = channel  	// Get the number of posts in the system.-	result, err = th.App.Srv().Store.Post().AnalyticsPostCount("", false, false)-	require.Nil(t, err)+	result, appErr = th.App.Srv().Store.Post().AnalyticsPostCount("", false, false)+	require.Nil(t, appErr) 	initialPostCount = result -	// Try adding an invalid post in dry run mode.-	data = &DirectPostImportData{-		ChannelMembers: &[]string{-			th.BasicUser.Username,-			th.BasicUser2.Username,-			user3.Username,-		},-		User:     ptrStr(th.BasicUser.Username),-		CreateAt: ptrInt64(model.GetMillis()),-	}-	err = th.App.importDirectPost(data, true)-	require.NotNil(t, err)-	AssertAllPostsCount(t, th.App, initialPostCount, 0, "")+	t.Run("Try adding an invalid post in dry run mode", func(t *testing.T) {+		data := &DirectPostImportData{+			ChannelMembers: &[]string{+				th.BasicUser.Username,+				th.BasicUser2.Username,+				user3.Username,+			},+			User:     ptrStr(th.BasicUser.Username),+			CreateAt: ptrInt64(model.GetMillis()),+		}+		err := th.App.importMultipleDirectPosts([]*DirectPostImportData{data}, true)+		require.NotNil(t, err)+		AssertAllPostsCount(t, th.App, initialPostCount, 0, "")+	}) -	// Try adding a valid post in dry run mode.-	data = &DirectPostImportData{-		ChannelMembers: &[]string{-			th.BasicUser.Username,-			th.BasicUser2.Username,-			user3.Username,-		},-		User:     ptrStr(th.BasicUser.Username),-		Message:  ptrStr("Message"),-		CreateAt: ptrInt64(model.GetMillis()),-	}-	err = th.App.importDirectPost(data, true)-	require.Nil(t, err)-	AssertAllPostsCount(t, th.App, initialPostCount, 0, "")+	t.Run("Try adding a valid post in dry run mode", func(t *testing.T) {+		data := &DirectPostImportData{+			ChannelMembers: &[]string{+				th.BasicUser.Username,+				th.BasicUser2.Username,+				user3.Username,+			},+			User:     ptrStr(th.BasicUser.Username),+			Message:  ptrStr("Message"),+			CreateAt: ptrInt64(model.GetMillis()),+		}+		err := th.App.importMultipleDirectPosts([]*DirectPostImportData{data}, true)+		require.Nil(t, err)+		AssertAllPostsCount(t, th.App, initialPostCount, 0, "")+	}) -	// Try adding an invalid post in apply mode.-	data = &DirectPostImportData{-		ChannelMembers: &[]string{-			th.BasicUser.Username,-			th.BasicUser2.Username,-			user3.Username,-			model.NewId(),-		},-		User:     ptrStr(th.BasicUser.Username),-		Message:  ptrStr("Message"),-		CreateAt: ptrInt64(model.GetMillis()),-	}-	err = th.App.importDirectPost(data, false)-	require.NotNil(t, err)-	AssertAllPostsCount(t, th.App, initialPostCount, 0, "")+	t.Run("Try adding an invalid post in apply mode", func(t *testing.T) {+		data := &DirectPostImportData{+			ChannelMembers: &[]string{+				th.BasicUser.Username,+				th.BasicUser2.Username,+				user3.Username,+				model.NewId(),+			},+			User:     ptrStr(th.BasicUser.Username),+			Message:  ptrStr("Message"),+			CreateAt: ptrInt64(model.GetMillis()),+		}+		err := th.App.importMultipleDirectPosts([]*DirectPostImportData{data}, false)+		require.NotNil(t, err)+		AssertAllPostsCount(t, th.App, initialPostCount, 0, "")+	}) -	// Try adding a valid post in apply mode.-	data = &DirectPostImportData{-		ChannelMembers: &[]string{-			th.BasicUser.Username,-			th.BasicUser2.Username,-			user3.Username,-		},-		User:     ptrStr(th.BasicUser.Username),-		Message:  ptrStr("Message"),-		CreateAt: ptrInt64(model.GetMillis()),-	}-	err = th.App.importDirectPost(data, false)-	require.Nil(t, err)-	AssertAllPostsCount(t, th.App, initialPostCount, 1, "")+	t.Run("Try adding a valid post in apply mode", func(t *testing.T) {+		data := &DirectPostImportData{+			ChannelMembers: &[]string{+				th.BasicUser.Username,+				th.BasicUser2.Username,+				user3.Username,+			},+			User:     ptrStr(th.BasicUser.Username),+			Message:  ptrStr("Message"),+			CreateAt: ptrInt64(654321),+		}+		err := th.App.importMultipleDirectPosts([]*DirectPostImportData{data}, false)+		require.Nil(t, err)+		AssertAllPostsCount(t, th.App, initialPostCount, 1, "")++		// Check the post values.+		posts, err := th.App.Srv().Store.Post().GetPostsCreatedAt(groupChannel.Id, *data.CreateAt)+		require.Nil(t, err)+		require.Len(t, posts, 1)++		post := posts[0]+		require.Equal(t, post.Message, *data.Message)+		require.Equal(t, post.CreateAt, *data.CreateAt)+		require.Equal(t, post.UserId, th.BasicUser.Id)+	}) -	// Check the post values.-	posts, err = th.App.Srv().Store.Post().GetPostsCreatedAt(groupChannel.Id, *data.CreateAt)-	require.Nil(t, err)-	require.Len(t, posts, 1)+	t.Run("Import the post again", func(t *testing.T) {+		data := &DirectPostImportData{+			ChannelMembers: &[]string{+				th.BasicUser.Username,+				th.BasicUser2.Username,+				user3.Username,+			},+			User:     ptrStr(th.BasicUser.Username),+			Message:  ptrStr("Message"),+			CreateAt: ptrInt64(654321),

Any issues with model.GetMillis ? If so, then let's store this in a variable somewhere and just increment the value.

jespino

comment created time in 9 hours

Pull request review commentmattermost/mattermost-server

MM-21552: Adding SaveMultiple to posts

 func (s *SqlPostStore) Update(newPost *model.Post, oldPost *model.Post) (*model. 	return newPost, nil } -func (s *SqlPostStore) Overwrite(post *model.Post) (*model.Post, *model.AppError) {-	post.UpdateAt = model.GetMillis()-+func (s *SqlPostStore) OverwriteMultiple(posts []*model.Post) ([]*model.Post, *model.AppError) {+	updateAt := model.GetMillis() 	maxPostSize := s.GetMaxPostSize()-	if appErr := post.IsValid(maxPostSize); appErr != nil {-		return nil, appErr+	for _, post := range posts {+		post.UpdateAt = updateAt+		if appErr := post.IsValid(maxPostSize); appErr != nil {+			return nil, appErr+		}+	}++	tx, err := s.GetMaster().Begin()+	if err != nil {+		return nil, model.NewAppError("SqlPostStore.Overwrite", "store.sql_post.overwrite.app_error", nil, err.Error(), http.StatusInternalServerError) 	}+	for _, post := range posts {+		if _, err = tx.Update(post); err != nil {+			txErr := tx.Rollback()+			if txErr != nil {+				return nil, model.NewAppError("SqlPostStore.Overwrite", "store.sql_post.overwrite.app_error", nil, txErr.Error(), http.StatusInternalServerError)+			} -	if _, err := s.GetMaster().Update(post); err != nil {-		return nil, model.NewAppError("SqlPostStore.Overwrite", "store.sql_post.overwrite.app_error", nil, "id="+post.Id+", "+err.Error(), http.StatusInternalServerError)+			return nil, model.NewAppError("SqlPostStore.Overwrite", "store.sql_post.overwrite.app_error", nil, "id="+post.Id+", "+err.Error(), http.StatusInternalServerError)+		}+	}+	err = tx.Commit()+	if err != nil {+		return nil, model.NewAppError("SqlPostStore.Overwrite", "store.sql_post.overwrite.app_error", nil, err.Error(), http.StatusInternalServerError) 	} -	return post, nil+	return posts, nil+}++func (s *SqlPostStore) Overwrite(post *model.Post) (*model.Post, *model.AppError) {+	posts, err := s.OverwriteMultiple([]*model.Post{post})

Isn't it returning the exact same set of posts again ? Is there a benefit of returning the posts slice ? Or are we just trying to conform to the old interface ?

jespino

comment created time in 9 hours

Pull request review commentmattermost/mattermost-server

MM-21552: Adding SaveMultiple to posts

 func (s *SqlPostStore) Update(newPost *model.Post, oldPost *model.Post) (*model. 	return newPost, nil } -func (s *SqlPostStore) Overwrite(post *model.Post) (*model.Post, *model.AppError) {-	post.UpdateAt = model.GetMillis()-+func (s *SqlPostStore) OverwriteMultiple(posts []*model.Post) ([]*model.Post, *model.AppError) {+	updateAt := model.GetMillis() 	maxPostSize := s.GetMaxPostSize()-	if appErr := post.IsValid(maxPostSize); appErr != nil {-		return nil, appErr+	for _, post := range posts {+		post.UpdateAt = updateAt+		if appErr := post.IsValid(maxPostSize); appErr != nil {+			return nil, appErr+		}+	}++	tx, err := s.GetMaster().Begin()+	if err != nil {+		return nil, model.NewAppError("SqlPostStore.Overwrite", "store.sql_post.overwrite.app_error", nil, err.Error(), http.StatusInternalServerError) 	}+	for _, post := range posts {+		if _, err = tx.Update(post); err != nil {

This is essentially calling Update wrapped in a transaction. I was referring to actually changing the query to overwrite multiple posts in a single query. But I do understand that's a lot of work. Overall, I am trying to combine as many queries as possible into one. We can leave this one out if you prefer.

jespino

comment created time in 9 hours

Pull request review commentmattermost/mattermost-server

MM-21552: Adding SaveMultiple to posts

 func (s *SqlPostStore) CreateIndexesIfNotExists() { 	s.CreateFullTextIndexIfNotExists("idx_posts_hashtags_txt", "Posts", "Hashtags") } -func (s *SqlPostStore) Save(post *model.Post) (*model.Post, *model.AppError) {-	if len(post.Id) > 0 {-		return nil, model.NewAppError("SqlPostStore.Save", "store.sql_post.save.existing.app_error", nil, "id="+post.Id, http.StatusBadRequest)-	}+func (s *SqlPostStore) SaveMultiple(posts []*model.Post) ([]*model.Post, *model.AppError) {+	channelNewPosts := make(map[string]int)+	maxDateNewPosts := make(map[string]int64)+	rootIds := make(map[string]int)+	maxDateRootIds := make(map[string]int64)+	for _, post := range posts {+		if len(post.Id) > 0 {+			return nil, model.NewAppError("SqlPostStore.Save", "store.sql_post.save.existing.app_error", nil, "id="+post.Id, http.StatusBadRequest)+		}+		post.PreSave()+		maxPostSize := s.GetMaxPostSize()+		if err := post.IsValid(maxPostSize); err != nil {+			return nil, err+		} -	maxPostSize := s.GetMaxPostSize()+		currentChannelCount, ok := channelNewPosts[post.ChannelId]+		if !ok {+			if post.IsJoinLeaveMessage() {+				channelNewPosts[post.ChannelId] = 0+			} else {+				channelNewPosts[post.ChannelId] = 1+			}+			maxDateNewPosts[post.ChannelId] = post.CreateAt+		} else {+			if !post.IsJoinLeaveMessage() {+				channelNewPosts[post.ChannelId] = currentChannelCount + 1+			}+			if post.CreateAt > maxDateNewPosts[post.ChannelId] {+				maxDateNewPosts[post.ChannelId] = post.CreateAt+			}+		} -	post.PreSave()-	if err := post.IsValid(maxPostSize); err != nil {-		return nil, err+		if len(post.RootId) > 0 {+			currentRootCount, ok := rootIds[post.RootId]+			if !ok {+				rootIds[post.RootId] = 1+				maxDateRootIds[post.RootId] = post.CreateAt+			} else {+				rootIds[post.RootId] = currentRootCount + 1+				if post.CreateAt > maxDateRootIds[post.RootId] {+					maxDateRootIds[post.RootId] = post.CreateAt+				}+			}+		} 	} -	if err := s.GetMaster().Insert(post); err != nil {-		return nil, model.NewAppError("SqlPostStore.Save", "store.sql_post.save.app_error", nil, "id="+post.Id+", "+err.Error(), http.StatusInternalServerError)+	query := s.getQueryBuilder().Insert("Posts").Columns(postSliceColumns()...)+	for _, post := range posts {+		query = query.Values(postToSlice(post)...)+	}+	sql, args, err := query.ToSql()+	if err != nil {+		return nil, model.NewAppError("SqlPostStore.Save", "store.sql_post.save.app_error", nil, err.Error(), http.StatusInternalServerError) 	} -	time := post.UpdateAt+	if _, err := s.GetMaster().Exec(sql, args...); err != nil {+		return nil, model.NewAppError("SqlPostStore.Save", "store.sql_post.save.app_error", nil, err.Error(), http.StatusInternalServerError)+	} -	if !post.IsJoinLeaveMessage() {-		if _, err := s.GetMaster().Exec("UPDATE Channels SET LastPostAt = GREATEST(:LastPostAt, LastPostAt), TotalMsgCount = TotalMsgCount + 1 WHERE Id = :ChannelId", map[string]interface{}{"LastPostAt": time, "ChannelId": post.ChannelId}); err != nil {-			mlog.Error("Error updating Channel LastPostAt.", mlog.Err(err))-		}-	} else {-		// don't update TotalMsgCount for unimportant messages so that the channel isn't marked as unread-		if _, err := s.GetMaster().Exec("UPDATE Channels SET LastPostAt = :LastPostAt WHERE Id = :ChannelId AND LastPostAt < :LastPostAt", map[string]interface{}{"LastPostAt": time, "ChannelId": post.ChannelId}); err != nil {+	for channelId, count := range channelNewPosts {+		if _, err := s.GetMaster().Exec("UPDATE Channels SET LastPostAt = GREATEST(:LastPostAt, LastPostAt), TotalMsgCount = TotalMsgCount + :Count WHERE Id = :ChannelId", map[string]interface{}{"LastPostAt": maxDateNewPosts[channelId], "ChannelId": channelId, "Count": count}); err != nil {

I think George was talking more about the idempotency of the method rather than performance. If the post save passes, and update channels fails, wouldn't it return a failure causing the user to try again, and have duplicate posts in the process ?

Also, please see ChannelStore.UpdateLastViewedAt to make the update in a single query rather than a loop. Same goes for the updateposts too.

jespino

comment created time in 9 hours

pull request commentmattermost/mattermost-server

Metrics operations shouldn't be inside goroutine

@ethervoid - I am inclined to run some smoke tests here since it is a non-superficial change, albeit small. Thoughts ?

ethervoid

comment created time in 9 hours

pull request commentmattermost/mattermost-server

Include Mutex for Hubs property

@josephbaylon - This is good to test.

ethervoid

comment created time in 9 hours

pull request commentmattermost/mattermost-server

[MM-22314] Remove read limit at app/import which cause bulk import to fail

@isacikgoz - What's the limit the customer needs ? Can you check the file attached in the ticket. Probably we can just bump it to suffice that.

I agree with @jespino that we should not make it unbounded. That's just another vector to make our codebase OOM and @DSchalla won't be probably too happy about it :)

If a customer has a single line of text which is 10GB of size, I would suggest looking into why they have something like that and find ways of working around it, rather than having an unlimited bound.

isacikgoz

comment created time in 17 hours

issue commentgolang/go

cmd/go: mod tidy and mod vendor fighting with each other

Ok, here's the branch - https://github.com/mattermost/mattermost-server/tree/syncgomod. I made some custom changes to add some files.

After cloning the branch, create a directory called enterprise in the parent directory. And file in it containing:

package enterprise

import (
	"testing"

	_ "github.com/jonboulle/clockwork"
	_ "github.com/prometheus/client_model/go"
)

func TestDummy(t *testing.T) {

}

Then come to the root directory and create a symlink to that directory: ln -s ../enterprise/ enterprise

The structure should be

path/to/dir
|- enterprise
|- mattermost-server
  |- api4
  |- app
  |- cmd
  |- ... 
  |- symlink to ../enterprise.

That's all. You should see the behavior. Let me know if you have any issues.

The github.com/russellhaering/goxmldsig change is still there. But so is the actual issue.

agnivade

comment created time in 18 hours

create barnchmattermost/mattermost-server

branch : syncgomod

created branch time in 18 hours

push eventmattermost/mattermost-server

Agniva De Sarker

commit sha 5c9ffd00ae8c359711287c3e9d5e1886f0ef4934

Clean localcache/layer.go (#13949) Insert appropriate spaces and comments where needed.

view details

push time in 21 hours

delete branch mattermost/mattermost-server

delete branch : beautifylocalcache

delete time in 21 hours

PR merged mattermost/mattermost-server

Clean localcache/layer.go 2: Dev Review Tests/Not Needed

<!-- Thank you for contributing a pull request! Here are a few tips to help you:

  1. If this is your first contribution, make sure you've read the Contribution Checklist https://developers.mattermost.com/contribute/getting-started/contribution-checklist/
  2. Read our blog post about "Submitting Great PRs" https://developers.mattermost.com/blog/2019-01-24-submitting-great-prs
  3. Take a look at other repository specific documentation at https://developers.mattermost.com/contribute -->

Summary

<!-- A description of what this pull request does. --> Insert appropriate spaces and comments where needed.

As promised in https://github.com/mattermost/mattermost-server/pull/13784.

+49 -25

1 comment

1 changed file

agnivade

pr closed time in 21 hours

pull request commentmattermost/mattermost-server

Clean localcache/layer.go

More flaky tests :( And line 42 is not even checking anything.

agnivade

comment created time in 21 hours

push eventtldr-pages/tldr-pages.github.io

Travis CI

commit sha 118526259a063beeee87341a7a19d3a276898f68

[TravisCI] uploaded assets after commits fde5386817dd...649e2f6590a6

view details

push time in 21 hours

push eventtldr-pages/tldr-pages.github.io

Travis CI

commit sha 466b19f8bda1cbd8f1b62faefe376e0e1e20d336

[TravisCI] uploaded assets after commits 28bc9817807a...649e2f6590a6

view details

push time in a day

Pull request review commentmattermost/mattermost-server

Added Websocket's broadcast queue load metrics

 func (h *Hub) Start() { 					} 				} 			case msg := <-h.broadcast:+				if metrics := h.app.Metrics(); metrics != nil {+					metrics.DecrementWebSocketBroadcastHubElements(strconv.Itoa(h.connectionIndex), 1)

Whoa boy .. yes indeed. Let's remove that. Would you be open to send a PR ?

ethervoid

comment created time in a day

issue commentgolang/go

cmd/go: mod tidy and mod vendor fighting with each other

Update:

github.com/prometheus/client_model is actually a test dependency of the enterprise repo. It is used nowhere in the main repo, not even as a test dependency.

So ideally, it should be a direct dependency. And it seems like go mod tidy does the right thing, by somehow going inside the symlink, but go mod vendor misses the whole thing and makes it an indirect dependency (test dependencies are considered as direct dependencies right ?). I think there is a difference in how both of these commands handle symlinks. Making them consistent should fix the issue.

Same for github.com/jonboulle/clockwork too.

The issue goes away if I replace the symlink by the actual directory. Needless to say, I am well-aware of the fact that symlinks aren't recommended to be used. But unfortunately, we are stuck with it for now.

I will create a reproducer and update the ticket shortly. Should be fairly straightforward.

agnivade

comment created time in a day

PR opened mattermost/mattermost-server

Reviewers
Clean localcache/layer.go 2: Dev Review Tests/Not Needed

<!-- Thank you for contributing a pull request! Here are a few tips to help you:

  1. If this is your first contribution, make sure you've read the Contribution Checklist https://developers.mattermost.com/contribute/getting-started/contribution-checklist/
  2. Read our blog post about "Submitting Great PRs" https://developers.mattermost.com/blog/2019-01-24-submitting-great-prs
  3. Take a look at other repository specific documentation at https://developers.mattermost.com/contribute -->

Summary

<!-- A description of what this pull request does. --> Insert appropriate spaces and comments where needed.

As promised in https://github.com/mattermost/mattermost-server/pull/13784.

+49 -25

0 comment

1 changed file

pr created time in a day

create barnchmattermost/mattermost-server

branch : beautifylocalcache

created branch time in a day

pull request commentmattermost/mattermost-developer-documentation

Add "Maintaining consistency in codebases with Go Vet" blog post

I think a mention about inspect.Preorder will be good as it will help newcomers writing vet passes. No need to go any deeper than that. But it was just a suggestion. Totally your decision.

jespino

comment created time in a day

pull request commentgolangci/golangci-api

Add support till 1.23.6

ping @jirfag. We need this to allow 1.14 in our CI pipeline.

agnivade

comment created time in a day

pull request commentmattermost/mattermost-server

MM-22710: Bump golangci to 1.23.6

Pending PR: https://github.com/golangci/golangci-api/pull/175

agnivade

comment created time in a day

PR opened golangci/golangci-api

Add support till 1.23.6
+1 -1

0 comment

1 changed file

pr created time in a day

push eventagnivade/golangci-api

Agniva De Sarker

commit sha 52e958eac1e88c4daf3f97d905031ffb132b7f54

Add support till 1.23.6

view details

push time in a day

PR opened mattermost/mattermost-server

Reviewers
MM-22710: Bump golangci to 1.23.6 2: Dev Review 2: QA Review

<!-- Thank you for contributing a pull request! Here are a few tips to help you:

  1. If this is your first contribution, make sure you've read the Contribution Checklist https://developers.mattermost.com/contribute/getting-started/contribution-checklist/
  2. Read our blog post about "Submitting Great PRs" https://developers.mattermost.com/blog/2019-01-24-submitting-great-prs
  3. Take a look at other repository specific documentation at https://developers.mattermost.com/contribute -->

Summary

<!-- A description of what this pull request does. --> This is to prepare the codebase for 1.14 shift.

1.23.6 has some fixes which is necessary for a codebase using Go 1.14.

Ticket Link

<!-- If this pull request addresses a Help Wanted ticket, please link the relevant GitHub issue, e.g.

Fixes https://github.com/mattermost/mattermost-server/issues/XXXXX

Otherwise, link the JIRA ticket. --> https://mattermost.atlassian.net/browse/MM-22710

+3 -3

0 comment

3 changed files

pr created time in a day

create barnchmattermost/mattermost-server

branch : bumpgolangci

created branch time in a day

Pull request review commentmattermost/mattermost-server

[MM-21209] Add LRU cache for userstore.get

 func (s LocalCacheUserStore) GetProfileByIds(userIds []string, options *store.Us 	for _, userId := range userIds { 		if cacheItem := s.rootStore.doStandardReadCache(s.rootStore.userProfileByIdsCache, userId); cacheItem != nil { 			u := cacheItem.(*model.User)-+			cu := u.DeepCopy()

s/cu/uCopy

We should also do the DeepCopy inside the if condition to avoid doing unnecessary work.

isacikgoz

comment created time in a day

Pull request review commentmattermost/mattermost-server

[MM-21209] Add LRU cache for userstore.get

 func (s LocalCacheUserStore) GetProfileByIds(userIds []string, options *store.Us 		s.rootStore.metrics.AddMemCacheMissCounter("Profile By Ids", float64(len(remainingUserIds))) 	} -	if len(remainingUserIds) > 0 {-		remainingUsers, err := s.UserStore.GetProfileByIds(remainingUserIds, options, false)+	for _, id := range remainingUserIds {+		user, err := s.Get(id)

Any reason why this was changed ? This has 2 issues from what I see.

  • It changes a single SQL query to multiple queries, which has a performance cost.
  • It just continues in case of an error instead of returning. We should actually differentiate between user not found and an actual SQL query failure. If we don't do that, we should atleast log the error.
isacikgoz

comment created time in a day

issue commentgolang/go

flag: add FlagSet usage examples

@Codinee - There is already an active CL for this.

obeyda

comment created time in a day

pull request commenttldr-pages/tldr

tldr: fix description

Updates still needed here: https://github.com/tldr-pages/tldr/pull/3724#discussion_r375633588

zdroid

comment created time in a day

Pull request review commentmattermost/mattermost-server

Added Websocket's broadcast queue load metrics

 type MetricsInterface interface {  	IncrementWebsocketEvent(eventType string) 	IncrementWebSocketBroadcast(eventType string)+	IncrementWebSocketBroadcastHubElements(hub string, amount float64)

May be (Increment|Decrement)WebSocketBroadcastBufferSize is a better name ?

ethervoid

comment created time in a day

Pull request review commentmattermost/mattermost-server

Added Websocket's broadcast queue load metrics

 func (h *Hub) Start() { 					} 				} 			case msg := <-h.broadcast:+				if metrics := h.app.Metrics(); metrics != nil {+					metrics.DecrementWebSocketBroadcastHubElements(strconv.Itoa(h.connectionIndex), 1)

There's no need to use a goroutine. The increment/decrement happens in-memory. The numbers are later scraped from the /metrics endpoint.

ethervoid

comment created time in a day

Pull request review commentmattermost/mattermost-load-test-ng

[MM-22440] Refactor user actions and start implementation of a simulative controller

+// Copyright (c) 2019-present Mattermost, Inc. All Rights Reserved.+// See License.txt for license information.++package control++import (+	"errors"+	"fmt"+	"io/ioutil"+	"time"++	"github.com/mattermost/mattermost-load-test-ng/loadtest/user"+	"github.com/mattermost/mattermost-server/v5/model"+)++// UserActionResponse is a structure containing information about the result+// of running a UserAction.+type UserActionResponse struct {+	// Info contains a string with information about the action+	// execution.+	Info string+	// Err contains an error when the action failed.+	Err error+}++// UserAction is a function that simulates a specific behaviour for the provided+// user.User. It returns a UserActionResponse.+type UserAction func(user.User) UserActionResponse++func SignUp(u user.User) UserActionResponse {

These became public functions now and need godocs. We can do it later if you prefer.

streamer45

comment created time in a day

Pull request review commentmattermost/mattermost-load-test-ng

[MM-22440] Refactor user actions and start implementation of a simulative controller

+// Copyright (c) 2019-present Mattermost, Inc. All Rights Reserved.+// See License.txt for license information.++package control++import (+	"fmt"+	"regexp"+	"strings"+	"testing"++	"github.com/stretchr/testify/assert"+	"github.com/stretchr/testify/require"+)++func TestRandomizeUserName(t *testing.T) {+

unnecessary space

streamer45

comment created time in a day

issue closedgolang/go

Upgrade 1.14 runtime: mlock of signal stack failed

After upgrade to go 1.14, My program got fatal error.

What version of Go are you using (go version)?

<pre> $ go 1.14

</pre>

runtime: mlock of signal stack failed: 12
runtime: increase the mlock limit (ulimit -l) or
runtime: update your kernel to 5.3.15+, 5.4.2+, or 5.5+
fatal error: mlock failed

runtime stack:
runtime.throw(0x16a2a35, 0xc)
	/usr/local/go/src/runtime/panic.go:1112 +0x72
runtime.mlockGsignal(0xc000602600)
	/usr/local/go/src/runtime/os_linux_x86.go:72 +0x107
runtime.mpreinit(0xc000600700)
	/usr/local/go/src/runtime/os_linux.go:341 +0x78
runtime.mcommoninit(0xc000600700)
	/usr/local/go/src/runtime/proc.go:630 +0x108
runtime.allocm(0xc000069000, 0x173ea58, 0x0)
	/usr/local/go/src/runtime/proc.go:1390 +0x14e
runtime.newm(0x173ea58, 0xc000069000)
	/usr/local/go/src/runtime/proc.go:1704 +0x39
runtime.startm(0x0, 0xc000102901)
	/usr/local/go/src/runtime/proc.go:1869 +0x12a
runtime.wakep(...)
	/usr/local/go/src/runtime/proc.go:1953
runtime.resetspinning()
	/usr/local/go/src/runtime/proc.go:2415 +0x93
runtime.schedule()
	/usr/local/go/src/runtime/proc.go:2527 +0x2de
runtime.park_m(0xc0004fc180)
	/usr/local/go/src/runtime/proc.go:2690 +0x9d
runtime.mcall(0x7ffdbba3b908)
	/usr/local/go/src/runtime/asm_amd64.s:318 +0x5b

goroutine 1 [semacquire]:
sync.runtime_Semacquire(0xc000340468)
	/usr/local/go/src/runtime/sema.go:56 +0x42
sync.(*WaitGroup).Wait(0xc000340460)
	/usr/local/go/src/sync/waitgroup.go:130 +0x64

closed time in a day

Icedroid

issue commentgolang/go

Upgrade 1.14 runtime: mlock of signal stack failed

Duplicate of https://github.com/golang/go/issues/37436.

Icedroid

comment created time in a day

push eventmattermost/mattermost-server

Agniva De Sarker

commit sha 376ec9e0e30c8215196f957441213a4ad295cd7d

Remove unnecessary struct2interface dependency (#13929) * Remove unnecessary struct2interface dependency Running go mod tidy on the repo removes it. This was also preventing 1.14beta from running the repo, because now it verifies modules.txt with go.mod, which had a mismatch. * fixing CI * Fix test-server target * Fix some discrepancies in vendor * Removing the Makefile target for now Co-authored-by: mattermod <mattermod@users.noreply.github.com>

view details

push time in a day

delete branch mattermost/mattermost-server

delete branch : tidygomod

delete time in a day

PR merged mattermost/mattermost-server

Remove unnecessary struct2interface dependency 3: Reviews Complete

<!-- Thank you for contributing a pull request! Here are a few tips to help you:

  1. If this is your first contribution, make sure you've read the Contribution Checklist https://developers.mattermost.com/contribute/getting-started/contribution-checklist/
  2. Read our blog post about "Submitting Great PRs" https://developers.mattermost.com/blog/2019-01-24-submitting-great-prs
  3. Take a look at other repository specific documentation at https://developers.mattermost.com/contribute -->

Summary

<!-- A description of what this pull request does. --> Running go mod tidy on the repo removes it. This was also preventing 1.14beta from running the repo, because now it verifies modules.txt with go.mod, which had a mismatch.

+1091 -148

8 comments

29 changed files

agnivade

pr closed time in a day

pull request commentmattermost/mattermost-server

Remove unnecessary struct2interface dependency

I'm fine with merging this now as we come back to and enforce gomodtidy

Sure, I am looking into it.

agnivade

comment created time in a day

Pull request review commentmattermost/mattermost-server

Remove unnecessary struct2interface dependency

 test-db-migration: start-docker ## Gets diff of upgrade vs new instance schemas. 	./scripts/mysql-migration-test.sh 	./scripts/psql-migration-test.sh +gomodtidy:+	@cp go.mod go.mod.orig+	@cp go.sum go.sum.orig+	$(GO) mod tidy+	@if [ "$$(diff go.mod go.mod.orig)" != "" -o "$$(diff go.sum go.sum.orig)" != "" ]; then \+		echo "go.mod/go.sum was modified. \ndiff- $$(diff go.mod go.mod.orig) \n$$(diff go.sum go.sum.orig) \nRun \"go mod tidy\"."; \

I'm also running bash.

agnivade

comment created time in a day

push eventtldr-pages/tldr-pages.github.io

Travis CI

commit sha f8f64f46c5881d9f9b8a31f67e8e4481df8c8778

[TravisCI] uploaded assets after commits 7b364ecea9e2...28bc9817807a

view details

push time in 2 days

pull request commentmattermost/mattermost-server

Remove unnecessary struct2interface dependency

@hanzei - This is now blocking Go 1.14 to run the codebase. Should we push this ?

agnivade

comment created time in 2 days

pull request commentmattermost/mattermost-server

[MM-21209] Add LRU cache for userstore.get

@isacikgoz - Could you check the failures ? They look real to me.

isacikgoz

comment created time in 2 days

issue commentgolang/go

cmd/go: mod tidy and mod vendor fighting with each other

Just updated to 1.14 and didn't see any difference. But I think I know where's the difference here. We use an enterprise layer which is a bundle of packages linked with a symlink. Both of them share this go.mod. You don't have that, I do.

The Go toolchain does say "ignoring symlink", but that's how I could see your "goxmldsig" change, if I delete the enterprise repo.

Now that I can't share the code with you, any pointers on how do I resolve this ?

go env

GO111MODULE=""
GOARCH="amd64"
GOBIN="/home/agniva/go/bin"
GOCACHE="/home/agniva/.cache/go-build"
GOENV="/home/agniva/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/agniva/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/agniva/mattermost/mattermost-server/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build526246433=/tmp/go-build -gno-record-gcc-switches"

This is exactly what I am seeing. (Ignore the untracked files)

22:47:35-~/mattermost/mattermost-server$git st
On branch tidygomod
Untracked files:
  (use "git add <file>..." to include in what will be committed)

	config/config.json.bak
	loadtestbulkload.json
	logrus
	testfiles/

nothing added to commit but untracked files present (use "git add" to track)
22:47:36-~/mattermost/mattermost-server$go version
go version go1.14 linux/amd64
22:47:38-~/mattermost/mattermost-server$go mod tidy
warning: ignoring symlink /home/agniva/mattermost/mattermost-server/client
warning: ignoring symlink /home/agniva/mattermost/mattermost-server/enterprise
22:47:45-~/mattermost/mattermost-server$git diff
diff --git a/go.mod b/go.mod
index 410361d74..c50747e82 100644
--- a/go.mod
+++ b/go.mod
@@ -41,7 +41,7 @@ require (
        github.com/icrowley/fake v0.0.0-20180203215853-4178557ae428
        github.com/jaytaylor/html2text v0.0.0-20190408195923-01ec452cbe43
        github.com/jmoiron/sqlx v1.2.0
-       github.com/jonboulle/clockwork v0.1.0 // indirect
+       github.com/jonboulle/clockwork v0.1.0
        github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect
        github.com/lib/pq v1.3.0
        github.com/magiconair/properties v1.8.1 // indirect
@@ -66,6 +66,7 @@ require (
        github.com/pelletier/go-toml v1.6.0 // indirect
        github.com/pkg/errors v0.9.1
        github.com/prometheus/client_golang v1.4.0
+       github.com/prometheus/client_model v0.2.0
        github.com/rs/cors v1.7.0
        github.com/russellhaering/goxmldsig v0.0.0-20180430223755-7acd5e4a6ef7
        github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd
22:47:46-~/mattermost/mattermost-server$go mod vendor
warning: ignoring symlink /home/agniva/mattermost/mattermost-server/client
warning: ignoring symlink /home/agniva/mattermost/mattermost-server/enterprise
22:47:49-~/mattermost/mattermost-server$git diff
diff --git a/go.mod b/go.mod
index 410361d74..35f3652e7 100644
--- a/go.mod
+++ b/go.mod
@@ -66,6 +66,7 @@ require (
        github.com/pelletier/go-toml v1.6.0 // indirect
        github.com/pkg/errors v0.9.1
        github.com/prometheus/client_golang v1.4.0
+       github.com/prometheus/client_model v0.2.0 // indirect
        github.com/rs/cors v1.7.0
        github.com/russellhaering/goxmldsig v0.0.0-20180430223755-7acd5e4a6ef7
        github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd
agnivade

comment created time in 2 days

pull request commentmattermost/mattermost-server

[MM-21209] Add LRU cache for userstore.get

/update-branch

isacikgoz

comment created time in 2 days

push eventtldr-pages/tldr-pages.github.io

Travis CI

commit sha 2850ae327d2b70a1b8c9257e5c6d54036c461545

[TravisCI] uploaded assets after commits bb264b81b2a7...7b364ecea9e2

view details

push time in 2 days

push eventtldr-pages/tldr-pages.github.io

Travis CI

commit sha c86130f5465fb4a5b83d4d518cd392c9990c36bd

[TravisCI] uploaded assets after commits eec1815b50fa...bb264b81b2a7

view details

push time in 3 days

push eventagnivade/agnivade.github.io

dependabot[bot]

commit sha 3a8c49fe617b5e020902b4088ac00e9ad5245382

Bump nokogiri from 1.10.5 to 1.10.8 Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.10.5 to 1.10.8. - [Release notes](https://github.com/sparklemotion/nokogiri/releases) - [Changelog](https://github.com/sparklemotion/nokogiri/blob/master/CHANGELOG.md) - [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.10.5...v1.10.8) Signed-off-by: dependabot[bot] <support@github.com>

view details

push time in 3 days

PR merged agnivade/agnivade.github.io

Bump nokogiri from 1.10.5 to 1.10.8 dependencies

Bumps nokogiri from 1.10.5 to 1.10.8. <details> <summary>Release notes</summary>

Sourced from nokogiri's releases.

1.10.8 / 2020-02-10

Security

[MRI] Pulled in upstream patch from libxml that addresses CVE-2020-7595. Full details are available in #1992. Note that this patch is not yet (as of 2020-02-10) in an upstream release of libxml.

1.10.7 / 2019-12-03

Bug

  • [MRI] Ensure the patch applied in v1.10.6 works with GNU patch. #1954

1.10.6 / 2019-12-03

Bug

  • [MRI] Fix FreeBSD installation of vendored libxml2. [#1941, #1953] (Thanks, @​nurse!)

</details> <details> <summary>Changelog</summary>

Sourced from nokogiri's changelog.

1.10.8 / 2020-02-10

Security

[MRI] Pulled in upstream patch from libxml that addresses CVE-2020-7595. Full details are available in #1992. Note that this patch is not yet (as of 2020-02-10) in an upstream release of libxml.

1.10.7 / 2019-12-03

Fixed

  • [MRI] Ensure the patch applied in v1.10.6 works with GNU patch. [#1954]

1.10.6 / 2019-12-03

Fixed

  • [MRI] Fix FreeBSD installation of vendored libxml2. [#1941, #1953] (Thanks, @​nurse!) </details> <details> <summary>Commits</summary>
  • 6ce10d1 version bump to v1.10.8
  • 2320f5b update CHANGELOG for v1.10.8
  • 4a77fdb remove patches from the hoe Manifest
  • 570b6cb update to use rake-compiler ~1.1.0
  • 2cdb68e backport libxml2 patch for CVE-2020-7595
  • e6b3229 version bump to v1.10.7
  • 4f9d443 update CHANGELOG
  • 80e67ef Fix the patch from #1953 to work with both git and patch
  • 7cf1b85 Fix typo in generated metadata
  • d76180d add gem metadata
  • Additional commits viewable in compare view </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

</details>

+1 -1

0 comment

1 changed file

dependabot[bot]

pr closed time in 3 days

PR closed agnivade/wasmbrowsertest

fix: handle wasm module loading failure and improve logging and perfo…

Problems

Sorted from real problem to nice-to-have:

  1. Unhandled error path: If the webassembly module fails to instantiate via instantiateStreaming the Done button is never enabled because when the WASM file failed to instantiate it skipped setting the done button. That in turn leads to the program waiting on the chromedp.WaitEnabled command until the test times out.
  2. Logging & Debugging: When this happens, there is virtually no debugging information available.

Solutions

  1. A console error is being logged but it is insufficient to stop the tests from running. In the event of such a failure, use logger.Fatal since it means wasmbrowsertest itself is failing.
  2. First, func handleEvent in main.go was using "fmt.Print" instead of logger.Printf, which caused problems for whatever reason. Second, in case *cdpruntime.EventConsoleAPICalled it was assumed the error would be a number. I can add a new case specifically for console.Error which helps with this.

I also created a 'DEBUG' option which contained the information I needed to debug the problems I was running in to; presumably such a thing will be helpful for someone else in the future.

What the changes look like on WSL, where the program seems to hang

With DEBUG=on

 DEBUG=on ./wasmbrowsertest ./testdata/test.wasm
2020/02/07 12:18:43 browser log: {"id":1,"method":"Target.setDiscoverTargets","params":{"discover":true}}

2020/02/07 12:18:43 browser log: {"method":"Target.targetCreated","params":{"targetInfo":{"targetId":"755af249-070b-4a9f-b918-8daa8399581a","type":"browser","title":"","url":"","attached":false}}}

2020/02/07 12:18:43 browser log: {"method":"Target.targetCreated","params":{"targetInfo":{"targetId":"A63CE0F5C34057F27BDCA988F2A7F6C7","type":"page","title":"","url":"about:blank","attached":false,"browserContextId":"C7E01B11619625966EC22D59BBA95FC0"}}}

2020/02/07 12:18:43 browser log: {"method":"Target.targetCreated","params":{"targetInfo":{"targetId":"e1bb48d1-6ee2-45fc-958d-a4d9c020fda4","type":"browser","title":"","url":"","attached":true}}}

2020/02/07 12:18:43 browser log: {"id":1,"result":{}}

2020/02/07 12:18:43 browser log: {"id":2,"method":"Target.attachToTarget","params":{"targetId":"A63CE0F5C34057F27BDCA988F2A7F6C7"}}

2020/02/07 12:18:43 browser log: {"method":"Target.targetInfoChanged","params":{"targetInfo":{"targetId":"A63CE0F5C34057F27BDCA988F2A7F6C7","type":"page","title":"","url":"about:blank","attached":true,"browserContextId":"C7E01B11619625966EC22D59BBA95FC0"}}}

2020/02/07 12:18:43 browser log: {"method":"Target.attachedToTarget","params":{"sessionId":"2D0E92901307FDDD0989795EAD93A074","targetInfo":{"targetId":"A63CE0F5C34057F27BDCA988F2A7F6C7","type":"page","title":"","url":"about:blank","attached":true,"browserContextId"
:"C7E01B11619625966EC22D59BBA95FC0"},"waitingForDebugger":false}}

2020/02/07 12:18:43 browser log: {"id":2,"result":{"sessionId":"2D0E92901307FDDD0989795EAD93A074"}}

2020/02/07 12:18:43 browser log: {"id":4,"method":"Target.sendMessageToTarget","params":{"message":"{\"id\":3,\"method\":\"Log.enable\"}","sessionId":"2D0E92901307FDDD0989795EAD93A074"}}

2020/02/07 12:18:43 browser log: {"id":4,"result":{}}

[the output continued...]

With DEBUG=off it can seem to hang:

greg@LAPTOP-AH6IAHBO:/mnt/c/Users/gledr/Polyapp_Apps/gocode/src/github.com/agnivade/wasmbrowsertest$ DEBUG=off ./wasmbrowsertest ./testdata/test.wasm
^C

Running on Windows, where the program works

DEBUG=off

C:\Users\gledr\Polyapp_Apps\gocode\src\github.com\agnivade\wasmbrowsertest>wasmbrowsertest.exe ./testdata/test.wasm
[wasmbrowsertest]: 2020/02/07 12:22:54 main.go:241: panic: syscall/js: Value.Call: property _makeFuncWrapper is not a function, got undefined
[wasmbrowsertest]: 2020/02/07 12:22:54 main.go:241:
[wasmbrowsertest]: 2020/02/07 12:22:54 main.go:241: goroutine 1 [running]:
[wasmbrowsertest]: 2020/02/07 12:22:54 main.go:241: syscall/js.Value.Call(0x7ff8000000000007, 0x4e248, 0x10, 0xc063bc8, 0x1, 0x1, 0x10)
[wasmbrowsertest]: 2020/02/07 12:22:54 main.go:241:     /usr/local/go/src/syscall/js/js.go:299 +0x87
[wasmbrowsertest]: 2020/02/07 12:22:54 main.go:241: syscall/js.FuncOf(0xc00e480, 0xc00e480, 0xc03c1e0)
[wasmbrowsertest]: 2020/02/07 12:22:54 main.go:241:     /usr/local/go/src/syscall/js/func.go:46 +0xa
[wasmbrowsertest]: 2020/02/07 12:22:54 main.go:241: syscall.fsCall(0x4c22f, 0x5, 0xc063cf0, 0x5, 0x5, 0xc072040, 0x4bf93, 0x4)
[wasmbrowsertest]: 2020/02/07 12:22:54 main.go:241:     /usr/local/go/src/syscall/fs_js.go:477 +0x6
[wasmbrowsertest]: 2020/02/07 12:22:54 main.go:241: syscall.Write(0x1, 0xc01c0e8, 0x5, 0x8, 0x54ab0, 0xc000180, 0x14370004)
[wasmbrowsertest]: 2020/02/07 12:22:54 main.go:241:     /usr/local/go/src/syscall/fs_js.go:397 +0xc
[wasmbrowsertest]: 2020/02/07 12:22:54 main.go:241: internal/poll.(*FD).Write(0xc03c0c0, 0xc01c0e8, 0x5, 0x8, 0x0, 0x0, 0x0)
[wasmbrowsertest]: 2020/02/07 12:22:54 main.go:241:     /usr/local/go/src/internal/poll/fd_unix.go:268 +0x21
[wasmbrowsertest]: 2020/02/07 12:22:54 main.go:241: os.(*File).write(...)
[wasmbrowsertest]: 2020/02/07 12:22:54 main.go:241:     /usr/local/go/src/os/file_unix.go:280
[wasmbrowsertest]: 2020/02/07 12:22:54 main.go:241: os.(*File).Write(0xc00c020, 0xc01c0e8, 0x5, 0x8, 0x0, 0xc01a1e0, 0x10ac0004)
[wasmbrowsertest]: 2020/02/07 12:22:54 main.go:241:     /usr/local/go/src/os/file.go:145 +0xf
[wasmbrowsertest]: 2020/02/07 12:22:54 main.go:241: fmt.Fprintln(0x6da40, 0xc00c020, 0xc063ee8, 0x1, 0x1, 0x2, 0x1, 0xc06c000)
[wasmbrowsertest]: 2020/02/07 12:22:54 main.go:241:     /usr/local/go/src/fmt/print.go:266 +0x8
[wasmbrowsertest]: 2020/02/07 12:22:54 main.go:241: fmt.Println(...)
[wasmbrowsertest]: 2020/02/07 12:22:54 main.go:241:     /usr/local/go/src/fmt/print.go:275
[wasmbrowsertest]: 2020/02/07 12:22:54 main.go:241: testing.(*M).Run(0xc06c000, 0x0)
[wasmbrowsertest]: 2020/02/07 12:22:54 main.go:241:     /usr/local/go/src/testing/testing.go:1083 +0x31
[wasmbrowsertest]: 2020/02/07 12:22:54 main.go:241: main.main()
[wasmbrowsertest]: 2020/02/07 12:22:54 main.go:241:     _testmain.go:50 +0xe
[wasmbrowsertest]: 2020/02/07 12:22:59 main.go:178: context deadline exceeded

C:\Users\gledr\Polyapp_Apps\gocode\src\github.com\agnivade\wasmbrowsertest>

DEBUG=on

C:\Users\gledr\Polyapp_Apps\gocode\src\github.com\agnivade\wasmbrowsertest>wasmbrowsertest.exe ./testdata/test.wasm
2020/02/07 12:24:23 browser log: {"id":1,"method":"Target.setDiscoverTargets","params":{"discover":true}}

2020/02/07 12:24:23 browser log: {"method":"Target.targetCreated","params":{"targetInfo":{"targetId":"1bbfbedc-9a89-4465-b1f4-83aa72889b7c","type":"browser","title":"","url":"","attached":true}}}

2020/02/07 12:24:23 browser log: {"method":"Target.targetCreated","params":{"targetInfo":{"targetId":"50428D1AA16D99A04CBDD84E9D90B920","type":"page","title":"","url":"about:blank","attached":false,"browserContextId":"6F575330AD73032CD7862515A656A644"}}}

2020/02/07 12:24:23 browser log: {"method":"Target.targetCreated","params":{"targetInfo":{"targetId":"58e2edef-7c49-4ed5-af05-a3f1b3213413","type":"browser","title":"","url":"","attached":false}}}

2020/02/07 12:24:23 browser log: {"id":1,"result":{}}

2020/02/07 12:24:23 browser log: {"id":2,"method":"Target.attachToTarget","params":{"targetId":"50428D1AA16D99A04CBDD84E9D90B920"}}

2020/02/07 12:24:23 browser log: {"method":"Target.targetInfoChanged","params":{"targetInfo":{"targetId":"50428D1AA16D99A04CBDD84E9D90B920","type":"page","title":"","url":"about:blank","attached":true,"browserContextId":"6F575330AD73032CD7862515A656A644"}}}

2020/02/07 12:24:23 browser log: {"method":"Target.attachedToTarget","params":{"sessionId":"635E07B8B2999ECD6436F96FA18AF099","targetInfo":{"targetId":"50428D1AA16D99A04CBDD84E9D90B920","type":"page","title":"","url":"about:blank","attached":true,"browserContextId":"6F575330AD73032CD7862515A656A644"},"waitingForDebugger":false}}

2020/02/07 12:24:23 browser log: {"id":2,"result":{"sessionId":"635E07B8B2999ECD6436F96FA18AF099"}}

2020/02/07 12:24:23 browser log: {"id":4,"method":"Target.sendMessageToTarget","params":{"message":"{\"id\":3,\"method\":\"Log.enable\"}","sessionId":"635E07B8B2999ECD6436F96FA18AF099"}}

2020/02/07 12:24:23 browser log: {"id":4,"result":{}}

output continued...

[wasmbrowsertest]: 2020/02/07 12:24:24 main.go:241:     /usr/local/go/src/syscall/fs_js.go:477 +0x6
2020/02/07 12:24:24 browser log: {"method":"Target.receivedMessageFromTarget","params":{"sessionId":"635E07B8B2999ECD6436F96FA18AF099","message":"{\"method\":\"Runtime.consoleAPICalled\",\"params\":{\"type\":\"log\",\"args\":[{\"type\":\"string\",\"value\":\"\\t_testmain.go:50 +0xe\"}],\"executionContextId\":2,\"timestamp\":1581099864049.165,\"stackTrace\":{\"callFrames\":[{\"functionName\":\"writeSync\",\"scriptId\":\"3\",\"url\":\"http://localhost:61758/wasm_exec.js\",\"lineNumber\":40,\"columnNumber\":13},{\"functionName\":\"runtime.wasmWrite\",\"scriptId\":\"3\",\"url\":\"http://localhost:61758/wasm_exec.js\",\"lineNumber\":247,\"columnNumber\":9},{\"functionName\":\"runtime.wasmWrite\",\"scriptId\":\"5\",\"url\":\"\",\"lineNumber\":940,\"columnNumber\":794847},{\"functionName\":\"runtime.write\",\"scriptId\":\"5\",\"url\":\"\",\"lineNumber\":449,\"columnNumber\":393933},{\"functionName\":\"runtime.writeErr\",\"scriptId\":\"5\",\"url\":\"\",\"lineNumber\":808,\"columnNumber\":754824},{\"functionName\":\"runtime.gwrite\",\"scriptId\":\"5\",\"url\":\"\",\"lineNumber\":484,\"columnNumber\":418290},{\"functionName\":\"runtime.printstring\",\"scriptId\":\"5\",\"url\":\"\",\"lineNumber\":494,\"columnNumber\":422490},{\"functionName\":\"runtime.printnl\",\"scriptId\":\"5\",\"url\":\"\",\"lineNumber\":486,\"columnNumber\":418914},{\"functionName\":\"runtime.gentraceback\",\"scriptId\":\"5\",\"url\":\"\",\"lineNumber\":773,\"columnNumber\":701854},{\"functionName\":\"runtime.traceback1\",\"scriptId\":\"5\",\"url\":\"\",\"lineNumber\":779,\"columnNumber\":714840},{\"functionName\":\"runtime.traceback\",\"scriptId\":\"5\",\"url\":\"\",\"lineNumber\":778,\"columnNumber\":714129},{\"functionName\":\"runtime.dopanic_m\",\"scriptId\":\"5\",\"url\":\"\",\"lineNumber\":479,\"columnNumber\":415364},{\"functionName\":\"runtime.fatalpanic.func1\",\"scriptId\":\"5\",\"url\":\"\",\"lineNumber\":856,\"columnNumber\":775565},{\"functionName\":\"runtime.systemstack\",\"scriptId\":\"5\",\"url\":\"\",\"lineNumber\":880,\"columnNumber\":783937},{\"functionName\":\"runtime.fatalpanic\",\"scriptId\":\"5\",\"url\":\"\",\"lineNumber\":477,\"columnNumber\":412556},{\"functionName\":\"runtime.gopanic\",\"scriptId\":\"5\",\"url\":\"\",\"lineNumber\":470,\"columnNumber\":408514},{\"functionName\":\"syscall_js.Value.Call\",\"scriptId\":\"5\",\"url\":\"\",\"lineNumber\":1122,\"columnNumber\":877261},{\"functionName\":\"syscall_js.FuncOf\",\"scriptId\":\"5\",\"url\":\"\",\"lineNumber\":1109,\"columnNumber\":863358},{\"functionName\":\"syscall.fsCall\",\"scriptId\":\"5\",\"url\":\"\",\"lineNumber\":1176,\"columnNumber\":911155},{\"functionName\":\"syscall.Write\",\"scriptId\":\"5\",\"url\":\"\",\"lineNumber\":1172,\"columnNumber\":907110},{\"functionName\":\"internal_poll.__FD_.Write\",\"scriptId\":\"5\",\"url\":\"\",\"lineNumber\":1257,\"columnNumber\":988940},{\"functionName\":\"os.__File_.Write\",\"scriptId\":\"5\",\"url\":\"\",\"lineNumber\":1271,\"columnNumber\":999354},{\"functionName\":\"fmt.Fprintln\",\"scriptId\":\"5\",\"url\":\"\",\"lineNumber\":1896,\"columnNumber\":1418366},{\"functionName\":\"testing.__M_.Run\",\"scriptId\":\"5\",\"url\":\"\",\"lineNumber\":2074,\"columnNumber\":1630924},{\"functionName\":\"wasm_pc_f_loop\",\"scriptId\":\"5\",\"url\":\"\",\"lineNumber\":925,\"columnNumber\":794310},{\"functionName\":\"wasm_export_run\",\"scriptId\":\"5\",\"url\":\"\",\"lineNumber\":923,\"columnNumber\":794277},{\"functionName\":\"run\",\"scriptId\":\"3\",\"url\":\"http://localhost:61758/wasm_exec.js\",\"lineNumber\":474,\"columnNumber\":22},{\"functionName\":\"\",\"scriptId\":\"4\",\"url\":\"http://localhost:61758/\",\"lineNumber\":93,\"columnNumber\":12}]}}}","targetId":"50428D1AA16D99A04CBDD84E9D90B920"}}

[wasmbrowsertest]: 2020/02/07 12:24:24 main.go:241: syscall.Write(0x1, 0xc01a0f0, 0x5, 0x8, 0x54ab0, 0xc000180, 0x14370004)
2020/02/07 12:24:24 browser log: {"method":"Target.receivedMessageFromTarget","params":{"sessionId":"635E07B8B2999ECD6436F96FA18AF099","message":"{\"method\":\"DOM.attributeRemoved\",\"params\":{\"nodeId\":14,\"name\":\"disabled\"}}","targetId":"50428D1AA16D99A04CBDD84E9D90B920"}}

2020/02/07 12:24:24 browser log: {"method":"Target.receivedMessageFromTarget","params":{"sessionId":"635E07B8B2999ECD6436F96FA18AF099","message":"{\"id\":53,\"result\":{\"searchId\":\"29664.7\",\"resultCount\":1}}","targetId":"50428D1AA16D99A04CBDD84E9D90B920"}}

[wasmbrowsertest]: 2020/02/07 12:24:24 main.go:241:     /usr/local/go/src/syscall/fs_js.go:397 +0xc
[wasmbrowsertest]: 2020/02/07 12:24:24 main.go:241: internal/poll.(*FD).Write(0xc03c0c0, 0xc01a0f0, 0x5, 0x8, 0x0, 0x0, 0x0)
[wasmbrowsertest]: 2020/02/07 12:24:24 main.go:241:     /usr/local/go/src/internal/poll/fd_unix.go:268 +0x21
[wasmbrowsertest]: 2020/02/07 12:24:24 main.go:241: os.(*File).write(...)
[wasmbrowsertest]: 2020/02/07 12:24:24 main.go:241:     /usr/local/go/src/os/file_unix.go:280
[wasmbrowsertest]: 2020/02/07 12:24:24 main.go:241: os.(*File).Write(0xc00c020, 0xc01a0f0, 0x5, 0x8, 0x0, 0xc01c1e0, 0x10ac0004)
[wasmbrowsertest]: 2020/02/07 12:24:24 main.go:241:     /usr/local/go/src/os/file.go:145 +0xf
[wasmbrowsertest]: 2020/02/07 12:24:24 main.go:241: fmt.Fprintln(0x6da40, 0xc00c020, 0xc063ee8, 0x1, 0x1, 0x2, 0x1, 0xc06c000)
[wasmbrowsertest]: 2020/02/07 12:24:24 main.go:241:     /usr/local/go/src/fmt/print.go:266 +0x8
[wasmbrowsertest]: 2020/02/07 12:24:24 main.go:241: fmt.Println(...)
[wasmbrowsertest]: 2020/02/07 12:24:24 main.go:241:     /usr/local/go/src/fmt/print.go:275
[wasmbrowsertest]: 2020/02/07 12:24:24 main.go:241: testing.(*M).Run(0xc06c000, 0x0)
[wasmbrowsertest]: 2020/02/07 12:24:24 main.go:241:     /usr/local/go/src/testing/testing.go:1083 +0x31
[wasmbrowsertest]: 2020/02/07 12:24:24 main.go:241: main.main()
[wasmbrowsertest]: 2020/02/07 12:24:24 main.go:241:     _testmain.go:50 +0xe
2020/02/07 12:24:24 browser log: {"id":56,"method":"Target.sendMessageToTarget","params":{"message":"{\"id\":55,\"method\":\"DOM.getSearchResults\",\"params\":{\"searchId\":\"29664.7\",\"fromIndex\":0,\"toIndex\":1}}","sessionId":"635E07B8B2999ECD6436F96FA18AF099"}}

2020/02/07 12:24:24 browser log: {"id":56,"result":{}}

2020/02/07 12:24:24 browser log: {"method":"Target.receivedMessageFromTarget","params":{"sessionId":"635E07B8B2999ECD6436F96FA18AF099","message":"{\"id\":55,\"result\":{\"nodeIds\":[14]}}","targetId":"50428D1AA16D99A04CBDD84E9D90B920"}}

2020/02/07 12:24:24 browser log: {"id":58,"method":"Target.sendMessageToTarget","params":{"message":"{\"id\":57,\"method\":\"Runtime.evaluate\",\"params\":{\"expression\":\"exitCode;\",\"returnByValue\":true}}","sessionId":"635E07B8B2999ECD6436F96FA18AF099"}}

2020/02/07 12:24:24 browser log: {"id":58,"result":{}}

2020/02/07 12:24:24 browser log: {"method":"Target.receivedMessageFromTarget","params":{"sessionId":"635E07B8B2999ECD6436F96FA18AF099","message":"{\"id\":57,\"result\":{\"result\":{\"type\":\"number\",\"value\":2,\"description\":\"2\"}}}","targetId":"50428D1AA16D99A04CBDD84E9D90B920"}}

[wasmbrowsertest]: 2020/02/07 12:24:29 main.go:178: context deadline exceeded

C:\Users\gledr\Polyapp_Apps\gocode\src\github.com\agnivade\wasmbrowsertest>
+57 -7

5 comments

2 changed files

Gregory-Ledray

pr closed time in 3 days

pull request commentagnivade/wasmbrowsertest

fix: handle wasm module loading failure and improve logging and perfo…

Yeah let me put some more thought into the -v flag. Agree with you on other points. I havent found a good way to differentiate internal logs with go test logs.

Closing this one for now then. Thanks very much for the discussion and the ideas.

Gregory-Ledray

comment created time in 3 days

Pull request review commenttldr-pages/tldr

initdb: Add new page for initdb

+# initdb++> Create a PostgreSQL database on disk.+> More information: <https://www.postgresql.org/docs/9.5/app-initdb.html>.++- Create a database at /usr/local/var/postgres:++`initdb -D /usr/local/var/postgres`

My bad. Yes it should be the token syntax

MansoorMajeed

comment created time in 3 days

Pull request review commentmattermost/mattermost-server

MM-22355 - Fix typos detected by goreportcad.com

 func (a *App) OverrideIconURLIfEmoji(post *model.Post) { 	if emojiUrl, err := a.GetEmojiStaticUrl(emojiName); err == nil { 		post.AddProp(model.POST_PROPS_OVERRIDE_ICON_URL, emojiUrl) 	} else {-		mlog.Warn("Failed to retrieve URL for overriden profile icon (emoji)", mlog.String("emojiName", emojiName), mlog.Err(err))+		mlog.Warn("Failed to retrieve URL for overridden profile icon (emoji)", mlog.String("emojiName", emojiName), mlog.Err(err))

I think overridden is the correct form. The function itself is called OverrideIconURL and it does exactly that - override the emoji.

JtheBAB

comment created time in 3 days

push eventtldr-pages/tldr-pages.github.io

Travis CI

commit sha 2bd28a0986308f3b74b7bac8d7e4794e8f21fcda

[TravisCI] uploaded assets after commits 3d86411e7953...eec1815b50fa

view details

push time in 4 days

pull request commentagnivade/wasmbrowsertest

fix: handle wasm module loading failure and improve logging and perfo…

as long as what you've suggested will eventually be compatible with making the output JSON just like how I think there's a JSON flag for go test

Not sure I fully understand this. I was talking about fmt.Printf vs log.Printf. The debug logging is in JSON but that's a different topic.

I used a console error because it's a recoverable and even expected case I want to be able to test for my E2E tests

Yes that's the point. But here you were using a console error and making it irrecoverable. That's why I wanted to change it to an exception.

Gregory-Ledray

comment created time in 5 days

Pull request review commentmattermost/mattermost-server

Remove unnecessary struct2interface dependency

 test-db-migration: start-docker ## Gets diff of upgrade vs new instance schemas. 	./scripts/mysql-migration-test.sh 	./scripts/psql-migration-test.sh +gomodtidy:+	@cp go.mod go.mod.orig+	@cp go.sum go.sum.orig+	$(GO) mod tidy+	@if [ "$$(diff go.mod go.mod.orig)" != "" -o "$$(diff go.sum go.sum.orig)" != "" ]; then \+		echo "go.mod/go.sum was modified. \ndiff- $$(diff go.mod go.mod.orig) \n$$(diff go.sum go.sum.orig) \nRun \"go mod tidy\"."; \

Strange, this is what I see:

go mod tidy
warning: ignoring symlink /home/agniva/mattermost/mattermost-server/client
warning: ignoring symlink /home/agniva/mattermost/mattermost-server/enterprise
go.mod/go.sum was modified. 
diff- 44c44
< 	github.com/jonboulle/clockwork v0.1.0
---
> 	github.com/jonboulle/clockwork v0.1.0 // indirect
69d68
< 	github.com/prometheus/client_model v0.2.0 
 
Run "go mod tidy".
make: *** [Makefile:300: gomodtidy] Error 1
agnivade

comment created time in 5 days

Pull request review commentmattermost/mattermost-server

Remove unnecessary struct2interface dependency

 require ( 	github.com/pelletier/go-toml v1.6.0 // indirect 	github.com/pkg/errors v0.9.1 	github.com/prometheus/client_golang v1.4.0-	github.com/prometheus/client_model v0.2.0

That's what the bug is about which I filed. If you run go mod tidy, it changes go.mod. But if you run go mod vendor again, it reverts those changes. They are in conflict with each other. I just went with one version.

agnivade

comment created time in 5 days

issue commentpuppeteer/puppeteer

Unable to intercept FileChooser when invoked from window.chooseFileSystemEntries

Bumping some important people again in the hope someone takes a look at this: @mathiasbynens @pavelfeldman @dmitshur

agnivade

comment created time in 6 days

PR opened mattermost/mattermost-server

Reviewers
Fix flaky TestPlugin 2: Dev Review

<!-- Thank you for contributing a pull request! Here are a few tips to help you:

  1. If this is your first contribution, make sure you've read the Contribution Checklist https://developers.mattermost.com/contribute/getting-started/contribution-checklist/
  2. Read our blog post about "Submitting Great PRs" https://developers.mattermost.com/blog/2019-01-24-submitting-great-prs
  3. Take a look at other repository specific documentation at https://developers.mattermost.com/contribute -->

Summary

<!-- A description of what this pull request does. -->

  • Fix panic due to not checking for JSON marshal error
  • Reorder the FileExists check which would fail if we were to pass the -short flag to bypass the slow URL test. In which case, the plugin would have been removed from the filesystem. So we move the check before we remove the plugin.

Ticket Link

<!-- If this pull request addresses a Help Wanted ticket, please link the relevant GitHub issue, e.g.

Fixes https://github.com/mattermost/mattermost-server/issues/XXXXX

Otherwise, link the JIRA ticket. --> https://mattermost.atlassian.net/browse/MM-22666

+7 -6

0 comment

1 changed file

pr created time in 6 days

create barnchmattermost/mattermost-server

branch : pluginpanic

created branch time in 6 days

delete branch mattermost/mattermost-server

delete branch : unlink2

delete time in 6 days

PR closed mattermost/mattermost-server

Reviewers
Add sleep to fix TestUnlinkGroupTeam 2: Dev Review Work In Progress

<!-- Thank you for contributing a pull request! Here are a few tips to help you:

  1. If this is your first contribution, make sure you've read the Contribution Checklist https://developers.mattermost.com/contribute/getting-started/contribution-checklist/
  2. Read our blog post about "Submitting Great PRs" https://developers.mattermost.com/blog/2019-01-24-submitting-great-prs
  3. Take a look at other repository specific documentation at https://developers.mattermost.com/contribute -->

Summary

<!-- A description of what this pull request does. --> Since App.SyncRolesAndMembership happens in a separate goroutine without any control over it, we can't know when it has finished.

Hence, we fix this issue by inserting a time.Sleep.

Ticket Link

<!-- If this pull request addresses a Help Wanted ticket, please link the relevant GitHub issue, e.g.

Fixes https://github.com/mattermost/mattermost-server/issues/XXXXX

Otherwise, link the JIRA ticket. --> https://mattermost.atlassian.net/browse/MM-22190

+5 -0

2 comments

1 changed file

agnivade

pr closed time in 6 days

pull request commentmattermost/mattermost-server

Add sleep to fix TestUnlinkGroupTeam

Sorry this is not the fix. My bad.

agnivade

comment created time in 6 days

Pull request review commenttldr-pages/tldr

yabai: add page

+# yabai++> A tiling window manager for macOS based on binary space partitioning.+> More information: <https://github.com/koekeishiya/yabai>.++- Set the layout to bsp:++`yabai -m config layout {{bsp}}`++- Set the window gap to 10pt:++`yabai -m config window_gap {{10}}`++- Enable opacity:++`yabai -m config window_opacity on`

Enable/disable would need it to be {{on|off}}. But if it's just enable, then I think it should just be {{on}}

BosEriko

comment created time in 6 days

Pull request review commenttldr-pages/tldr

tcptraceroute: add page

+# tcptraceroute++> A traceroute implementation using TCP packets.+> More information: <https://github.com/mct/tcptraceroute>.++- Trace the route to a host:++`tcptraceroute {{host}}`++- Specify the destination port and packet length in bytes:++`tcptraceroute {{host}} {{destination_port}} {{packet_length}}`++- Specify the local source port and source address:++`tcptraceroute {{host}} -p {{source_port}} -s {{source_address}}`++- Set the initial and maximum TTL:

Yeah, we usually want to simplify the language and make it consistent with our overall theme and tone. If we just copy from the man page, then there's no point. :)

Your new change sounds good as well.

mt-empty

comment created time in 6 days

pull request commentmattermost/mattermost-server

Remove unnecessary struct2interface dependency

@hanzei - I have removed the Makefile target for now until the Go team takes a look at it on Monday. Let's push this in master for now, to let Go 1.14 run the codebase ?

agnivade

comment created time in 6 days

pull request commentmattermost/mattermost-server

Remove unnecessary struct2interface dependency

/update-branch

agnivade

comment created time in 6 days

push eventmattermost/mattermost-server

Agniva De Sarker

commit sha 9f426463e5979f672043c30b53c4494f71914dfb

Removing the Makefile target for now

view details

push time in 6 days

issue commentgolang/go

fatal: morestack on g0 while running a server for half-year

Please try again with 1.14 and let us know. If you see the exact same issue again, we can reopen this.

absolute8511

comment created time in 6 days

pull request commentmattermost/mattermost-server

Remove unnecessary struct2interface dependency

Couldn't figure out what is going on here. Filed: https://github.com/golang/go/issues/37376.

agnivade

comment created time in 6 days

issue openedgolang/go

cmd/go: mod tidy and mod vendor fighting with each other

<!-- Please answer these questions before submitting your issue. Thanks! For questions please use one of our forums: https://github.com/golang/go/wiki/Questions -->

What version of Go are you using (go version)?

<pre> $ go version 1.13.5 and 1.14beta1 </pre>

Does this issue reproduce with the latest release?

yes

What did you do?

Please fetch this branch of mine: https://github.com/mattermost/mattermost-server/tree/tidygomod

  • Run "go mod vendor". You will see some changes in go.mod.
  • Run "go mod tidy". Those changes go away. ???

Things I tried:

  • Tried doing a "go clean -modcache -i -r", but didn't help.
  • Tried re-generating the vendor directory again, but didn't help.

What did you expect to see?

I expect no changes to go.mod in whatever order I run those commands.

What did you see instead?

go.mod changed.

/cc @bcmills @jayconrod

created time in 6 days

push eventmattermost/mattermost-server

Agniva De Sarker

commit sha eb3e2f3c955427343a71ec651fe5efcac9246d8c

Trying again

view details

push time in 6 days

pull request commentmattermost/mattermost-server

MM-22044: Fix panic on web_conn send hello

Had a chat with the team about this. I will spend some additional time load testing this and writing additional tools to throughly test and have more confidence that we are not breaking anything with the change. Also added another pair of eyes (Claudio) as a reviewer.

I also plan to own the websocket part of the codebase, since there is a big ticket about re-architecting our websocket logic anyways.

agnivade

comment created time in 6 days

pull request commentmattermost/mattermost-server

Add sleep to fix TestUnlinkGroupTeam

Sorry I have not completely understood this thing yet.

agnivade

comment created time in 6 days

PR opened mattermost/mattermost-server

Reviewers
Add sleep to fix TestUnlinkGroupTeam 2: Dev Review

<!-- Thank you for contributing a pull request! Here are a few tips to help you:

  1. If this is your first contribution, make sure you've read the Contribution Checklist https://developers.mattermost.com/contribute/getting-started/contribution-checklist/
  2. Read our blog post about "Submitting Great PRs" https://developers.mattermost.com/blog/2019-01-24-submitting-great-prs
  3. Take a look at other repository specific documentation at https://developers.mattermost.com/contribute -->

Summary

<!-- A description of what this pull request does. --> Since App.SyncRolesAndMembership happens in a separate goroutine without any control over it, we can't know when it has finished.

Hence, we fix this issue by inserting a time.Sleep.

Ticket Link

<!-- If this pull request addresses a Help Wanted ticket, please link the relevant GitHub issue, e.g.

Fixes https://github.com/mattermost/mattermost-server/issues/XXXXX

Otherwise, link the JIRA ticket. --> https://mattermost.atlassian.net/browse/MM-22190

+5 -0

0 comment

1 changed file

pr created time in 6 days

delete branch mattermost/mattermost-server

delete branch : unlinkteam

delete time in 6 days

create barnchmattermost/mattermost-server

branch : unlink2

created branch time in 6 days

create barnchmattermost/mattermost-server

branch : unlinkteam

created branch time in 6 days

Pull request review commenttldr-pages/tldr

efibootmgr: add page

+# efibootmgr++> Manipulate the UEFI Boot Manager (the Bootoptions).++- List the current settings:++`efibootmgr -v for Filepaths`++- Create a new boot option:++`sudo efibootmgr -c -d {{esp_blockdevice}} -l {{\path\to\file.efi}} -L "{{Label}}"`

The / convention is something we decided to use irrespective of what platform the page is for.

sp1ritCS

comment created time in 6 days

Pull request review commenttldr-pages/tldr

yabai: add page

+# yabai++> A tiling window manager for macOS based on binary space partitioning.+> More information: <https://github.com/koekeishiya/yabai>.++- Set the layout to bsp:++`yabai -m config layout {{bsp}}`++- Set the window gap to 10pt:++`yabai -m config window_gap {{10}}`++- Enable opacity:++`yabai -m config window_opacity on`

on and off should be tokens ({{}})

BosEriko

comment created time in 6 days

push eventmattermost/mattermost-load-test-ng

Agniva De Sarker

commit sha 8c207a85c856187ed0dbffdd72d44a8733e554fb

MM-22101: reduce login/logout frequency (#115) * MM-22101: reduce login/logout frequency - Reordered login to be after logout in the loop so that the frquency of logout/login can be reduced without leaving the user in a logged out state. - Doing logout/login once every 20 iterations of the loop. - Doing signup and login in an initial phase before starting the loop so that the user is in a logged in state when the loop starts. * Incorporate review comments * Adding runFrequency of 1 to every other action. * Making cycleCount to be 1

view details

push time in 6 days

delete branch mattermost/mattermost-load-test-ng

delete branch : lesssignup

delete time in 6 days

PR merged mattermost/mattermost-load-test-ng

MM-22101: reduce login/logout frequency 3: Reviews Complete

<!-- Thank you for contributing a pull request! Here are a few tips to help you:

  1. If this is your first contribution, make sure you've read the Contribution Checklist https://developers.mattermost.com/contribute/getting-started/contribution-checklist/
  2. Read our blog post about "Submitting Great PRs" https://developers.mattermost.com/blog/2019-01-24-submitting-great-prs
  3. Take a look at other repository specific documentation at https://developers.mattermost.com/contribute -->

Summary

<!-- A description of what this pull request does. -->

  • During load testing, it was found that doing login/logout on every iteration has a huge CPU cost and essentially takes up the entire CPU profile. Keeping this logic would prevent us from looking into what bottlenecks do we have in the system because all of the time would be spent on hashing the user passwords.

Hence we reduce the frequency to allow other actions to be executed more frequently and allow us to look into what other parts can be optimized.

  • Reordered login to be after logout in the loop so that the frquency of logout/login can be reduced without leaving the user in a logged out state.
  • Doing logout/login once every 20 iterations of the loop.
  • Doing signup and login in an initial phase before starting the loop so that the user is in a logged in state when the loop starts.

Ticket Link

<!-- If this pull request addresses a Help Wanted ticket, please link the relevant GitHub issue, e.g.

Fixes https://github.com/mattermost/mattermost-server/issues/XXXXX

Otherwise, link the JIRA ticket. --> https://mattermost.atlassian.net/browse/MM-22101

+73 -43

0 comment

2 changed files

agnivade

pr closed time in 6 days

push eventmattermost/mattermost-load-test-ng

Agniva De Sarker

commit sha 54261e1991c8be34590e18a29b18e3c626e03daa

Making cycleCount to be 1

view details

push time in 6 days

Pull request review commenttldr-pages/tldr

initdb: Add new page for initdb

+# initdb++> Create a PostgreSQL database on disk.+> More information: <https://www.postgresql.org/docs/9.5/app-initdb.html>.++- Create a database at /usr/local/var/postgres:++`initdb -D /usr/local/var/postgres`

Please wrap the location within backticks (``)

MansoorMajeed

comment created time in 6 days

Pull request review commenttldr-pages/tldr

initdb: Add new page for initdb

+# initdb++> Create a PostgreSQL database on disk.+> More information: <https://www.postgresql.org/docs/9.5/app-initdb.html>.++- Create a database at /usr/local/var/postgres:

Perhaps we can change it to - "Create a database at a given location." ? I think that is simple enough.

MansoorMajeed

comment created time in 6 days

Pull request review commenttldr-pages/tldr

mmls: add page

+# mmls++> Display the partition layout of a volume system.+> More information: <https://wiki.sleuthkit.org/index.php?title=Mmls>.++- Display the partition table stored in an image file:++`mmls {{path/to/image_file}}`++- Display the partition table with an additional column for the partition size:++`mmls -B -i {{path/to/image_file}}`

What does B stand for exactly ? Is there a full version of the flag ? Is there a way we can incorporate the word in the description ?

z7y8hsBP

comment created time in 6 days

push eventmattermost/mattermost-server

Agniva De Sarker

commit sha 4632d2b9502fa7339a77271bd4d01e662aea47f4

Trying again

view details

push time in 6 days

more