profile
viewpoint

marekweb/opaque-id 84

Opaque ID: Obfuscation scheme for integer IDs

marekweb/datastructs-c 28

Arraylist and Hashtable implementation in C

marekweb/jquery-renderjson 9

Quick HTML visualisation rendering of JSON data

marekweb/blowhash-php 2

Blowhash: Strong PHP password hashing for PHP 5.3 and up.

marekweb/edubotics 2

Educational robotics game; Startup Weekend Montreal 2012

marekweb/d2d 1

Drug & disease open data mashup

marekweb/laserbeam 1

Semantic syntax highlighter and annotator for JavaScript

issue commentsourcegraph/sourcegraph

Web: 3.19 tracking issue

*Last week I worked on the breadcrumbs project, made some contributions to page headers to try to make them into a reusable component for all the pages.

I did a dive into the design work in Figma for web styles and components, to plan how we can implement them as actual components and I added some content into Storybook, namely for the tentative PageHeader.

This week I'd like to shift my work back towards integration tests, because this fits into the work needed for the 3.19 release which I'll do as release captain. I want to get some work done on this early ahead of the release so that there's time to smooth out any issues along the way.

lguychard

comment created time in 3 days

push eventsourcegraph/sourcegraph

Marek

commit sha 6c9cfe22f232dd02bee7b0095461c7a9a402c76f

Make some attempts to improve PageHeader and its story

view details

push time in 4 days

pull request commentsourcegraph/sourcegraph

Use a shared Breadcrumbs component throughout the app

I made an attempt to make Breadcrumbs render in the repo header, to test the concept.

It renders but there's an issue with the breadcrumbs state, in which the old breadcrumbs don't get removed.

marekweb

comment created time in 8 days

push eventsourcegraph/sourcegraph

Marek

commit sha b7652ea904971bafc1ab6aac254238b22a082d0d

Pass breadcrumbs state into header, convert further portals into pushBreadcrumb

view details

push time in 8 days

push eventsourcegraph/sourcegraph

Keegan Carruthers-Smith

commit sha 9c70e49a5c8371a31bea82a291188bf9b869e805

