profile
viewpoint
Nick Snyder nicksnyder @sourcegraph San Francisco, CA

linkedin/LayoutKit 3144

LayoutKit is a fast view layout library for iOS, macOS, and tvOS.

nicksnyder/go-i18n 1552

Translate your Go program into multiple languages.

nicksnyder/ios-cell-layout 12

How to use autolayout for dynamically sized UITableViewCells

nicksnyder/basen 9

A base62 and base58 encoding library for Go

nicksnyder/go-securetoken 7

The securetoken package implements web-safe secure tokens in Go.

nicksnyder/activity 1

Activity is a command line tool that summarizes a person's activity from various services.

nicksnyder/docs 1

My personal style guide

nicksnyder/IBDesignableExamples 1

Example usage of @IBDesignable and @IBInspectable

nicksnyder/AndroidNativeVsWebView 0

Compare performance of native rendering vs WebView rendering

startednicksnyder/go-i18n

started time in 14 hours

issue commentnicksnyder/go-i18n

Reseting err to nil after falling back on Other plural form

Makes total sense, thank you for the explanation @nicksnyder 👍

salihzain

comment created time in 2 days

startedmaubot/maubot

started time in 4 days

issue commentnicksnyder/go-i18n

Default language hierarchy

Thanks, I understand. I have examined the code a bit further and also looked at how some of the underlying features from language are used and implemented. I cannot see an easy to adapt the library to my use-case but I might look again later.

In the meantime I have implement the following which is sufficient for now.

` func loadMessageFile(locale string) (*i18n.MessageFile, error) { if files[locale] != nil { // already loaded it return files[locale], nil }

var messages []*i18n.Message
if parent, ok := defaults[locale]; ok {
	if m, err := loadMessageFile(parent); err == nil {
		messages = append(messages, m.Messages...)
	}
}

m, err := bundle.LoadMessageFile(locale + `.json`)
if err == nil {
	if len(messages) > 0 {
		// Append our messages to our parent's messages
		messages = append(messages, m.Messages...)
		m.Messages = messages                  // replace
		bundle.AddMessages(m.Tag, messages...) // relies on later elements overriding earlier ones with same Message.ID
	}
	// else in normal case messages added by bundle.LoadMessageFile()

	files[locale] = m
}
return m, err

} `

awy

comment created time in 4 days

issue commentnicksnyder/go-i18n

Default language hierarchy

That does not actually cover my use-case. Consider the case where the bundle contains complete translations for "fr" and "en" (the default) but for "fr-CA" it only contains translations in the case that the Canadian French translation differs from the standard French one.

You example will fail for a MessageID that is not in the "fr-CA" messages even though it is present in the "fr" ones.

awy

comment created time in 5 days

release nicksnyder/go-i18n

v2.1.2

released time in 7 days

pull request commentnicksnyder/go-i18n

fix escape sequences when extracting string literals

Codecov Report

Merging #244 (799167e) into main (a5b9f57) will decrease coverage by 0.16%. The diff coverage is 33.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #244      +/-   ##
==========================================
- Coverage   82.85%   82.68%   -0.17%     
==========================================
  Files          14       14              
  Lines        1178     1178              