zoekt: indexserver removes repos from queue (#12474) This includes several changes to zoekt indexserver which improve observability as well as make us behave better during rebalancing. In particular we would try to index all repos on a replica if we ever rebalanced. We will still do that, but as soon as the replica comes back up we will stop doing that. - 3e5f0f3 indexserver: track last index state as a metric - cfdfeff indexserver: metrics for queue - a453878 indexserver: stop indexing repositories if not listed

view details

uwedeportivo

commit sha 964d97bd4d5817949a5cf596e415c454525313fb

e2e regression test fixes (#12439) * e2e regression tests * e2e -> test in selectors * Update web/src/regression/extensions.test.ts Co-authored-by: Loïc Guychard <loic@sourcegraph.com> * prettier * eslint exception for innerText in core.test * eslint exception for innerText in core.test take 2 Co-authored-by: Loïc Guychard <loic@sourcegraph.com>

view details

uwedeportivo

commit sha 0ef436765fbe494af19506a6eaf42b86fc12ebf7

fix build (#12475)

view details

Felix Becker

commit sha 646ebbb62f5ed21ab1feec1e4fab19a0bb39845e

Use Dart Sass (#12329)

view details

Rijnard van Tonder

commit sha c6cfafb22cb2693695cadcffef5f06f219d8186f

search: fix field value scanner (#12446)

view details

Rijnard van Tonder

commit sha 1d5a67069d35c8840a075207aa77890ae61e7f89

search: error on breaking concat invariant (#12457)

view details

Rijnard van Tonder

commit sha 3029f7449c0fb1198ffcbaee4ebdf25b8ee02ff7

search: log search inputs for differential testing parsers (#12479)

view details

Robert Lin

commit sha e208aa82343e82cf7a1b1bacc88b4d008dd0f537

monitoring: base alert_count only on state=firing alerts (#12483)

view details

github-actions[bot]

commit sha c6d280cec8513a8c2f56ae39185cba5acb955a6e

Update third-party licenses (#12488) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

view details

Thorsten Ball

commit sha 9a85a646af4887e3b9551bdcc43f8dac7f2614a2

Update example in basestore.Store docstring (#12432) I think the docstring was a bit outdated.

view details

Eric Fritz

commit sha 74f698b0c8fcb8cb247580580984cce550fed2c7

codeintel: Add CalculateVisibleUploads to store (#12408)

view details

Ryan Slade

commit sha 65d2eae2857724b745ad953f6b719a7bd1ee746c

go: Update out graphql-go dependency (#12459)

view details

Stefan Hengl

commit sha 255cb618c755026d801b2d2fd5bc9d30197c19a5

search: support negation for field content (#12412)

view details

Keegan Carruthers-Smith

commit sha a521dfbea179120227aae57e31720c998475eeaf

zoekt: prevent indexserver stalling (#12502) See https://github.com/sourcegraph/zoekt/compare/6ed80895db7e...a99799fdc041 - a99799f ctags: handle fatal ctags errors - 5fcad78 ctags: skip commands that are too large - cf36be0 ctags: use file basename - d4fecb4 indexserver: timeout if no output for 5m - 34a0dd6 indexserver: coarse 1h timeout on index job - fdc9c2c Merge remote-tracking branch 'gerrit/master' - b48e35d shards: a progress message every 10s when loading - 4481f7b shards: throttle loading in watcher

view details

Robert Lin

commit sha 434fd412bfeb7c2cdb0909797a31e09d1588944f

monitoring: fix alert state query, fix alert firing threshold (#12489)

view details

uwedeportivo

commit sha 30f8af2388bce040be095a762c5492608a8db2f4

release captain 3.19 (#12505)

view details

Robert Lin

commit sha 37a8af898fffc0be990240f4979b7c1877b8fc3e

monitoring: migrate out-of-band alerts to the generator (#12391) Migrates all out-of-band alert rules defined by deploy-sourcegraph to the generator, such that each alert now has a panel as part of a service dashboard like all our other alerts, with a few changes and additions.

view details

Stephen Gutekanst

commit sha cff20a845c2263deacdcbf18e3b50e2b3c4af94c

Release Docker Compose v3.18.0-1 (#12509) * Release Docker Compose v3.18.0-1 * Release Docker Compose v3.18.0-1 * Release Docker Compose v3.18.0-1

view details

Robert Lin

commit sha da520cf2c4aa5396860e9569d8efe1f68e668f04

monitoring: log prom-wrapper attempts at connecting to the frontend (#12508)

view details

Robert Lin

commit sha 9db0d540d5dab475de834378c8a38988ef17ccd0

monitoring: use prometheus model.Duration (#12510)

view details

push time in 8 days

push eventsourcegraph/sourcegraph

Erik Seliger

commit sha 004bb0b48d89476a2116dd74ea919733dcc798c2

Fix URL for open on sourcegraph button (#12570)

view details

push time in 8 days

delete branch sourcegraph/sourcegraph

delete branch : es/fix-open-sourcegraph-button

delete time in 8 days

PR merged sourcegraph/sourcegraph

Fix URL for open on sourcegraph button

Was broken by https://github.com/sourcegraph/sourcegraph/pull/12534 and discovered by our nightly running test suite

+1 -1

2 comments

1 changed file

eseliger

pr closed time in 8 days

pull request commentsourcegraph/sourcegraph

Use a shared Breadcrumbs component throughout the app

These are my additions to the storybook, as a rough draft to iterate on:

  • Breadcrumbs: http://localhost:9001/?path=/story/web-breadcrumbs--three-levels-deep
  • PageHeader: http://localhost:9001/?path=/story/web-pageheader--complex-header

I would need help to get unblocked on two fronts:

  • What is the right Figma-to-CSS process here -- do we already have styles for the sub-components like the h1 or badge? For now in the PageHeader, I naively copied the header from the Insights Page so it's a starting point, but not yet styled according to the Figma designs.
  • How do the observables/subscription patterns translate to function components? Namely I'm note sure what do we do with the subscription/subject objects which are instance properties (will useObservable be helpful here and how to use it?) and what to do with componentDidUpdate.
marekweb

comment created time in 9 days

push eventsourcegraph/sourcegraph

Marek

commit sha 5186b557c35500cb0523fd26cbfa1ee896141e0d

Add to PageHeader storybook

view details

push time in 9 days

push eventsourcegraph/sourcegraph

Marek

commit sha f532bffec54b61f3f6a2ae81dfb24c3550872bbf

Add PageHeader component

view details

push time in 9 days

pull request commentsourcegraph/sourcegraph

Use a shared Breadcrumbs component throughout the app

I converted RepositoryBranchArea with the assumption that it will receive pushBreadcrumbs as a prop. It's not receiving that prop yet so it won't currently work.

Next in order to provide pushBreadcrumbs it looks like RepoContainer needs to be converted to a function component as well, so that it can use the hook.

My guess about how to convert RepoContainer is to move all of its mount/unmount logic into useEffect but I'm not sure about the right way to deal with: all the subscriptions and componentDidUpdate, and also where/how it's appropriate to use useObservable. So I might delay on trying to convert it until I gain a better understanding.

marekweb

comment created time in 9 days

push eventsourcegraph/sourcegraph

Marek

commit sha 7bcdb8e8a8f150065e96a65d1327b851ceba4071

Add to breadcrumbs storybook

view details

push time in 9 days

push eventsourcegraph/sourcegraph

Marek

commit sha 19944e1dc13ecddf5518fdab2f93e9afa3e4649b

Create basic story for Breadcrumbs

view details

Marek

commit sha 0017bcc0795a7a5c26e67b75250c7186489bb49d

Convert RepositoryBranchesArea to a function componenty

view details

Marek

commit sha 151bf15b2a0d556c7fa32758e461f240950ba65a

Use pushBreadcrumb in RepositoryBranchArea

view details

push time in 9 days

pull request commentsourcegraph/sourcegraph

Use a shared Breadcrumbs component throughout the app

Starting from the top of the task list, I'd like to:

  • create a storybook entry for Breadcrumbs and iterate on it there
  • Convert one of the smaller components first, like RepositoryBranchesArea

I'm still not sure about: how much existing CSS we should re-use for Breadcrumbs (e.g. .repo-header-breadcrumb-nav-item), or keep with the same class names but changed to match differences in Figma (if any), or use new classes from scratch based on the Figma styles.

marekweb

comment created time in 9 days

PR opened sourcegraph/sourcegraph

Make RepoHeader accept initial contributions as a prop

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

+36 -28

0 comment

2 changed files

pr created time in 9 days

create barnchsourcegraph/sourcegraph

branch : marek/repo-header-contributions-prop

created branch time in 9 days

push eventsourcegraph/sourcegraph

Marek

commit sha 4831eab61090dbcc4b2b2e4b827223c6ec169ce0

Improve and fix the browser extension readme (#12478)

view details

push time in 10 days

delete branch sourcegraph/sourcegraph

delete branch : marek/browser-extension-build-readme

delete time in 10 days

PR merged sourcegraph/sourcegraph

Improve browser extension readme
  • add note for building from a specific commit zip
  • use nvm install instead of nvm use so that it installs the node version if it's not installed
+21 -3

1 comment

1 changed file

marekweb

pr closed time in 10 days

issue commentsourcegraph/sourcegraph

Web: 3.19 tracking issue

Last week I worked on wrapping up loose ends of my integration tests. I made contributions to the developer documentation and to the handbook. I collected notes for more additions that I'd like to make to the docs, I'm looking forward to making more contributions there.

I followed up on the review of our Sourcegraph for Firefox add-on and I'm hoping to accelerate the process, because it feels like it's getting very delayed.

We spent time this week as a team to define goals for the iteration.

Next week I plan to work on the problem of how we can run integration puppeteer tests on extensions and browser extensions. I also want to get familiar with all the components we have in Storybook and find out about the issues there.

lguychard

comment created time in 14 days

PR opened sourcegraph/sourcegraph

Improve browser extension readme
  • add note for building from a specific commit zip
  • use nvm install instead of nvm use so that it installs the node version if it's not installed
+21 -3

0 comment

1 changed file

pr created time in 14 days

create barnchsourcegraph/sourcegraph

branch : marek/browser-extension-build-readme

created branch time in 14 days

Pull request review commentsourcegraph/about

Add new onboarding process for web teammates

+# Onboarding++Welcome to the web team! We're excited to welcome you onto the team. This document oultines the structure of your first few weeks at Sourcegraph.
Welcome to the web team! We're excited to have you join the team. This document outlines the structure of your first few weeks at Sourcegraph.
lguychard

comment created time in 14 days

pull request commentsourcegraph/about

Document web group issue triages

Sounds great for maintaining awareness of older issues and to surface things that should be re-surfaced. For example revisiting certain older low-urgency issues that have a time-frame attached e.g. 3 months as was mentioned in our recent discussion.

felixfbecker

comment created time in 15 days

pull request commentsourcegraph/sourcegraph

Use Dart Sass

Going from a compiled module (if I understand correctly, libsass in C) to a JS module, it's interesting that the performance penalty is not really that significant. Looks like an OK tradeoff.

felixfbecker

comment created time in 15 days

PR merged sourcegraph/about

Add to section on flaky tests

Expand the flaky tests section with a definition and an explanation of why they are undesirable

+16 -5

0 comment

1 changed file

marekweb

pr closed time in 17 days

push eventsourcegraph/about

Marek

commit sha 6142fe77d657f10d6a30add926f9aadbc01ac371

Add to section on flaky tests (#1238) Expand the flaky tests section with a definition and an explanation of why they are undesirable

view details

push time in 17 days

delete branch sourcegraph/about

delete branch : marek/flaky-tests

delete time in 17 days

PR opened sourcegraph/about

Reviewers
Add to section on flaky tests

Expand the flaky tests section with a definition and an explanation of why they are undesirable

+16 -5

0 comment

1 changed file

pr created time in 17 days

push eventsourcegraph/about

Marek

commit sha 85b15ea342d3b8c98e0436fa76fb6e2b4bc8d8a0

Fix spelling

view details

push time in 17 days

create barnchsourcegraph/about

branch : marek/flaky-tests

created branch time in 17 days

issue commentsourcegraph/sourcegraph

Phabricator: hover tooltips showing on wrong line in diff views

I wasn't able to reproduce this issue. More information might be needed in order to reproduce it. cc @dadlerj @lguychard

It would be useful to narrow it down between two possible scenarios:

  • the wrong range is being sent in the hover request to the server (which could be confirmed by looking in the Network tab in the browser dev tools)
  • the correct range is being sent in the request but the hover is being rendered in the wrong location.
lguychard

comment created time in 18 days

PR opened sourcegraph/sourcegraph

Improve integration tests

Implementing @felixfbecker's feedback from #12134

+11 -79

0 comment

2 changed files

pr created time in 18 days

create barnchsourcegraph/sourcegraph

branch : marekweb/improve-integration-tests

created branch time in 18 days

push eventsourcegraph/sourcegraph

Marek

commit sha b68fb2185a23f79f6f4660647dd482406bcefacf

docs: Add code host integrations (#12223) Co-authored-by: Felix Becker <felix.b@outlook.com> Co-authored-by: Loïc Guychard <loic@sourcegraph.com> Co-authored-by: Laureen Hudson <52249965+LaureenH@users.noreply.github.com> Co-authored-by: Felix Becker <felix.b@outlook.com> Co-authored-by: Loïc Guychard <loic@sourcegraph.com>

view details

push time in 18 days

delete branch sourcegraph/sourcegraph

delete branch : marekweb/docs-add-code-host-integrations

delete time in 18 days

PR merged sourcegraph/sourcegraph

Reviewers
docs: Add code host integrations docs team/web

I added a first draft of a guide for developing code host integrations.

Intended audience: developers who are working on code host integrations.

I'm using "code host integrations" as an umbrella term for:

  • native integrations for code hosts
  • browser extensions

This is a first step towards clarifying some of the vocabulary around code host integrations, namely the fact that in some places in our docs we say "browser extensions" when we actually mean "browser extensions and native integrations", hence why I propose to use the phrase "code host integrations" as an intentional umbrella term.

+38 -0

1 comment

3 changed files

marekweb

pr closed time in 18 days

push eventsourcegraph/sourcegraph

Marek

commit sha 39501870705e0470d40708ce78a55ef1db291a2c

Fix link

view details

push time in 18 days

issue commentsourcegraph/sourcegraph

Web: 3.19 tracking issue

Last week:

I worked on integration tests, and by the end of the week I started working on additional some test improvements based on feedback.

I worked on two bugs, namely on Bitbucket Server and Phabricator. Thanks to @felixfbecker for coming in with assistance on Bitbucket and for arriving at an elegant CSS solution there.

I reached out to follow up on the review of the "Sourcegraph for Firefox" add-on, and meanwhile I made improvements to the reproducibility of the add-on build to make sure that the build output can be reviewed easily with an identical diff (when building from an identical source commit).

I worked on converting some of my own notes into a new page in the dev documentation site. Since it's my first contribution to the docs I reached out for review and got great feedback that I'll use when adding more docs.

This week I plan to finish some improvements to the integration tests that I worked on, and wrap up loose ends on that.

I'd like to dig deeper in investigating the Phabricator issue, which was stalled due to inability to reproduce.

I'm also planning to spend a bit of time on more dev documentation additions.

lguychard

comment created time in 18 days

Pull request review commentsourcegraph/sourcegraph

docs: Add code host integrations

+# Developing code host integrations++**Code host integrations** are how Sourcegraph delivers features directly into a code host's interface. These integrations allow developers to benefit from Sourcegraph without leaving their code host as they navigate repositories, source code files, commits, and diffs.++For a guide on usage of integrations, see the [Integrations section](../integration/index.md).++## How code host integrations are delivered++Code host integrations are implemented as a JavaScript bundle that is injected directly into the code host's web UI.++Sourcegraph has two channels available to deliver this JavaScript bundle++- **Native integrations** which configure the code host to natively load the JavaScript as an additional resource on every page. These integrations can be configured once by an administrator (typically on a self-hosted code host instance) and are then automatically available to all users.+- [**Browser extensions**](../integration/browser_extension.md) for Chrome and Firefox, which inject the JavaScript bundle on all code host pages. These integrations don't require any central configuration of the code host, but they require each user to individually install the browser extension in order to benefit from it.++## Code views++Code host integrations mainly operate on code views.++A code view is any instance of source code being displayed on any code host page. It can be an entire source file, a snippet of a file, or a diff view. There may be many code views on a single page, for example on a pull request page.++Code host integrations work by first identifying all code views on a given page, and then by adding interface elements (such as action buttons), and listening for hover events over specific code tokens in order to show hover pop-ups.+++## Relationship to the web UI++Sourcegraph code host integrations share some functionality and source code with the Sourcegraph web UI. Both support [Sourcegraph extensions](../extensions/index.md), which is how Sourcegraph provides code intelligence hovers, code decorations, action buttons, and other features. ++The browser extensions, native integrations, and the web UI are collectively labeled as the [web clients](./web/index.md).++## Contributing to code host integrations++The source code for code host integrations is located in the [`browser`](https://github.com/sourcegraph/sourcegraph/tree/master/browser) directory of the Sourcegraph repository.++For build steps and details of the directory layout, see [`browser/README.md`](https://github.com/sourcegraph/sourcegraph/tree/master/browser/README.md)

Good idea. That being said I don't think we should get rid these kinds of READMEs entirely, because they're the best way to answer the question "what is this directory about?" while browsing the source tree.

marekweb

comment created time in 22 days

push eventsourcegraph/sourcegraph

Marek

commit sha 32ff8159b5cd538617801425a40a02bf4d68e31d

Apply suggestions from code review Co-authored-by: Felix Becker <felix.b@outlook.com> Co-authored-by: Loïc Guychard <loic@sourcegraph.com>

view details

push time in 22 days

PR opened sourcegraph/sourcegraph

Reviewers
docs: Add code host integrations

I added a first draft of a guide for developing code host integrations.

Intended audience: developers who are working on code host integrations.

I'm using "code host integrations" as an umbrella term for:

  • native integrations for code hosts
  • browser extensions

This is a first step towards clarifying some of the vocabulary around code host integrations, namely the fact that in some places in our docs we say "browser extensions" when we actually mean "browser extensions and native integrations", hence why I propose to use the phrase "code host integrations" as an intentional umbrella term.

+44 -0

0 comment

3 changed files

pr created time in 23 days

push eventsourcegraph/sourcegraph

Marek

commit sha b19000daa70175bbd899a46b7605e83e8aa129df

Clarify link to integrations u sage

view details

push time in 23 days

pull request commentsourcegraph/sourcegraph

Fix file header text wrapping on long paths on Bitbucket

Closing in favor of #12182 which has been merged

marekweb

comment created time in 23 days

pull request commentsourcegraph/sourcegraph

Fix Bitbucket file path wrapping while maintaining wrapping of action items

Did some tests and it seems to be working well and it solves the problems. Thanks @felix for spending time on this.

Interesting use of display: contents which I wasn't aware of.

felixfbecker

comment created time in 23 days

pull request commentsourcegraph/sourcegraph

Fix file header text wrapping on long paths on Bitbucket

I tested in a variety of configurations and I found that there are still wrapping issues. Screenshots are below.

As an additional change I disabled overflow: hidden on action buttons. That style isn't a problem in itself, but it was causing a mis-alignment of the action buttons relative to the native buttons (although that only happened when injecting action buttons, not when it's a single Sourcegraph button).

In narrow configurations I'm still not entirely happy with how the toolbar is wrapping, (it's breaking when combining ultra-narrow width with multiple large action buttons) and I'm also not entirely confident that removing overflow: hidden is the right solution. So far I haven't found an alternative that works and that combines proper wrapper of the long file breadcrumbs with proper wrapping of a larger number of action buttons.

Screen Shot 2020-07-14 at 11 51 23 Screen Shot 2020-07-14 at 14 07 08 Screen Shot 2020-07-14 at 11 53 10 Screen Shot 2020-07-14 at 11 53 33

marekweb

comment created time in 24 days

push eventsourcegraph/sourcegraph

Marek

commit sha 6340a3f69b7be13a125252c87ead91305d3f0e02

Override overflow to fix alignment issue

view details

push time in 24 days

push eventsourcegraph/sourcegraph

Marek

commit sha daecb954a3cb6a358eed062b8a4d5e45b3fdaf73

Add integration tests (#12134)

view details

push time in 25 days

delete branch sourcegraph/sourcegraph

delete branch : mz/integration-tests

delete time in 25 days

PR merged sourcegraph/sourcegraph

Add integration tests

Add integration test for a repository index page.

  • load a repository page on Sourcegraph
  • assert that it loads and shows directory listing
  • navigate to a file, assert that it works
  • navigate back to repository using breadcrumbs
  • navigate to a commit, assert that it works

Add a short test for user profile

  • load user profile
  • change display name and click save
  • assert that updateUser request is triggered
+446 -0

4 comments

2 changed files

marekweb

pr closed time in 25 days

Pull request review commentsourcegraph/sourcegraph

Add integration tests

+import assert from 'assert'+import { createDriverForTest, Driver } from '../../../shared/src/testing/driver'+import { commonWebGraphQlResults } from './graphQlResults'+import { createWebIntegrationTestContext, WebIntegrationTestContext } from './context'+import {+    makeRepositoryRedirectResult,+    makeResolveRevisionResult,+    makeFileExternalLinksResult,+    makeTreeEntriesResult,+    makeBlobContentResult,+} from './graphQlResponseHelpers'++describe('Repository', () => {+    let driver: Driver+    before(async () => {+        driver = await createDriverForTest()+    })+    after(() => driver?.close())+    let testContext: WebIntegrationTestContext+    beforeEach(async function () {+        testContext = await createWebIntegrationTestContext({+            driver,+            currentTest: this.currentTest!,+            directory: __dirname,+        })+    })+    afterEach(() => testContext?.dispose())++    async function assertSelectorHasText(selector: string, text: string) {+        assert.strictEqual(+            await driver.page.evaluate(+                selector => document.querySelector<HTMLButtonElement>(selector)?.textContent,+                selector+            ),+            text+        )+    }++    describe('index page', () => {+        it('loads when accessed with a repo url', async () => {+            const shortRepositoryName = 'sourcegraph/jsonrpc2'+            const repositoryName = `github.com/${shortRepositoryName}`+            const repositorySourcegraphUrl = `/${repositoryName}`+            const clickedFileName = 'async.go'+            const clickedCommit = ''+            const fileEntries = ['jsonrpc2.go', clickedFileName]++            testContext.overrideGraphQL({+                ...commonWebGraphQlResults,+                RepositoryRedirect: ({ repoName }) => makeRepositoryRedirectResult(repoName),+                ResolveRev: () => makeResolveRevisionResult(repositorySourcegraphUrl),+                FileExternalLinks: ({ filePath }) => makeFileExternalLinksResult(filePath),+                TreeEntries: () => makeTreeEntriesResult(repositorySourcegraphUrl, fileEntries),+                Blob: () => makeBlobContentResult('mock file blob'),+                TreeCommits: () => ({+                    node: {+                        __typename: 'Repository',+                        commit: {+                            ancestors: {+                                nodes: [+                                    {+                                        id:+                                            'R2l0Q29tbWl0OnsiciI6IlVtVndiM05wZEc5eWVUbzBNRGsxTXpnPSIsImMiOiIxNWMyMjkwZGNiMzc3MzFjYzRlZTVhMmExYzFlNWEyNWI0YzI4ZjgxIn0=',+                                        oid: '15c2290dcb37731cc4ee5a2a1c1e5a25b4c28f81',+                                        abbreviatedOID: '15c2290',+                                        message: 'update LSIF indexing CI workflow\n',+                                        subject: 'update LSIF indexing CI workflow',+                                        body: null,+                                        author: {+                                            person: {+                                                avatarURL: '',+                                                name: 'garo (they/them)',+                                                email: 'gbrik@users.noreply.github.com',+                                                displayName: 'garo (they/them)',+                                                user: null,+                                            },+                                            date: '2020-04-29T18:40:54Z',+                                        },+                                        committer: {+                                            person: {+                                                avatarURL: '',+                                                name: 'GitHub',+                                                email: 'noreply@github.com',+                                                displayName: 'GitHub',+                                                user: null,+                                            },+                                            date: '2020-04-29T18:40:54Z',+                                        },+                                        parents: [+                                            {+                                                oid: '96c4efab7ee28f3d1cf1d248a0139cea37368b18',+                                                abbreviatedOID: '96c4efa',+                                                url:+                                                    '/github.com/sourcegraph/jsonrpc2/-/commit/96c4efab7ee28f3d1cf1d248a0139cea37368b18',+                                            },+                                            {+                                                oid: '9e615b1c32cc519130575e8d10d0d0fee8a5eb6c',+                                                abbreviatedOID: '9e615b1',+                                                url:+                                                    '/github.com/sourcegraph/jsonrpc2/-/commit/9e615b1c32cc519130575e8d10d0d0fee8a5eb6c',+                                            },+                                        ],+                                        url:+                                            '/github.com/sourcegraph/jsonrpc2/-/commit/15c2290dcb37731cc4ee5a2a1c1e5a25b4c28f81',+                                        canonicalURL:+                                            '/github.com/sourcegraph/jsonrpc2/-/commit/15c2290dcb37731cc4ee5a2a1c1e5a25b4c28f81',+                                        externalURLs: [+                                            {+                                                url:+                                                    'https://github.com/sourcegraph/jsonrpc2/commit/15c2290dcb37731cc4ee5a2a1c1e5a25b4c28f81',+                                                serviceType: 'github',+                                            },+                                        ],+                                        tree: {+                                            canonicalURL:+                                                '/github.com/sourcegraph/jsonrpc2@15c2290dcb37731cc4ee5a2a1c1e5a25b4c28f81',+                                        },+                                    },+                                    {+                                        id:+                                            'R2l0Q29tbWl0OnsiciI6IlVtVndiM05wZEc5eWVUbzBNRGsxTXpnPSIsImMiOiI5ZTYxNWIxYzMyY2M1MTkxMzA1NzVlOGQxMGQwZDBmZWU4YTVlYjZjIn0=',+                                        oid: '9e615b1c32cc519130575e8d10d0d0fee8a5eb6c',+                                        abbreviatedOID: '9e615b1',+                                        message: 'LSIF Indexing Campaign',+                                        subject: 'LSIF Indexing Campaign',+                                        body: null,+                                        author: {+                                            person: {+                                                avatarURL: '',+                                                name: 'Sourcegraph Bot',+                                                email: 'campaigns@sourcegraph.com',+                                                displayName: 'Sourcegraph Bot',+                                                user: null,+                                            },+                                            date: '2020-04-29T16:57:20Z',+                                        },+                                        committer: {+                                            person: {+                                                avatarURL: '',+                                                name: 'Sourcegraph Bot',+                                                email: 'campaigns@sourcegraph.com',+                                                displayName: 'Sourcegraph Bot',+                                                user: null,+                                            },+                                            date: '2020-04-29T16:57:20Z',+                                        },+                                        parents: [+                                            {+                                                oid: '96c4efab7ee28f3d1cf1d248a0139cea37368b18',+                                                abbreviatedOID: '96c4efa',+                                                url:+                                                    '/github.com/sourcegraph/jsonrpc2/-/commit/96c4efab7ee28f3d1cf1d248a0139cea37368b18',+                                            },+                                        ],+                                        url:+                                            '/github.com/sourcegraph/jsonrpc2/-/commit/9e615b1c32cc519130575e8d10d0d0fee8a5eb6c',+                                        canonicalURL:+                                            '/github.com/sourcegraph/jsonrpc2/-/commit/9e615b1c32cc519130575e8d10d0d0fee8a5eb6c',+                                        externalURLs: [+                                            {+                                                url:+                                                    'https://github.com/sourcegraph/jsonrpc2/commit/9e615b1c32cc519130575e8d10d0d0fee8a5eb6c',+                                                serviceType: 'github',+                                            },+                                        ],+                                        tree: {+                                            canonicalURL:+                                                '/github.com/sourcegraph/jsonrpc2@9e615b1c32cc519130575e8d10d0d0fee8a5eb6c',+                                        },+                                    },+                                    {+                                        id:+                                            'R2l0Q29tbWl0OnsiciI6IlVtVndiM05wZEc5eWVUbzBNRGsxTXpnPSIsImMiOiI5NmM0ZWZhYjdlZTI4ZjNkMWNmMWQyNDhhMDEzOWNlYTM3MzY4YjE4In0=',+                                        oid: '96c4efab7ee28f3d1cf1d248a0139cea37368b18',+                                        abbreviatedOID: '96c4efa',+                                        message:+                                            'Produce LSIF data for each commit for fast/precise code nav (#35)\n\n* Produce LSIF data for each commit for fast/precise code nav\r\n\r\n* Update lsif.yml\r',+                                        subject: 'Produce LSIF data for each commit for fast/precise code nav (#35)',+                                        body:+                                            '* Produce LSIF data for each commit for fast/precise code nav\r\n\r\n* Update lsif.yml',+                                        author: {+                                            person: {+                                                avatarURL: 'https://avatars0.githubusercontent.com/u/1976?v=4',+                                                name: 'Quinn Slack',+                                                email: 'qslack@qslack.com',+                                                displayName: 'Quinn Slack',+                                                user: { id: 'VXNlcjo2', username: 'sqs', url: '/users/sqs' },+                                            },+                                            date: '2019-12-22T04:34:38Z',+                                        },+                                        committer: {+                                            person: {+                                                avatarURL: '',+                                                name: 'GitHub',+                                                email: 'noreply@github.com',+                                                displayName: 'GitHub',+                                                user: null,+                                            },+                                            date: '2019-12-22T04:34:38Z',+                                        },+                                        parents: [+                                            {+                                                oid: 'cee7209801bf50cee868f8e0696ba0b76ae21792',+                                                abbreviatedOID: 'cee7209',+                                                url:+                                                    '/github.com/sourcegraph/jsonrpc2/-/commit/cee7209801bf50cee868f8e0696ba0b76ae21792',+                                            },+                                        ],+                                        url:+                                            '/github.com/sourcegraph/jsonrpc2/-/commit/96c4efab7ee28f3d1cf1d248a0139cea37368b18',+                                        canonicalURL:+                                            '/github.com/sourcegraph/jsonrpc2/-/commit/96c4efab7ee28f3d1cf1d248a0139cea37368b18',+                                        externalURLs: [+                                            {+                                                url:+                                                    'https://github.com/sourcegraph/jsonrpc2/commit/96c4efab7ee28f3d1cf1d248a0139cea37368b18',+                                                serviceType: 'github',+                                            },+                                        ],+                                        tree: {+                                            canonicalURL:+                                                '/github.com/sourcegraph/jsonrpc2@96c4efab7ee28f3d1cf1d248a0139cea37368b18',+                                        },+                                    },+                                ],+                                pageInfo: { hasNextPage: true },+                            },+                        },+                    },+                }),+                RepositoryCommit: () => ({+                    node: {+                        commit: {+                            __typename: 'GitCommit',+                            id:+                                'R2l0Q29tbWl0OnsiciI6IlVtVndiM05wZEc5eWVUbzBNRGsxTXpnPSIsImMiOiIxNWMyMjkwZGNiMzc3MzFjYzRlZTVhMmExYzFlNWEyNWI0YzI4ZjgxIn0=',+                            oid: '15c2290dcb37731cc4ee5a2a1c1e5a25b4c28f81',+                            abbreviatedOID: '15c2290',+                            message: 'update LSIF indexing CI workflow\n',+                            subject: 'update LSIF indexing CI workflow',+                            body: null,+                            author: {+                                person: {+                                    avatarURL: '',+                                    name: 'garo (they/them)',+                                    email: 'gbrik@users.noreply.github.com',+                                    displayName: 'garo (they/them)',+                                    user: null,+                                },+                                date: '2020-04-29T18:40:54Z',+                            },+                            committer: {+                                person: {+                                    avatarURL: '',+                                    name: 'GitHub',+                                    email: 'noreply@github.com',+                                    displayName: 'GitHub',+                                    user: null,+                                },+                                date: '2020-04-29T18:40:54Z',+                            },+                            parents: [+                                {+                                    oid: '96c4efab7ee28f3d1cf1d248a0139cea37368b18',+                                    abbreviatedOID: '96c4efa',+                                    url:+                                        '/github.com/sourcegraph/jsonrpc2/-/commit/96c4efab7ee28f3d1cf1d248a0139cea37368b18',+                                },+                                {+                                    oid: '9e615b1c32cc519130575e8d10d0d0fee8a5eb6c',+                                    abbreviatedOID: '9e615b1',+                                    url:+                                        '/github.com/sourcegraph/jsonrpc2/-/commit/9e615b1c32cc519130575e8d10d0d0fee8a5eb6c',+                                },+                            ],+                            url: '/github.com/sourcegraph/jsonrpc2/-/commit/15c2290dcb37731cc4ee5a2a1c1e5a25b4c28f81',+                            canonicalURL:+                                '/github.com/sourcegraph/jsonrpc2/-/commit/15c2290dcb37731cc4ee5a2a1c1e5a25b4c28f81',+                            externalURLs: [+                                {+                                    url:+                                        'https://github.com/sourcegraph/jsonrpc2/commit/15c2290dcb37731cc4ee5a2a1c1e5a25b4c28f81',+                                    serviceType: 'github',+                                },+                            ],+                            tree: {+                                canonicalURL:+                                    '/github.com/sourcegraph/jsonrpc2@15c2290dcb37731cc4ee5a2a1c1e5a25b4c28f81',+                            },+                        },+                    },+                }),+                RepositoryComparisonDiff: () => ({+                    node: {+                        comparison: {+                            fileDiffs: {+                                nodes: [+                                    {+                                        __typename: 'FileDiff',+                                        oldPath: '.github/workflows/lsif.yml',+                                        oldFile: { __typename: 'GitBlob', binary: false, byteSize: 381 },+                                        newFile: { __typename: 'GitBlob', binary: false, byteSize: 304 },+                                        newPath: '.github/workflows/lsif.yml',+                                        mostRelevantFile: {+                                            __typename: 'GitBlob',+                                            url:+                                                '/github.com/sourcegraph/jsonrpc2@15c2290dcb37731cc4ee5a2a1c1e5a25b4c28f81/-/blob/.github/workflows/lsif.yml',+                                        },+                                        hunks: [+                                            {+                                                oldRange: { startLine: 2, lines: 15 },+                                                oldNoNewlineAt: false,+                                                newRange: { startLine: 2, lines: 12 },+                                                section: 'name: LSIF',+                                                highlight: {+                                                    aborted: false,+                                                    lines: [+                                                        {+                                                            kind: 'DELETED',+                                                            html:+                                                                '<div><span style="color:#657b83;">  </span><span style="color:#268bd2;">build</span><span style="color:#657b83;">:\n</span></div>',+                                                        },+                                                        {+                                                            kind: 'ADDED',+                                                            html:+                                                                '<div><span style="color:#657b83;">  </span><span style="color:#268bd2;">lsif-go</span><span style="color:#657b83;">:\n</span></div>',+                                                        },+                                                    ],+                                                },+                                            },+                                        ],+                                        stat: { added: 1, changed: 3, deleted: 4 },+                                        internalID: '084bcb27838a8adbbbe10f664420f2d2',+                                    },+                                ],+                                totalCount: 1,+                                pageInfo: { endCursor: null, hasNextPage: false },+                                diffStat: { added: 1, changed: 3, deleted: 4 },+                            },+                        },+                    },+                }),+            })++            await driver.page.goto(driver.sourcegraphBaseUrl + '/github.com/sourcegraph/jsonrpc2')+            await driver.page.waitForSelector('h2.tree-page__title')++            // Assert that the directory listing displays properly+            await driver.page.waitForSelector('.e2e-tree-entries')++            const numberOfFileEntries = await driver.page.evaluate(+                () => document.querySelectorAll<HTMLButtonElement>('.e2e-tree-entry-file')?.length+            )++            assert.strictEqual(numberOfFileEntries, fileEntries.length, 'Number of files in directory listing')++            await testContext.waitForGraphQLRequest(async () => {+                await driver.findElementWithText(clickedFileName, { selector: '.e2e-tree-entry-file', action: 'click' })+            }, 'Blob')++            await driver.page.waitForSelector('.e2e-repo-blob')+            await driver.assertWindowLocation(`/github.com/sourcegraph/jsonrpc2/-/blob/${clickedFileName}`)

Added the repo name variable here. There are other instance of the repo name in TreeCommit and RepositoryCommit but those responses are more complex so I'll leave them as-is for now

marekweb

comment created time in 25 days

Pull request review commentsourcegraph/sourcegraph

Add integration tests

+import { createDriverForTest, Driver } from '../../../shared/src/testing/driver'+import { commonWebGraphQlResults } from './graphQlResults'+import { createWebIntegrationTestContext, WebIntegrationTestContext } from './context'++describe('User profile page', () => {+    let driver: Driver+    before(async () => {+        driver = await createDriverForTest()+    })+    after(() => driver?.close())+    let testContext: WebIntegrationTestContext+    beforeEach(async function () {+        testContext = await createWebIntegrationTestContext({+            driver,+            currentTest: this.currentTest!,+            directory: __dirname,+        })+    })+    afterEach(() => testContext?.dispose())++    it('updates display name', async () => {+        testContext.overrideGraphQL({+            ...commonWebGraphQlResults,+            User: () => ({+                user: {+                    __typename: 'User',+                    id: 'VXNlcjoxODkyNw==',+                    username: 'test',+                    displayName: 'Test',+                    url: '/users/test',+                    settingsURL: '/users/test/settings',+                    avatarURL: '',+                    viewerCanAdminister: true,+                    siteAdmin: true,+                    builtinAuth: true,+                    createdAt: '2020-04-10T21:11:42Z',+                    emails: [{ email: 'test@example.com', verified: true }],+                    organizations: { nodes: [] },+                    permissionsInfo: null,+                },+            }),+            UserForProfilePage: () => ({+                node: {+                    id: 'VXNlcjoxODkyNw==',+                    username: 'test',+                    displayName: 'Test',+                    avatarURL: '',+                    viewerCanChangeUsername: true,+                },+            }),+            updateUser: () => ({ updateUser: { alwaysNil: null } }),+        })+        await driver.page.goto(driver.sourcegraphBaseUrl + '/users/test/settings/profile')+        await driver.page.waitForSelector('.user-settings-profile-page')+        await driver.replaceText({+            selector: '.e2e-user-settings-profile-page__display-name',+            newText: 'Test2',+            selectMethod: 'selectall',+        })++        await testContext.waitForGraphQLRequest(async () => {

Added an assertion

marekweb

comment created time in 25 days

push eventsourcegraph/sourcegraph

Marek

commit sha 11bd07472b1e28d6cef51df7734b0949d961b4af

Add assertion and use variable for repo name

view details

push time in 25 days

push eventsourcegraph/sourcegraph

Marek

commit sha 64f8bf3f740f86afae1b4473298a8cc232b6b6b2

Add user profile test

view details

push time in 25 days

push eventsourcegraph/sourcegraph

Keegan Carruthers-Smith

commit sha c6269100f1ca422ebc552d57800dce598aeafb2a

search: return branches to index to Zoekt (#12089) If we have version contexts enabled we will tell Zoekt to index the branches in the version context. There is a related Zoekt change to pass in the repository as well as understand the Branches field being set. Previously Zoekt was responsible for resolving HEAD. Now that we will do more than HEAD, it was easier to implement the resolving logic in Sourcegraph. This will both simplify the responsiblilities of zoekt-sourcegraph-indexserver as well as allow us to optimize patterns around resolving version context revisions. We additionally update Zoekt to tell us the repo as well as support indexing multiple branches.

view details

Robert Lin

commit sha c7b3a445962ec699571c1d4c747d16b24316e886

monitoring: improved notification timings, resolved templates (#12046)

view details

Simon

commit sha 5bff6676c09f6f37f434b55e0455686d4d6fab69

added gql response helpers for integration tests and started blob-viewer integration tests (#12135) * added gql response helpers for integration tests and started blob-viewer tests * removed "only" from test

view details

Marek

commit sha 772c8409f4d3bfb3f189513948b26b2e71f01604

Merge branch 'master' into mz/integration-tests

view details

Marek

commit sha 0442ab72a3dbc1e757cc0019336c45f125a57a4f

Use helpers for GraphQL mocks

view details

Marek

commit sha 69d96c390bace586c7688f077f1a77771b5ec864

Fix file entries

view details

push time in 25 days

push eventsourcegraph/sourcegraph

Marek

commit sha 39b70b4097b5722fafce33391379569aac13aee6

Add remaining GraphQL overrides

view details

push time in 25 days

push eventsourcegraph/sourcegraph

Marek

commit sha 202c0f3ded2c78cf5426088535eebd194ba7d930

Update repository test

view details

push time in 25 days

PR opened sourcegraph/sourcegraph

Add integration tests
+236 -0

0 comment

1 changed file

pr created time in 25 days

create barnchsourcegraph/sourcegraph

branch : mz/integration-tests

created branch time in 25 days

push eventsourcegraph/sourcegraph

Marek

commit sha 1df6979e21f733acc57cec32f00dd90e608ebd05

Use a reproducible version string

view details

Marek

commit sha e1547ea0e99475dd748a4e3bb1a81cee71c0f7fd

Remove version from log because it's not necessarily the same as manifest

view details

push time in a month

push eventsourcegraph/sourcegraph

Marek

commit sha 207d742e0b29eefdbfc197c34adbaa8821e6e231

Add ability to override browser extension version string

view details

push time in a month

PR opened sourcegraph/sourcegraph

Make firefox add-on build reproducible by fetching specific commit of code-intel-extensions

Switch from git clone to curl fetch of the code-intel-extensions repository as a zip, specifying a specific commit (currently hard-coded in the build script).

Reason: to make sure that builds of the Firefox add-on are reproducible, for the purpose of policy compliance.

This may be a temporary measure.

+32 -3

0 comment

1 changed file

pr created time in a month

create barnchsourcegraph/sourcegraph

branch : mz/firefox-reproducible-build

created branch time in a month

Pull request review commentsourcegraph/sourcegraph

Override GraphQL API for integration tests

+import { createDriverForTest } from '../../../shared/src/testing/driver'+import MockDate from 'mockdate'+import { getConfig } from '../../../shared/src/testing/config'+import assert from 'assert'+import { IQuery, IOrgConnection, IUserEmail, IOrg, IMutation } from '../../../shared/src/graphql/schema'+import { describeIntegration } from './helpers'+import { retry } from '../../../shared/src/testing/utils'+import { commonGraphQlResults, testUserID, settingsID } from './graphQlResults'++describeIntegration('Settings', ({ initGeneration, describe }) => {+    initGeneration(async () => {+        // Reset date mocking+        MockDate.reset()+        const { sourcegraphBaseUrl, headless, slowMo, testUserPassword } = getConfig(

I'm curious, is there a particular reasoning for why we treat these values differently?

  • testUserPassword from getConfig()
  • testUserID defined in `./graphQlResults
  • username test as a string
felixfbecker

comment created time in a month

PR opened sourcegraph/sourcegraph

Fix file header text wrapping on long paths on Bitbucket

Fix #11110

Summary of attempts to solve this issue:

  • Didn't find a way to keep using display flex while making the file path wrap
  • No clear solution to wrap both file path and toolbar buttons: because they're on the same line, the desired wrapping behavior isn't obvious
  • Simplest apparent solution: remove flex and use aui-buttons class which already exists and is used on Bitbucket toolbar buttons.

Limitations of this solution:

  • Toolbar buttons don't wrap if there's an excessive number of them. The file path (sharing space with the buttons) will wrap instead.
+2 -25

0 comment

2 changed files

pr created time in a month

create barnchsourcegraph/sourcegraph

branch : mz/fix-11110

created branch time in a month

issue commentsourcegraph/sourcegraph

Web 3.18 Tracking issue

Last week: I worked on getting Sourcegraph for Firefox finalized and approved for review. I followed up with AMO a few times to move the process along. They didn't finish the compliance review.

I worked on the small fixes for this cycle (affecting Bitbucket and Phabricator) and I got more familiar with how to set up and configure Phabricator.

This week I'm finishing the small fixes, I'm following up with AMO to make sure Sourcegraph for Firefox gets through and to address any issues that they may bring up, and I'm working with @felixfbecker and @twop on the integration tests.

For the integration tests I'll be targeting the browser extensions in particular.

lguychard

comment created time in a month

issue commentsourcegraph/sourcegraph

Web 3.18 Tracking issue

W26 update

  • Finished work on #11535 to fix issues #11369, #11371

W27 plan

  • Fix two bugs which have been flagged as high priority

    • #11110
    • #10595
  • Phabricator issue #11378

  • rest of week TBD

lguychard

comment created time in a month

push eventsourcegraph/sourcegraph

Marek

commit sha 0e8b3b6839efbb8964b112b4579335471d1a9198

Add to browser extension readme: manual build steps (#11753)

view details

push time in a month

delete branch sourcegraph/sourcegraph

delete branch : mz/browser-extension-build-steps

delete time in a month

PR merged sourcegraph/sourcegraph

Add to browser extension readme: manual build steps

Update the browser extension's readme with reproducible manual build steps.

This is to help comply with the policy at https://extensionworkshop.com/documentation/publish/source-code-submission/#source-code-checklist

See also related: #11370

+41 -1

1 comment

1 changed file

marekweb

pr closed time in a month

push eventsourcegraph/sourcegraph

Marek

commit sha 0bded56b36a49cd4c75eff3af9cef183e2fdee50

Fix formatting

view details

push time in a month

push eventsourcegraph/sourcegraph

Marek

commit sha 60e43f80c4e0889d0bf6d3eaf09ab3dd32b06dbc

Add to the list of outputs Co-authored-by: Loïc Guychard <loic@sourcegraph.com>

view details

push time in a month

push eventsourcegraph/sourcegraph

Marek

commit sha ba9bf3a707b9e803cca17a5711cfe54e3424748f

Add cd sourcegraph

view details

push time in a month

PR opened sourcegraph/sourcegraph

Add to browser extension readme: manual build steps

Update the browser extension's readme with reproducible manual build steps.

This is to help comply with the policy at https://extensionworkshop.com/documentation/publish/source-code-submission/#source-code-checklist

See also related: #11370

+36 -1

0 comment

1 changed file

pr created time in a month

create barnchsourcegraph/sourcegraph

branch : mz/browser-extension-build-steps

created branch time in a month

push eventsourcegraph/sourcegraph

Marek

commit sha 906e8ba1b8f3d5aa343372b1e838b77e96988deb

Inline code intel extensions in Firefox addon (#11535)

view details

push time in a month

delete branch sourcegraph/sourcegraph

delete branch : mz/firefox-inline-extensions

delete time in a month

PR merged sourcegraph/sourcegraph

Inline code intel extensions in Firefox addon

For now, this uses sourcegraph/template to apply code-intel to all supported languages.

Changes to the build script include:

  • Remove blob from the Content Security Policy on Firefox (make it use the default CSP)
  • Clone and build code-intel-extensions and copy it into the add-on build

Changes at run-time:

  • When running in the Firefox addon, use a hardcoded list of extensions to load (current only sourcegraph/template)
  • Load the extension locally (by fetching the manifest file `

Not included in this PR:

  • generate individual extensions from code-intel-extensions for each supported languagge
  • use settings to determine which extensions to enable/disable

Fix #11369 Fix #11371

+176 -19

3 comments

12 changed files

marekweb

pr closed time in a month

issue closedsourcegraph/sourcegraph

Remove script-src blob: from the CSP of our Firefox extension

Prerequisite: #11369.

script-src blob: breaches the following Mozilla add-on policy:

Add-ons must be self-contained and not load remote code for execution

CSP directives for the browser extension are set in manifest.spec.json. We could stop specifying them there, and add them at build time in writeManifest() instead.

closed time in a month

lguychard

issue closedsourcegraph/sourcegraph

Inline code intel extensions in the Firefox extension

For context, see RFC 173. Outline of steps needed to achieve this:

  • [ ] Include built code-intel-extensions in Firefox extension assets
    • We need the extension's "manifest" (package.json), and the built JS bundle
    • We may actually get away with only packaging three extensions: the Go and TypeScript extensions, and a generic extension for all other languages. This is the template extension, from which individual (Cpp, Lua, Python, ...) extensions are generated at build time and individually published to the extensions registry.
  • [ ] Make sure we only try to activate extensions that are inlined in browser extension assets.
    • One way to do this would be to specify an optional extensions service implementation on PlatformContext, which would be used when instantiating services if present. Querying active extensions from settings, sideloading extensions, fetching extensions from the registry will not make sense in the Firefox extension.
  • [ ] Load extensions from inlined assets
    • I think if there are only a handful of extensions, we could simply require/import the manifests, and thus include them in our main JS bundles by default. This could be done in the alternative ExtensionsService implementation mentioned above.
    • To load the extension bundles, I think we should pass URLs to the bundles created using runtime.getURL(), which, given a relative path to a file packaged within the extension, returns a fully qualified path (eg. extensions/go/bundle.js -> moz-extension://SOME_GUID/extensions/go/bundle.js). These paths will have to be created outside of the worker scope (as browser APIs are not available in the worker). The correct place for this would be the implementation of PlatformContext.getScriptURLForExtension(). These fully-qualified URLs can then be seamlessly used in importScripts() calls in the extension host worker.

closed time in a month

lguychard

Pull request review commentsourcegraph/sourcegraph

Inline code intel extensions in Firefox addon

 export class ClientExtensions {      * @param extensions An observable that emits the set of extensions that should be activated      * upon subscription and whenever it changes.      */-    constructor(private proxy: Remote<ExtExtensionsAPI>, extensionRegistry: ExtensionsService) {+    constructor(private proxy: Remote<ExtExtensionsAPI>, extensionRegistry: IExtensionsService) {         this.subscriptions.add(             from(extensionRegistry.activeExtensions)                 .pipe(startWith([] as ExecutableExtension[]), bufferCount(2, 1))                 .subscribe(([oldExtensions, newExtensions]) => {                     // Diff next state's activated extensions vs. current state's.+                    if (!newExtensions) {+                        newExtensions = oldExtensions+                    }

I implemented option 3

marekweb

comment created time in a month

push eventsourcegraph/sourcegraph

Marek

commit sha 1865c0c9049fab7529e08f15ff63cd21620f1c1d

Remove import

view details

push time in a month

Pull request review commentsourcegraph/sourcegraph

Inline code intel extensions in Firefox addon

-import ExtensionHostWorker from 'worker-loader?inline&name=extensionHostWorker.bundle.js!./main.worker.ts'+import ExtensionHostWorker from 'worker-loader?name=extensionHostWorker.bundle.js&publicPath=js/!./main.worker.ts'

Looks like a good solution, thanks.

marekweb

comment created time in a month

push eventsourcegraph/sourcegraph

Marek

commit sha b3d12109da39ec482c308db1dbefb4613f9c307d

Apply suggestions from code review Co-authored-by: Loïc Guychard <loic@sourcegraph.com>

view details

push time in a month

Pull request review commentsourcegraph/sourcegraph

Inline code intel extensions in Firefox addon

-import ExtensionHostWorker from 'worker-loader?inline&name=extensionHostWorker.bundle.js!./main.worker.ts'+import ExtensionHostWorker from 'worker-loader?name=extensionHostWorker.bundle.js&publicPath=js/!./main.worker.ts'

True, this needs to be checked

marekweb

comment created time in a month

push eventsourcegraph/sourcegraph

Marek

commit sha c7c8e97c00e323bb9fd9359934fae7ffc06e2bae

Disable eslint id-length for native os module

view details

push time in a month

push eventsourcegraph/sourcegraph

Marek

commit sha 4c54a493633c166b46da42934bcaff98c21c31d1

Remove worker from web_accessible_resources

view details

Marek

commit sha 648adb5873d16f9123e871e633c7e75004d83fd7

Move inline extension logic in to browser

view details

push time in a month

push eventsourcegraph/sourcegraph

Rijnard van Tonder

commit sha 653e0cf94fb5a3075342ed1e619ff0f853073327

search: improve literal parentheses interpretation (#11524)

view details

Rijnard van Tonder

commit sha 8bf33937478f591c0b7594fb47a936d53dba6de3

search: enable and/or queries by default (#11521)

view details

Rijnard van Tonder

commit sha 5a8a36f22fadff019e637967fd916ad405eb9498

changelog: structural search quoting (#11531) * changelog: structural search quoting * reword and note

view details

uwedeportivo

commit sha ebc41dfa342e23fd22c7febdb2c2c00395ea60a7

release 3.17 line (#11534)

view details

Adam Harvey

commit sha 53c3f3c24ca4d03696fe1bb0f1ae6286a00a93ce

dev: fix Grafana startup on Linux (#11533) * dev: fix Grafana startup on Linux The changes in #11483 made it difficult to start Grafana within a Linux development environment, and #11486 obscured the error in the goreman output. This restores the previous behaviour around the UID the container will run as, and ensures that logs will be dumped if the container exits unexpectedly. * Always overwrite grafana.log

view details

Robert Lin

commit sha bd124a32bc3d79989b4f00860d2012fde09f9a7e

chore: all-in-one third party licenses file (#11321)

view details

Robert Lin

commit sha 254e676c7fc8715285c0f360222494dc0e6d0c8c

dev: mirror grafana script in prometheus script (#11540)

view details

uwedeportivo

commit sha b141f7877309dcaa8799f9b927b9cdaed0f0b234

e2e fixes to get 3.17 rc build going (#11545) * got http client complains about leading slash * visible but puppeteer cannot find it

view details

Quinn Slack

commit sha d2fe477d7087d5fce08ead10d9328b4af19593c5

update "Loading config from files" docs (#11548) - Remove mention of critical config (since removed) - Give an example for generit Git code hosts - Slightly clean up wording of other examples

view details

Stephen Gutekanst

commit sha cad0dd70d57d43f15b3097f1acfec8e370409147

search: prevent issuing more than 200+ unindexed searches for a single query (#11546) * search: prevent issuing more than 200+ unindexed searches for a single query Co-authored-by: Rijnard van Tonder <rvantonder@gmail.com>

view details

Quinn Slack

commit sha 77bfa138cc78bd1296fcfc589ee8a86e144a2087

remove remnants of critical config (#11549) The management console (and critical config) was removed in https://github.com/sourcegraph/sourcegraph/pull/7197. Critical config is no longer a concept; it has been merged into site config. This commit updates code and docs to remove remnants of critical config. @slimsag stated on 2020-02-05 that we should wait until Sourcegraph 3.15 to remove this (https://github.com/sourcegraph/sourcegraph/pull/8284#issuecomment-582381406). It is past that time already. The migration guides referring to critical config remain, of course, so admins of older instances can still find those instructions.

view details

Quinn Slack

commit sha 135f137cf11601214d506f82b50bcbe058cb8302

remove deleted (and now broken) symlink (#11550)

view details

Quinn Slack

commit sha ed5a2ab8df7c555be3514bb84ce8de97dbe4b6c6

fix key for Git code host in config file (#11553)

view details

Loïc Guychard

commit sha a0fa41b7a740934a38484302c32d91626d660af6

E2e tests: verify that hover contents are visible (#11557) https://github.com/sourcegraph/sourcegraph/pull/11545/commits/7d986349a29e6423094a4db0208b8671afb0ec8d removed the `{ visible: true }` check for hover contents, but it's impotant to keep. It was broken by making `.e2e-tooltip-content` `display: contents`: the element doesn' have a visible bounding rect anymore, so Puppeteer never finds the selector with `{ visible: true }`. Fixed by looking for any visible child of `.e2e-tooltip-content`. Also removed the `expectedCount` logic from `getHoverContents()`, as it was never used.

view details

Adam Harvey

commit sha 31db4679e256a3eafed13ea0bd2dd9cd33a323a2

git: refactor diff out of the GraphQL resolver (#11520)

view details

Dax McDonald

commit sha 7ef595a987e3a11c9bc8d037486de42932d28d59

Fix docker build on Mac (#11536) Fixes the docker build on Mac. Now we correctly set the GOOS for running go generate when on Mac

view details

Rijnard van Tonder

commit sha db8d1094f6fd98bb848779d2636b670129001aca

search: search integration tester README and improvements (#11562)

view details

Rijnard van Tonder

commit sha e9121019fb885bf0a52fe5ad1129eea02b5a22c9

search: defensive nil-check for and-results (#11563)

view details

davejrt

commit sha 1147e3c97e0775662c1372b1bc8a12cf7ba19438

adding in steps to verify max_map_count (#11544) * adding in steps to verify max_map_count * note about checking for RAM/OOMkilled errors * fixing typo and adding in clearer instructions

view details

Stephen Gutekanst

commit sha ce911b064580da3b1a86972965445dd2e21e7ccc

server/dev: update zoekt version (#11566) Required for improved metrics; will cherry-pick onto 3.16 and 3.17.

view details

push time in a month

push eventsourcegraph/sourcegraph

Marek

commit sha 96f568fdb09ad56cb6c755eec181a5c2ffdd46ac

Overwrite the content security policy in firefox

view details

Marek

commit sha 13d9111cb9d0052100aa33fa832bea8961a98c47

Make doc comment clearer

view details

Marek

commit sha 18a6f4fbe29df1256e9af41f40081cf00a392e2d

Rename and export isFirefox

view details

Marek

commit sha e8e19d3e7813d234d521229f03c7403f0383979a

Change instantiation of extensions service

view details

Marek

commit sha 85fe6a38b544f01e7f3646eb3eae68716cc3f769

Fix the build script

view details

Marek

commit sha df758648212fbb77116c885fbb2dbb48b182a4ad

Improve build

view details

Marek

commit sha 760c8a1f0040a7cc0f726b48ade45a2e4415c1ed

Update getInlineExtensions

view details

push time in a month

issue commentsourcegraph/sourcegraph

Bitbucket Server native integration prevents file header text from wrapping

Looks like the issue might be with display: flex from this CSS: https://sourcegraph.com/github.com/sourcegraph/sourcegraph@mz/firefox-inline-extensions/-/blob/browser/src/shared/code-hosts/bitbucket/style.scss?utm_source=VSCode-1.1.0#L47:9

dadlerj

comment created time in 2 months

push eventsourcegraph/sourcegraph

Marek

commit sha 22d6652c5aaa2fa1431733647031be4b4a940064

Add build-inline-extensions build script

view details

Marek

commit sha f1dced9f8f8962c171656e972e44ea35709d7db1

Load inline extensions

view details

push time in 2 months

push eventsourcegraph/sourcegraph

Marek

commit sha 54e969bfe4fa6aa62d890ae278d2b0c6cd37cd62

Use temp directory for clone

view details

push time in 2 months

create barnchsourcegraph/sourcegraph

branch : mz/firefox-inline-extensions

created branch time in 2 months

push eventsourcegraph/sourcegraph

Marek

commit sha 5c9bfc7ff43b668449ab65ce688894ad39242622

Refactor FileInfo in browser extension (#10779)

view details

push time in 2 months

delete branch sourcegraph/sourcegraph

delete branch : mz/refactor-fileinfo

delete time in 2 months

PR merged sourcegraph/sourcegraph

Refactor FileInfo in browser extension browser-extension team/web

Refactor FileInfo to have base and head properties to replace the need for base* prefixed properties and also eliminate the need for headHasFileContents and baseHasFileContents.

  • [x] Create new type definitions: FileInfo, FileDiff, DiffOrFileInfo
  • [x] Update operations on FileInfo (resolve repo names, fetch file content)
  • [x] Update handler for added code views
    • [x] initialize model and viewer from DiffOrFileInfo
    • [x] apply decorations
    • [x] apply code intelligence / implement resolveContext
  • [x] Update CodeViewToolbar to use DiffOrFileInfo
  • [x] Update code host resolvers
    • [x] GitHub
    • [x] Gitlab
    • [x] Bitbucket
    • [x] Phabricator
  • [x] Testing
    • [x] Tests pass on all code hosts
    • [x] Manual on all code hosts
  • [x] Add doc strings to new functions
  • [x] Revisit naming: for the new types, properties, functions
    • going to keep blob for now and rename it in a new PR

Fixes #3107

+560 -458

11 comments

19 changed files

marekweb

pr closed time in 2 months

more