==========================================
- Hits          976      974       -2     
- Misses        140      141       +1     
- Partials       62       63       +1     
Impacted Files Coverage Δ
v2/goi18n/extract_command.go 64.59% <33.33%> (-1.25%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a5b9f57...799167e. Read the comment docs.

nicksnyder

comment created time in 7 days

startednicksnyder/go-i18n

started time in 8 days

fork eclipseo/go-i18n

Translate your Go program into multiple languages.

fork in 8 days

startednicksnyder/go-i18n

started time in 9 days

startednicksnyder/go-i18n

started time in 9 days

startednicksnyder/go-i18n

started time in 10 days

startedgrantjenks/python-sortedcontainers

started time in 11 days

pull request commentsourcegraph/sourcegraph

search: Copy zoekt querying to searcher for structural search

Codecov Report

Merging #17252 (fe426fd) into main (fc9c5dc) will decrease coverage by 0.11%. The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main   #17252      +/-   ##
==========================================
- Coverage   52.14%   52.03%   -0.12%     
==========================================
  Files        1709     1711       +2     
  Lines       85363    85553     +190     
  Branches     7642     7642              
==========================================
  Hits        44514    44514              
- Misses      36941    37131     +190     
  Partials     3908     3908              
Flag Coverage Δ *Carryforward flag
go 51.07% <0.00%> (-0.17%) :arrow_down:
integration 30.55% <ø> (ø) Carriedforward from 7566223
storybook 30.14% <ø> (ø) Carriedforward from 7566223
typescript 54.36% <ø> (ø) Carriedforward from 7566223
unit 34.86% <ø> (ø) Carriedforward from 7566223

*This pull request uses carry forward flags. Click here to find out more.

Impacted Files Coverage Δ
cmd/searcher/search/zoekt_search.go 0.00% <0.00%> (ø)
internal/timeutil/fakeclock.go 0.00% <0.00%> (ø)
camdencheek

comment created time in 11 days

PR closed sourcegraph/sourcegraph

Reviewers
search: Make URI public

Makes the URI field of FileMatchResolver public so that it can be used to construct a FileMatchResolver from outisde the graphqlbackend package. This is needed so that we can run Zoekt queries from searcher for structural search.

It's used for zoekt here.

<!-- Reminder: Have you updated the changelog and relevant docs (user docs, architecture diagram, etc) ? -->

+34 -34

4 comments

10 changed files

camdencheek

pr closed time in 11 days

pull request commentsourcegraph/sourcegraph

search: Make URI public

After reorganizing some things, I don't think this will be needed any longer. Closing it for now

camdencheek

comment created time in 11 days

push eventsourcegraph/sourcegraph

Thorsten Ball

commit sha 7bbe92a765eb1a9f481008fd33e8bb3c1909087f

Fix missing parameter in curl command in docs (#17249) This was reported by a customer to @christinelovett.

view details

Artem Ruts

commit sha 376ec920d00e57ec3ca6cfe6fe58b5d876d7c82b

Add unique keys to repo page links (#17190)

view details

Eric Fritz

commit sha 6db657cfcc549324c8e20bd26461939166b80db6

codeintel: Add a feature flag for auto indexing (#17209)

view details

Rijnard van Tonder

commit sha bfe1e64e9c4f26eea991441b18e5488d296c7ea5

search: isolate legacy parser code to campaigns search (#17229)

view details

Juliana Peña

commit sha d3d4f5c771ccce2411535dc8559e565e724f7d68

streaming: show errors in skipped popover and sort by severity (#17207) - Errors (either server or client side) from streaming search are now shown in the skipped results popover with a new `error` severity - Messages in the skipped results popover are now sorted by severity (`error` -> `warn` -> `info`) - Renamed `stream.tsx` to `stream.ts` since it doesn't contain any JSX

view details

Keegan Carruthers-Smith

commit sha 21b1b82da8bd0229b54e6ee941b50be11b4ac0be

web: pass through trace param to streaming search API (#17234) When "trace=1" is in the parameters of a page, we enable tracing for graphql requests. This does the same for streaming search (which does not use graphql). Co-authored-by: Loïc Guychard <loic@sourcegraph.com>

view details

flying-robot

commit sha d2c88d8f7c47e833ffdbd45c96d2da880074b767

Only set DisplayName and AvatarURL if empty. (#17257) If a user signed in via multiple code hosts with different display names and avatars, their Sourcegraph experience would flip-flop between them as they logged in via the different hosts. This changes that behavior so that updates will only be made to the underlying data when it's absent. Otherwise the first-encountered values will be used. fixes https://github.com/sourcegraph/sourcegraph/issues/17086

view details

Erik Seliger

commit sha 0736aa197596943c2436d2e9c5f441ef269234bd

Introduce current state column (#17215) As per the designs, we want to display the current state of the changeset in addition to the actions taken. This PR introduces this column to the list view.

view details

Ryan Slade

commit sha f449be875f1022467fa404d07d32c26840128a76

repo-updater: Fix state page (#17272) A previous commit, a56ad2f9, removed the URL field from our configuredRepo type but we were still trying to render it.

view details

Ryan Slade

commit sha 41a72d82b3f0c82ff0c6e984203473649c8a5ac6

monitoring: Increase alert time range (#17269) Increase the time range for the src_repoupdater_sched_update_queue_length metric from 30 minutes to 2 hours. This should stop false positives due to expected spikes in the update queue length when updates are queued due to age.

view details

renovate[bot]

commit sha cd48b07e3a0e0c1f2c390fc7ca535c9edd584867

Update dependency @pollyjs/core to ^5.1.0 (#16983) Co-authored-by: Renovate Bot <bot@renovateapp.com>

view details

renovate[bot]

commit sha 40b33a572420a60ae90fb06c01e61bebf65da32c

Update dependency execa to v5 (#16452) Co-authored-by: Renovate Bot <bot@renovateapp.com>

view details

renovate[bot]

commit sha 93d6dccf89f805227e5a1f60888f3b02cf8ac797

Update renovatebot/github-action action to v24 (#17094) Co-authored-by: Renovate Bot <bot@renovateapp.com>

view details

renovate[bot]

commit sha b64f6561e3a9a501be0a14a77bfb959aa2b6a154

Update dependency use-deep-compare-effect to ^1.6.1 (#16285) Co-authored-by: Renovate Bot <bot@renovateapp.com>

view details

Thorsten Ball

commit sha 35d70e0ec6f3506222802ef56a228f20b6963f58

Enable dynamic changesetTemplates and steps outputs (#17243) * Enable dynamic changesetTemplates and steps outputs * Update campaign spec schema * Run prettier on campaign spec schema * Update the campaign spec schema docs/examples

view details

Ryan Slade

commit sha 73fa30e0f52ad2e37cab66a1ef8e7e015feb3c2f

db: Convert db/users to basestore (#17262) Convert the db/users struct to use basestore and rename it to UserStore org_members and globalstatedb were also minimally changed and will be fully migrated to basestore in another PR.

view details

Loïc Guychard

commit sha b3376e34a92821afd5153139e38e1d720417ada7

Add "create code monitor" button to search results page (#17270) Fixes #17267

view details

Ryan Slade

commit sha fc9c5dc16d6375bd367ecbe98a671912609a9c8d

db: Combine files that deal with db.UserStore (#17275) We had methods spread across multiple files which makes it difficult to find them all.

view details

Camden Cheek

commit sha 756622371bbe3590ab4a0ff5229f4818de0bf9ea

search: Move FakeClock to timeutil This moves `FakeClock` from `dbtesting` to `timeutil` so it can used without introducing a transitive dependency on `dbconn`.

view details

Camden Cheek

commit sha ea64ba5c35403660d96bc1e97296ed818097b9c1

Make it compile

view details

push time in 11 days

Pull request review commentsourcegraph/sourcegraph

search: Copy zoekt querying to searcher for structural search

+package search++import (+	"context"+	"errors"+	"net/url"+	"regexp/syntax"+	"strings"+	"time"++	"github.com/google/zoekt"+	zoektquery "github.com/google/zoekt/query"+	"github.com/inconshreveable/log15"+	"github.com/opentracing/opentracing-go"++	"github.com/sourcegraph/sourcegraph/internal/api"+	"github.com/sourcegraph/sourcegraph/internal/comby"+	"github.com/sourcegraph/sourcegraph/internal/search"+	"github.com/sourcegraph/sourcegraph/internal/trace"+	"github.com/sourcegraph/sourcegraph/internal/trace/ot"+	"github.com/sourcegraph/sourcegraph/internal/types"+)++var (+	// The default timeout to use for queries.+	defaultTimeout = 20 * time.Second+)++func noOpAnyChar(re *syntax.Regexp) {+	if re.Op == syntax.OpAnyChar {+		re.Op = syntax.OpAnyCharNotNL+	}+	for _, s := range re.Sub {+		noOpAnyChar(s)+	}+}++func parseRe(pattern string, filenameOnly bool, contentOnly bool, queryIsCaseSensitive bool) (zoektquery.Q, error) {+	// these are the flags used by zoekt, which differ to searcher.+	re, err := syntax.Parse(pattern, syntax.ClassNL|syntax.PerlX|syntax.UnicodeGroups)+	if err != nil {+		return nil, err+	}+	noOpAnyChar(re)+	// zoekt decides to use its literal optimization at the query parser+	// level, so we check if our regex can just be a literal.+	if re.Op == syntax.OpLiteral {+		return &zoektquery.Substring{+			Pattern:       string(re.Rune),+			CaseSensitive: queryIsCaseSensitive,+			Content:       contentOnly,+			FileName:      filenameOnly,+		}, nil+	}+	return &zoektquery.Regexp{+		Regexp:        re,+		CaseSensitive: queryIsCaseSensitive,+		Content:       contentOnly,+		FileName:      filenameOnly,+	}, nil+}++func fileRe(pattern string, queryIsCaseSensitive bool) (zoektquery.Q, error) {+	return parseRe(pattern, true, false, queryIsCaseSensitive)+}++func HandleFilePathPatterns(query *search.TextPatternInfo) (zoektquery.Q, error) {+	var and []zoektquery.Q++	// Zoekt uses regular expressions for file paths.+	// Unhandled cases: PathPatternsAreCaseSensitive and whitespace in file path patterns.+	for _, p := range query.IncludePatterns {+		q, err := fileRe(p, query.IsCaseSensitive)+		if err != nil {+			return nil, err+		}+		and = append(and, q)+	}+	if query.ExcludePattern != "" {+		q, err := fileRe(query.ExcludePattern, query.IsCaseSensitive)+		if err != nil {+			return nil, err+		}+		and = append(and, &zoektquery.Not{Child: q})+	}++	// For conditionals that happen on a repo we can use type:repo queries. eg+	// (type:repo file:foo) (type:repo file:bar) will match all repos which+	// contain a filename matching "foo" and a filename matchinb "bar".+	//+	// Note: (type:repo file:foo file:bar) will only find repos with a+	// filename containing both "foo" and "bar".+	for _, p := range query.FilePatternsReposMustInclude {+		q, err := fileRe(p, query.IsCaseSensitive)+		if err != nil {+			return nil, err+		}+		and = append(and, &zoektquery.Type{Type: zoektquery.TypeRepo, Child: q})+	}+	for _, p := range query.FilePatternsReposMustExclude {+		q, err := fileRe(p, query.IsCaseSensitive)+		if err != nil {+			return nil, err+		}+		and = append(and, &zoektquery.Not{Child: &zoektquery.Type{Type: zoektquery.TypeRepo, Child: q}})+	}++	return zoektquery.NewAnd(and...), nil+}++type zoektSearchStreamEvent struct {+	fm       []zoekt.FileMatch+	limitHit bool+	partial  map[api.RepoID]struct{}+	err      error+}++// zoektSearchHEADOnlyFiles searches repositories using zoekt, returning only the file paths containing+// content matching the given pattern.+//+// Timeouts are reported through the context, and as a special case errNoResultsInTimeout+// is returned if no results are found in the given timeout (instead of the more common+// case of finding partial or full results in the given timeout).+func zoektSearchHEADOnlyFiles(ctx context.Context, args *search.TextParameters, repoBranches map[string][]string, since func(t time.Time) time.Duration, c chan<- zoektSearchStreamEvent) (fm []zoekt.FileMatch, limitHit bool, partial map[api.RepoID]struct{}, err error) {+	defer func() {+		if c != nil {+			c <- zoektSearchStreamEvent{+				fm:       fm,+				limitHit: limitHit,+				partial:  partial,+				err:      err,+			}+		}+	}()+	if len(repoBranches) == 0 {+		return nil, false, nil, nil+	}++	k := zoektResultCountFactor(len(repoBranches), args.PatternInfo.FileMatchLimit, args.Mode == search.ZoektGlobalSearch)+	searchOpts := zoektSearchOpts(ctx, k, args.PatternInfo)++	if args.UseFullDeadline {+		// If the user manually specified a timeout, allow zoekt to use all of the remaining timeout.+		deadline, _ := ctx.Deadline()+		searchOpts.MaxWallTime = time.Until(deadline)++		// We don't want our context's deadline to cut off zoekt so that we can get the results+		// found before the deadline.+		//+		// We'll create a new context that gets cancelled if the other context is cancelled for any+		// reason other than the deadline being exceeded. This essentially means the deadline for the new context+		// will be `deadline + time for zoekt to cancel + network latency`.+		var cancel context.CancelFunc+		ctx, cancel = contextWithoutDeadline(ctx)+		defer cancel()+	}++	filePathPatterns, err := HandleFilePathPatterns(args.PatternInfo)+	if err != nil {+		return nil, false, nil, err+	}++	t0 := time.Now()+	q, err := buildQuery(args, repoBranches, filePathPatterns, true)+	if err != nil {+		return nil, false, nil, err+	}+	resp, err := args.Zoekt.Client.Search(ctx, q, &searchOpts)+	if err != nil {+		return nil, false, nil, err+	}+	if since(t0) >= searchOpts.MaxWallTime {+		return nil, false, nil, errNoResultsInTimeout+	}++	// We always return approximate results (limitHit true) unless we run the branch to perform a more complete search.+	limitHit = true+	// If the previous indexed search did not return a substantial number of matching file candidates or count was+	// manually specified, run a more complete and expensive search.+	if resp.FileCount < 10 || args.PatternInfo.FileMatchLimit != defaultMaxSearchResults {+		q, err = buildQuery(args, repoBranches, filePathPatterns, false)+		if err != nil {+			return nil, false, nil, err+		}+		resp, err = args.Zoekt.Client.Search(ctx, q, &searchOpts)+		if err != nil {+			return nil, false, nil, err+		}+		if since(t0) >= searchOpts.MaxWallTime {+			return nil, false, nil, errNoResultsInTimeout+		}+		// This is the only place limitHit can be set false, meaning we covered everything.+		limitHit = resp.FilesSkipped+resp.ShardsSkipped > 0+	}++	if len(resp.Files) == 0 {+		return nil, false, nil, nil+	}++	// TODO fix file limiting+	// limitHit, files, partial := zoektLimitMatches(limitHit, int(args.PatternInfo.FileMatchLimit), resp.Files, func(file *zoekt.FileMatch) (repo *types.RepoName, revs []string, ok bool) {+	// 	repo, inputRevs := repos.GetRepoInputRev(file)+	// 	return repo, inputRevs, true+	// })+	// resp.Files = files++	maxLineMatches := 25 + k+	for _, file := range resp.Files {+		if len(file.LineMatches) > maxLineMatches {+			file.LineMatches = file.LineMatches[:maxLineMatches]+			limitHit = true+		}+	}++	return resp.Files, limitHit, partial, nil+}++func buildQuery(args *search.TextParameters, repoBranches map[string][]string, filePathPatterns zoektquery.Q, shortcircuit bool) (zoektquery.Q, error) {+	regexString := comby.StructuralPatToRegexpQuery(args.PatternInfo.Pattern, shortcircuit)+	if len(regexString) == 0 {+		return &zoektquery.Const{Value: true}, nil+	}+	re, err := syntax.Parse(regexString, syntax.ClassNL|syntax.PerlX|syntax.UnicodeGroups)+	if err != nil {+		return nil, err+	}+	return zoektquery.NewAnd(+		&zoektquery.RepoBranches{Set: repoBranches},+		filePathPatterns,+		&zoektquery.Regexp{+			Regexp:        re,+			CaseSensitive: true,+			Content:       true,+		},+	), nil+}++func zoektResultCountFactor(numRepos int, fileMatchLimit int32, globalSearch bool) (k int) {+	if globalSearch {+		// for globalSearch, numRepos = 0, but effectively we are searching over all+		// indexed repos, hence k should be 1+		k = 1+	} else {+		// If we're only searching a small number of repositories, return more+		// comprehensive results. This is arbitrary.+		switch {+		case numRepos <= 5:+			k = 100+		case numRepos <= 10:+			k = 10+		case numRepos <= 25:+			k = 8+		case numRepos <= 50:+			k = 5+		case numRepos <= 100:+			k = 3+		case numRepos <= 500:+			k = 2+		default:+			k = 1+		}+	}+	if fileMatchLimit > defaultMaxSearchResults {+		k = int(float64(k) * 3 * float64(fileMatchLimit) / float64(defaultMaxSearchResults))+	}+	return k+}++func getSpanContext(ctx context.Context) (shouldTrace bool, spanContext map[string]string) {+	if !ot.ShouldTrace(ctx) {+		return false, nil+	}++	spanContext = make(map[string]string)+	if err := ot.GetTracer(ctx).Inject(opentracing.SpanFromContext(ctx).Context(), opentracing.TextMap, opentracing.TextMapCarrier(spanContext)); err != nil {+		log15.Warn("Error injecting span context into map: %s", err)+		return true, nil+	}+	return true, spanContext+}++func zoektSearchOpts(ctx context.Context, k int, query *search.TextPatternInfo) zoekt.SearchOptions {+	shouldTrace, spanContext := getSpanContext(ctx)+	searchOpts := zoekt.SearchOptions{+		Trace:                  shouldTrace,+		SpanContext:            spanContext,+		MaxWallTime:            defaultTimeout,+		ShardMaxMatchCount:     100 * k,+		TotalMaxMatchCount:     100 * k,+		ShardMaxImportantMatch: 15 * k,+		TotalMaxImportantMatch: 25 * k,+		MaxDocDisplayCount:     2 * defaultMaxSearchResults,+	}++	// We want zoekt to return more than FileMatchLimit results since we use+	// the extra results to populate reposLimitHit. Additionally the defaults+	// are very low, so we always want to return at least 2000.+	if query.FileMatchLimit > defaultMaxSearchResults {+		searchOpts.MaxDocDisplayCount = 2 * int(query.FileMatchLimit)+	}+	if searchOpts.MaxDocDisplayCount < 2000 {+		searchOpts.MaxDocDisplayCount = 2000+	}++	if userProbablyWantsToWaitLonger := query.FileMatchLimit > defaultMaxSearchResults; userProbablyWantsToWaitLonger {+		searchOpts.MaxWallTime *= time.Duration(3 * float64(query.FileMatchLimit) / float64(defaultMaxSearchResults))+	}++	return searchOpts+}++// contextWithoutDeadline returns a context which will cancel if the cOld is+// canceled.+func contextWithoutDeadline(cOld context.Context) (context.Context, context.CancelFunc) {+	cNew, cancel := context.WithCancel(context.Background())++	// Set trace context so we still get spans propagated+	cNew = trace.CopyContext(cNew, cOld)++	go func() {+		select {+		case <-cOld.Done():+			// cancel the new context if the old one is done for some reason other than the deadline passing.+			if cOld.Err() != context.DeadlineExceeded {+				cancel()+			}+		case <-cNew.Done():+		}+	}()++	return cNew, cancel+}++var errNoResultsInTimeout = errors.New("no results found in specified timeout")++const defaultMaxSearchResults = 30+const maxSearchResultsPerPaginatedRequest = 5000++// zoektLimitMatches is the logic which limits files based on+// limit. Additionally it calculates the set of repos with partial+// results. This information is not returned by zoekt, so if zoekt indicates a+// limit has been hit, we include all repos in partial.+func zoektLimitMatches(limitHit bool, limit int, files []zoekt.FileMatch, getRepoInputRev func(file *zoekt.FileMatch) (repo *types.RepoName, revs []string, ok bool)) (bool, []zoekt.FileMatch, map[api.RepoID]struct{}) {

This is fixed by #17283

camdencheek

comment created time in 11 days

pull request commentsourcegraph/sourcegraph

Adding integrationKey to alert docs

@bobheadxi Gotcha—do you want me to approve your suggested changes here, or close this out and you can tackle the bug and doc updates all together separately?

emchap

comment created time in 11 days

PR opened sourcegraph/sourcegraph

Document steps.output in campaign spec YAML reference

<!-- Reminder: Have you updated the changelog and relevant docs (user docs, architecture diagram, etc) ? -->

+70 -0

0 comment

1 changed file

pr created time in 11 days

push eventsourcegraph/sourcegraph

renovate[bot]

commit sha 020c4f2c02699421cbfddbc5487e0ed468dfee2c

Update dependency p-timeout to v4 (#16381) Co-authored-by: Renovate Bot <bot@renovateapp.com>

view details

renovate[bot]

commit sha 4209351c2c459af6a1d13d3776d309e186c5a447

Update dependency prettier to ^2.2.1 (#16154) Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: Felix Becker <felix.b@outlook.com>

view details

renovate[bot]

commit sha 2810d2ab70dee4539cbbbfdee17ec7486220f8c4

Update renovatebot/github-action action to v23.100.5 (#17011) Co-authored-by: Renovate Bot <bot@renovateapp.com>

view details

renovate[bot]

commit sha f4cf143378b972ccbad8e0db900d410026443315

Update actions/upload-artifact action to v2 (#16294) Co-authored-by: Renovate Bot <bot@renovateapp.com>

view details

ᴜɴᴋɴᴡᴏɴ

commit sha 271e50a1270360e619c655525e3a519bc3f3c022

db: truncate microsecond for User.CreatedAt (#17244)

view details

Camden Cheek

commit sha f85cdb2901278b2a5f49b76b26766419633a6e30

search: Fix code monitors paging (#17180) * search: Fix pageinfo returned for code monitors The PageInfo returned by the GraphQL resolver for monitors was always indicating that there were more pages after the first query because it simply checked if the last result was empty. This change adds logic to query the number of remaining code monitors so that HasNextPage is set only if asking for another page would result in more code monitors. * Revise remaining code, and add test * Fix comment * Factor out extra database call

view details

Robert Lin

commit sha 7a84129972b096c7c1864e46de782be84b46957c

monitoring: cadvisor observables review (#17239) Remove container fs inodes: disk metrics are not supported in OCI it seems (google/cadvisor#2785), and the metrics it reports in docker-compose feels rather dubious at times. Instead, make ContainerIOUsage a shared observable, and the services that had relevant uses for the inodes monitoring now have this instead. Reworked container restart: use cAdvisor metrics to detect container restarts in all environments cAdvisor and monitoring documentation: inline documentation improvements and a new cAdvisor page in the docsite Shared Group titles: titles are now in `shared` package for consistency and ease of editing

view details

Thorsten Ball

commit sha 7bbe92a765eb1a9f481008fd33e8bb3c1909087f

Fix missing parameter in curl command in docs (#17249) This was reported by a customer to @christinelovett.

view details

Artem Ruts

commit sha 376ec920d00e57ec3ca6cfe6fe58b5d876d7c82b

Add unique keys to repo page links (#17190)

view details

Eric Fritz

commit sha 6db657cfcc549324c8e20bd26461939166b80db6

codeintel: Add a feature flag for auto indexing (#17209)

view details

Rijnard van Tonder

commit sha bfe1e64e9c4f26eea991441b18e5488d296c7ea5

search: isolate legacy parser code to campaigns search (#17229)

view details

Juliana Peña

commit sha d3d4f5c771ccce2411535dc8559e565e724f7d68

streaming: show errors in skipped popover and sort by severity (#17207) - Errors (either server or client side) from streaming search are now shown in the skipped results popover with a new `error` severity - Messages in the skipped results popover are now sorted by severity (`error` -> `warn` -> `info`) - Renamed `stream.tsx` to `stream.ts` since it doesn't contain any JSX

view details

Keegan Carruthers-Smith

commit sha 21b1b82da8bd0229b54e6ee941b50be11b4ac0be

web: pass through trace param to streaming search API (#17234) When "trace=1" is in the parameters of a page, we enable tracing for graphql requests. This does the same for streaming search (which does not use graphql). Co-authored-by: Loïc Guychard <loic@sourcegraph.com>

view details

flying-robot

commit sha d2c88d8f7c47e833ffdbd45c96d2da880074b767

Only set DisplayName and AvatarURL if empty. (#17257) If a user signed in via multiple code hosts with different display names and avatars, their Sourcegraph experience would flip-flop between them as they logged in via the different hosts. This changes that behavior so that updates will only be made to the underlying data when it's absent. Otherwise the first-encountered values will be used. fixes https://github.com/sourcegraph/sourcegraph/issues/17086

view details

Erik Seliger

commit sha 0736aa197596943c2436d2e9c5f441ef269234bd

Introduce current state column (#17215) As per the designs, we want to display the current state of the changeset in addition to the actions taken. This PR introduces this column to the list view.

view details

Ryan Slade

commit sha f449be875f1022467fa404d07d32c26840128a76

repo-updater: Fix state page (#17272) A previous commit, a56ad2f9, removed the URL field from our configuredRepo type but we were still trying to render it.

view details

Ryan Slade

commit sha 41a72d82b3f0c82ff0c6e984203473649c8a5ac6

monitoring: Increase alert time range (#17269) Increase the time range for the src_repoupdater_sched_update_queue_length metric from 30 minutes to 2 hours. This should stop false positives due to expected spikes in the update queue length when updates are queued due to age.

view details

renovate[bot]

commit sha cd48b07e3a0e0c1f2c390fc7ca535c9edd584867

Update dependency @pollyjs/core to ^5.1.0 (#16983) Co-authored-by: Renovate Bot <bot@renovateapp.com>

view details

renovate[bot]

commit sha 40b33a572420a60ae90fb06c01e61bebf65da32c

Update dependency execa to v5 (#16452) Co-authored-by: Renovate Bot <bot@renovateapp.com>

view details

renovate[bot]

commit sha 93d6dccf89f805227e5a1f60888f3b02cf8ac797

Update renovatebot/github-action action to v24 (#17094) Co-authored-by: Renovate Bot <bot@renovateapp.com>

view details

push time in 11 days

pull request commentsourcegraph/sourcegraph

db: migrate dbconn from lib/pq to jackc/pgx

:shipit:

asdine

comment created time in 11 days

create barnchsourcegraph/sourcegraph

branch : mrn/doc-dyn-changesettemplates

created branch time in 11 days

push eventsourcegraph/deploy-sourcegraph

Renovate Bot

commit sha 7a9b0d88545166375c422ab2ca71c57cf8d9076f

Update Sourcegraph Docker insiders images

view details

push time in 11 days

push eventsourcegraph/deploy-sourcegraph

Renovate Bot

commit sha 53d0b69a97a4f194fba42f610dc3c03ca663b657

Update sourcegraph/postgres_exporter:insiders Docker digest to b3f6971

view details

push time in 11 days

pull request commentsourcegraph/sourcegraph

Adopt proper changeset backdrop highlight

Codecov Report

Merging #17285 (c7bb06a) into main (031b669) will decrease coverage by 1.26%. The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main   #17285      +/-   ##
==========================================
- Coverage   52.14%   50.88%   -1.27%     
==========================================
  Files        1709     1709              
  Lines       85375    85385      +10     
  Branches     7531     7537       +6     
==========================================
- Hits        44522    43451    -1071     
- Misses      36945    38026    +1081     
  Partials     3908     3908              
Flag Coverage Δ
go 51.23% <ø> (ø)
integration 30.60% <0.00%> (-0.02%) :arrow_down:
storybook ?
typescript 50.04% <0.00%> (-4.34%) :arrow_down:
unit 34.83% <0.00%> (-0.02%) :arrow_down:
Impacted Files Coverage Δ
...gns/detail/changesets/CampaignChangesetsHeader.tsx 50.00% <ø> (-50.00%) :arrow_down:
...paigns/detail/changesets/ExternalChangesetNode.tsx 2.63% <0.00%> (-79.52%) :arrow_down:
.../detail/changesets/HiddenExternalChangesetNode.tsx 50.00% <ø> (-50.00%) :arrow_down:
client/web/src/components/WebStory.tsx 0.00% <0.00%> (-100.00%) :arrow_down:
client/shared/src/components/VirtualList.tsx 0.00% <0.00%> (-100.00%) :arrow_down:
client/branded/src/components/CodeSnippet.tsx 0.00% <0.00%> (-100.00%) :arrow_down:
client/branded/src/components/BrandedStory.tsx 0.00% <0.00%> (-100.00%) :arrow_down:
client/branded/src/components/SourcegraphLogo.tsx 0.00% <0.00%> (-100.00%) :arrow_down:
...ient/web/src/enterprise/campaigns/list/testData.ts 0.00% <0.00%> (-100.00%) :arrow_down:
...ent/web/src/enterprise/codeintel/shared/backend.ts 0.00% <0.00%> (-100.00%) :arrow_down:
... and 129 more
eseliger

comment created time in 11 days

issue commentsourcegraph/sourcegraph

Show both "current monthly users" and "total users" in the admin UI

I posted https://github.com/sourcegraph/sourcegraph/issues/17282 without realizing this existed!

My message from there (reposting for additional details):

=====

The question of how the number of licenses used on the Site-admin > Overview page is counted has come up several times recently. Customers will delete a group of users, but the X in the "X used / Y remaining" count doesn't change.

Recently:

  • https://app.hubspot.com/contacts/2762526/company/554275594
  • https://app.hubspot.com/contacts/2762526/company/690744415
  • https://app.hubspot.com/contacts/2762526/company/557475882
  • https://app.hubspot.com/contacts/2762526/company/5184085451

Problem:

The licenses used count at Site-admin > Overview page reflects the max count of user licenses, not current. image

If they subsequently delete users, this number doesn't go down, even though those seats/licenses are re-assignable.

Showing this was once intentional, because we bill based on the max. E.g., if a company has a license for 100 users, but they hit 101, then we will bill them for that next tier of users, even if they subsequently delete them to get below 100.

That said, it's very confusing, and customers don't realize that they are reassignable.

I think a VERY simple solution to this is go from:

X used / Y remaining

to:

Z currently used / Y remaining (X maximum ever used)

Where:

  • X and Y stay the same as they are today
  • Z === current user count (same as what is displayed lower down on the Site-admin > Overview page, and what is displayed on the Site-admin > Users page

Follow-ups to this issue include:

  1. A refactoring of the Site-admin > License page, which desperately needs some refreshing
  2. Changes to all of these numbers/pages to account for non-standard licenses (e.g. MAU billing)
Joelkw

comment created time in 11 days

issue closedsourcegraph/sourcegraph

Show admins current licenses used as well as max count

The question of how the number of licenses used on the Site-admin > Overview page is counted has come up several times recently. Customers will delete a group of users, but the X in the "X used / Y remaining" count doesn't change.

Recently:

  • https://app.hubspot.com/contacts/2762526/company/554275594
  • https://app.hubspot.com/contacts/2762526/company/690744415
  • https://app.hubspot.com/contacts/2762526/company/557475882
  • https://app.hubspot.com/contacts/2762526/company/5184085451

Problem:

The licenses used count at Site-admin > Overview page reflects the max count of user licenses, not current. image

If they subsequently delete users, this number doesn't go down, even though those seats/licenses are re-assignable.

Showing this was once intentional, because we bill based on the max. E.g., if a company has a license for 100 users, but they hit 101, then we will bill them for that next tier of users, even if they subsequently delete them to get below 100.

That said, it's very confusing, and customers don't realize that they are reassignable.

I think a VERY simple solution to this is go from:

X used / Y remaining

to:

Z currently used / Y remaining (X maximum ever used)

Where:

  • X and Y stay the same as they are today
  • Z === current user count (same as what is displayed lower down on the Site-admin > Overview page, and what is displayed on the Site-admin > Users page

Follow-ups to this issue include:

  1. A refactoring of the Site-admin > License page, which desperately needs some refreshing
  2. Changes to all of these numbers/pages to account for non-standard licenses (e.g. MAU billing)

closed time in 11 days

dadlerj

issue commentsourcegraph/sourcegraph

Show admins current licenses used as well as max count

Duplicate of https://github.com/sourcegraph/sourcegraph/issues/17098

dadlerj

comment created time in 11 days

pull request commentsourcegraph/sourcegraph

Adopt proper changeset backdrop highlight

<!-- codenotify report --> Notifying subscribers in CODENOTIFY files for diff 031b66902ea73cf102e1343455cc35b742357f32...c7bb06aea47d4c7c901fa6ff8f27389752b88690.

Notify File(s)
@LawnGnome client/web/src/enterprise/campaigns/detail/CampaignDetailsPage.story.tsx<br>client/web/src/enterprise/campaigns/detail/changesets/CampaignChangesets.scss<br>client/web/src/enterprise/campaigns/detail/changesets/CampaignChangesetsHeader.tsx<br>client/web/src/enterprise/campaigns/detail/changesets/ExternalChangesetNode.scss<br>client/web/src/enterprise/campaigns/detail/changesets/ExternalChangesetNode.tsx<br>client/web/src/enterprise/campaigns/detail/changesets/HiddenExternalChangesetNode.tsx
eseliger

comment created time in 11 days

more