[vscode-go] tools/generate.go: read package.json once

12 views
Skip to first unread message

Hyang-Ah Hana Kim (Gerrit)

unread,
May 17, 2022, 10:05:50 PM5/17/22
to goph...@pubsubhelper.golang.org, Hyang-Ah Hana Kim, golang-co...@googlegroups.com

Hyang-Ah Hana Kim has uploaded this change for review.

View Change

tools/generate.go: read package.json once

One of the tests tools/generate.go run (in CI) is to check if
tools/goplssetting.Generate produces the content that is identical
with the current package.json. Before this CL, goplssetting.
Generate function called `jq` and let it read the given
package.json file directly from disk as the source data.
Then, tools/generate.go compared whether goplssetting.Generate
produced the same content as what it read when tools/generate.go
started.

This turned out to be problematic, because the VSCode integration
test we ran just before this tools/generate.go test may touch the
package.json file after the integration test finishes (i.e. the
VS Code instance started for testing tears down asynchronously).
This file update raced with tools/generate.go's run and resulted
in bogus gopls setting consistency test failures.

This CL changes tools/goplssetting.Generate to take the input
data as []byte, compute the new data based on the input data,
and later test the output against the input data. That way, we
avoid reading the file twice.

While we are here, fix a minor issue that caused to insert an
additional new line at the end of goToolsInformation.ts and
fail the lint test.

Fixes golang/vscode-go#2230

Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
---
M build/all.bash
M tools/generate.go
M tools/goplssetting/goplssetting.go
M tools/goplssetting/goplssetting_test.go
4 files changed, 69 insertions(+), 31 deletions(-)

diff --git a/build/all.bash b/build/all.bash
index 6fd0c3c..f599847 100755
--- a/build/all.bash
+++ b/build/all.bash
@@ -42,24 +42,27 @@
}

run_test() {
- echo "**** Run test ****"
df -h | grep shm
+
+ echo "**** Test build ****"
npm ci
npm run typecheck
npm run compile
- npm run unit-test
- npm test --silent
- npm run lint
-
- # BUG(github.com/golang/vscode-go/issues/2230): Disable test temporarily.
- # echo "**** Run settings generator ****"
- # go run tools/generate.go -w=false -gopls=true

echo "**** Check if vsce works ****"
vsce package

+ echo "**** Run test ****"
+ npm run unit-test
+ npm test --silent
+ npm run lint
+
echo "**** Run Go tests ****"
go test ./...
+
+ echo "**** Run settings generator ****"
+ go run tools/generate.go -w=false -gopls=true
+
# TODO(hyangah): see if go clean -modcache makes kokoro builder happy
go clean -modcache
}
diff --git a/tools/generate.go b/tools/generate.go
index d806abe..d636c8b 100644
--- a/tools/generate.go
+++ b/tools/generate.go
@@ -77,7 +77,7 @@
}

type Property struct {
- name string `json:"name,omitempty"` // Set by us.
+ name string // Set by us.

// Below are defined in package.json
Properties map[string]*Property `json:"properties,omitempty"`
@@ -132,7 +132,7 @@
}

if *updateGoplsSettingsFlag {
- newData, err := updateGoplsSettings(data, packageJSONFile, *debugFlag)
+ newData, err := newGoplsSettings(data, *debugFlag)
if err != nil {
log.Fatal(err)
}
@@ -154,22 +154,22 @@
if len(split) == 1 {
log.Fatalf("expected to find %q in %s, not found", gen, filename)
}
- var s []byte
+ var newContent []byte
if strings.HasSuffix(filename, ".ts") {
- s = bytes.Join([][]byte{
+ newContent = bytes.Join([][]byte{
split[0],
gen,
[]byte("\n\n"),
toAdd,
}, []byte{})
} else {
- s = bytes.Join([][]byte{
+ s := bytes.Join([][]byte{
bytes.TrimSpace(split[0]),
gen,
toAdd,
}, []byte("\n\n"))
+ newContent = append(s, '\n')
}
- newContent := append(s, '\n')
checkAndWrite(filename, oldContent, newContent)
}

@@ -264,6 +264,7 @@
if err != nil {
log.Fatal(err)
}
+ bytes.TrimSpace(data)

// TODO(suzmue): change input to json and avoid magic string printing.
toolsString := fmt.Sprintf(string(data), goplsVersion.Version, goplsVersion.Time[:len("YYYY-MM-DD")], goplsVersionPre.Version, goplsVersionPre.Time[:len("YYYY-MM-DD")])
@@ -547,8 +548,8 @@
return b.String()
}

-func updateGoplsSettings(oldData []byte, packageJSONFile string, debug bool) (newData []byte, _ error) {
- newData, err := goplssetting.Generate(packageJSONFile, debug)
+func newGoplsSettings(oldData []byte, debug bool) (newData []byte, _ error) {
+ newData, err := goplssetting.Generate(oldData, debug)
if err != nil { // failed to compute up-to-date gopls settings.
return nil, err
}
@@ -561,10 +562,6 @@
fmt.Println(`gopls settings section in package.json needs update. To update the settings, run "go run tools/generate.go -w -gopls".`)
os.Exit(1) // causes CI to break.
}
-
- if err := ioutil.WriteFile(packageJSONFile, newData, 0644); err != nil {
- return nil, err
- }
return newData, nil
}

diff --git a/tools/goplssetting/goplssetting.go b/tools/goplssetting/goplssetting.go
index ef568ce..07cfa84 100644
--- a/tools/goplssetting/goplssetting.go
+++ b/tools/goplssetting/goplssetting.go
@@ -20,11 +20,7 @@
// Generate reads package.json and updates the gopls settings section
// based on `gopls api-json` output. This function requires `jq` to
// manipulate package.json.
-func Generate(inputFile string, skipCleanup bool) ([]byte, error) {
- if _, err := os.Stat(inputFile); err != nil {
- return nil, err
- }
-
+func Generate(oldData []byte, skipCleanup bool) ([]byte, error) {
if _, err := exec.LookPath("jq"); err != nil {
return nil, fmt.Errorf("missing `jq`: %w", err)
}
@@ -62,7 +58,7 @@
return nil, err
}

- return rewritePackageJSON(f.Name(), inputFile)
+ return rewritePackageJSON(f.Name(), oldData)
}

// readGoplsAPI returns the output of `gopls api-json`.
@@ -154,13 +150,14 @@
}
}

-// rewritePackageJSON rewrites the input package.json by running `jq`
+// rewritePackageJSON rewrites the input JSON object (package.json) by running `jq`
// to update all existing gopls settings with the ones from the newSettings
// file.
-func rewritePackageJSON(newSettings, inFile string) ([]byte, error) {
+func rewritePackageJSON(newSettings string, oldData []byte) ([]byte, error) {
prog := `.contributes.configuration.properties+=$GOPLS_SETTINGS[0]`
- cmd := exec.Command("jq", "--slurpfile", "GOPLS_SETTINGS", newSettings, prog, inFile)
+ cmd := exec.Command("jq", "--slurpfile", "GOPLS_SETTINGS", newSettings, prog)
var stdout, stderr bytes.Buffer
+ cmd.Stdin = bytes.NewBuffer(oldData) // feed old data!
cmd.Stdout = &stdout
cmd.Stderr = &stderr
if err := cmd.Run(); err != nil {
diff --git a/tools/goplssetting/goplssetting_test.go b/tools/goplssetting/goplssetting_test.go
index 4a91241..7367923 100644
--- a/tools/goplssetting/goplssetting_test.go
+++ b/tools/goplssetting/goplssetting_test.go
@@ -6,6 +6,7 @@

import (
"bytes"
+ "io/ioutil"
"os/exec"
"path/filepath"
"strings"
@@ -19,8 +20,12 @@
if _, err := exec.LookPath("jq"); err != nil {
t.Skipf("jq is not found (%v), skipping...", err)
}
- testfile := filepath.Join("..", "..", "package.json")
- got, err := Generate(testfile, false)
+ testFile := filepath.Join("..", "..", "package.json")
+ oldData, err := ioutil.ReadFile(testFile)
+ if err != nil {
+ t.Fatalf("read package.json failed: %v", err)
+ }
+ got, err := Generate(oldData, false)
if err != nil {
t.Fatalf("run failed: %v", err)
}

To view, visit change 405905. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: vscode-go
Gerrit-Branch: master
Gerrit-Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
Gerrit-Change-Number: 405905
Gerrit-PatchSet: 1
Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
Gerrit-MessageType: newchange

Hyang-Ah Hana Kim (Gerrit)

unread,
May 17, 2022, 10:10:07 PM5/17/22
to Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Hyang-Ah Hana Kim uploaded patch set #2 to this change.

View Change

tools/generate.go: read package.json once

One of the tests tools/generate.go runs (in CI) is to check if

tools/goplssetting.Generate produces the content that is identical
with the current package.json. Before this CL, goplssetting.
Generate function called `jq` and let it read the given
package.json file directly from disk as the source data.
Then, tools/generate.go compared whether goplssetting.Generate
produced the same content as what it read when tools/generate.go
started.

This is problematic, because the VSCode integration
test we run just before this tools/generate.go test may touch the
package.json file while this tools/generate.go runs. (i.e. as
part of the asynchronous cleanup (!) of the VS Code process
started for testing).

This race resulted in bogus gopls setting consistency test

failures.

This CL changes tools/goplssetting.Generate to take the input
data as []byte, compute the new data based on the input data,
and later test the output against the input data. That way, we
avoid reading the file twice.

While we are here, fix a minor issue that caused to insert an
additional new line at the end of goToolsInformation.ts and
fail the lint test.

Fixes golang/vscode-go#2230

Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
---
M build/all.bash
M tools/generate.go
M tools/goplssetting/goplssetting.go
M tools/goplssetting/goplssetting_test.go
4 files changed, 71 insertions(+), 31 deletions(-)

To view, visit change 405905. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: vscode-go
Gerrit-Branch: master
Gerrit-Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
Gerrit-Change-Number: 405905
Gerrit-PatchSet: 2
Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
Gerrit-MessageType: newpatchset

kokoro (Gerrit)

unread,
May 17, 2022, 10:33:51 PM5/17/22
to Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, Jamal Carvalho, Suzy Mueller, golang-co...@googlegroups.com

Attention is currently required from: Hyang-Ah Hana Kim, Jamal Carvalho, Suzy Mueller.

Kokoro presubmit build finished with status: NOT_BUILT
Logs at: https://source.cloud.google.com/results/invocations/814ae0ae-7842-4e1b-9564-e27eab0f3a6b

Patch set 2:TryBot-Result -1

View Change

    To view, visit change 405905. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: vscode-go
    Gerrit-Branch: master
    Gerrit-Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
    Gerrit-Change-Number: 405905
    Gerrit-PatchSet: 2
    Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
    Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
    Gerrit-Reviewer: Jamal Carvalho <ja...@golang.org>
    Gerrit-Reviewer: Suzy Mueller <suz...@golang.org>
    Gerrit-Reviewer: kokoro <noreply...@google.com>
    Gerrit-Attention: Suzy Mueller <suz...@golang.org>
    Gerrit-Attention: Jamal Carvalho <ja...@golang.org>
    Gerrit-Attention: Hyang-Ah Hana Kim <hya...@gmail.com>
    Gerrit-Comment-Date: Wed, 18 May 2022 02:33:46 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    Gerrit-MessageType: comment

    Hyang-Ah Hana Kim (Gerrit)

    unread,
    May 17, 2022, 11:49:11 PM5/17/22
    to Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

    Attention is currently required from: Hyang-Ah Hana Kim, Jamal Carvalho, Suzy Mueller.

    Hyang-Ah Hana Kim uploaded patch set #3 to this change.

    View Change

    The following approvals got outdated and were removed: Run-TryBot+1 by Hyang-Ah Hana Kim, TryBot-Result-1 by kokoro

    4 files changed, 75 insertions(+), 32 deletions(-)

    To view, visit change 405905. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: vscode-go
    Gerrit-Branch: master
    Gerrit-Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
    Gerrit-Change-Number: 405905
    Gerrit-PatchSet: 3
    Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
    Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
    Gerrit-Reviewer: Jamal Carvalho <ja...@golang.org>
    Gerrit-Reviewer: Suzy Mueller <suz...@golang.org>
    Gerrit-Reviewer: kokoro <noreply...@google.com>
    Gerrit-Attention: Suzy Mueller <suz...@golang.org>
    Gerrit-Attention: Jamal Carvalho <ja...@golang.org>
    Gerrit-Attention: Hyang-Ah Hana Kim <hya...@gmail.com>
    Gerrit-MessageType: newpatchset

    Hyang-Ah Hana Kim (Gerrit)

    unread,
    May 17, 2022, 11:49:33 PM5/17/22
    to Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, kokoro, Jamal Carvalho, Suzy Mueller, golang-co...@googlegroups.com

    Attention is currently required from: Jamal Carvalho, Suzy Mueller.

    Patch set 3:Run-TryBot +1

    View Change

      To view, visit change 405905. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: vscode-go
      Gerrit-Branch: master
      Gerrit-Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
      Gerrit-Change-Number: 405905
      Gerrit-PatchSet: 3
      Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
      Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
      Gerrit-Reviewer: Jamal Carvalho <ja...@golang.org>
      Gerrit-Reviewer: Suzy Mueller <suz...@golang.org>
      Gerrit-Reviewer: kokoro <noreply...@google.com>
      Gerrit-Attention: Suzy Mueller <suz...@golang.org>
      Gerrit-Attention: Jamal Carvalho <ja...@golang.org>
      Gerrit-Comment-Date: Wed, 18 May 2022 03:49:29 +0000

      kokoro (Gerrit)

      unread,
      May 18, 2022, 12:09:00 AM5/18/22
      to Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, Jamal Carvalho, Suzy Mueller, golang-co...@googlegroups.com

      Attention is currently required from: Hyang-Ah Hana Kim, Jamal Carvalho, Suzy Mueller.

      Kokoro presubmit build finished with status: NOT_BUILT
      Logs at: https://source.cloud.google.com/results/invocations/f84cc912-1164-4bd3-81e4-be0b53fbc21b

      Patch set 3:TryBot-Result -1

      View Change

        To view, visit change 405905. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: vscode-go
        Gerrit-Branch: master
        Gerrit-Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
        Gerrit-Change-Number: 405905
        Gerrit-PatchSet: 3
        Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
        Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
        Gerrit-Reviewer: Jamal Carvalho <ja...@golang.org>
        Gerrit-Reviewer: Suzy Mueller <suz...@golang.org>
        Gerrit-Reviewer: kokoro <noreply...@google.com>
        Gerrit-Attention: Suzy Mueller <suz...@golang.org>
        Gerrit-Attention: Jamal Carvalho <ja...@golang.org>
        Gerrit-Attention: Hyang-Ah Hana Kim <hya...@gmail.com>
        Gerrit-Comment-Date: Wed, 18 May 2022 04:08:56 +0000

        Hyang-Ah Hana Kim (Gerrit)

        unread,
        May 18, 2022, 9:08:01 AM5/18/22
        to Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

        Attention is currently required from: Hyang-Ah Hana Kim, Jamal Carvalho, Suzy Mueller.

        Hyang-Ah Hana Kim uploaded patch set #4 to this change.

        View Change

        The following approvals got outdated and were removed: Run-TryBot+1 by Hyang-Ah Hana Kim, TryBot-Result-1 by kokoro

        build/all.bash: rearrange test order

        VSCode modifies package.json while running in the
        integration test. It reverts back the package.json
        to original, but the revert file write can occur
        asynchronously. That affects our document generator
        tests following the integration test.

        Change the test order so we run the document generator
        test before.

        Usually, integration test takes long. So, running
        this quick documentation consistency test first and
        reporting the proble early is better.


        Fixes golang/vscode-go#2230

        Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
        ---
        M build/all.bash
        1 file changed, 34 insertions(+), 7 deletions(-)

        To view, visit change 405905. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: vscode-go
        Gerrit-Branch: master
        Gerrit-Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
        Gerrit-Change-Number: 405905
        Gerrit-PatchSet: 4
        Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
        Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
        Gerrit-Reviewer: Jamal Carvalho <ja...@golang.org>
        Gerrit-Reviewer: Suzy Mueller <suz...@golang.org>
        Gerrit-Reviewer: kokoro <noreply...@google.com>
        Gerrit-Attention: Suzy Mueller <suz...@golang.org>
        Gerrit-Attention: Jamal Carvalho <ja...@golang.org>
        Gerrit-Attention: Hyang-Ah Hana Kim <hya...@gmail.com>
        Gerrit-MessageType: newpatchset

        kokoro (Gerrit)

        unread,
        May 18, 2022, 9:29:02 AM5/18/22
        to Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, Jamal Carvalho, Suzy Mueller, golang-co...@googlegroups.com

        Attention is currently required from: Hyang-Ah Hana Kim, Jamal Carvalho, Suzy Mueller.

        Kokoro presubmit build finished with status: FAILURE
        Logs at: https://source.cloud.google.com/results/invocations/82e06863-f2bd-49f9-8663-656c7724eabf

        Patch set 4:TryBot-Result -1

        View Change

          To view, visit change 405905. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: vscode-go
          Gerrit-Branch: master
          Gerrit-Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
          Gerrit-Change-Number: 405905
          Gerrit-PatchSet: 4
          Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
          Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
          Gerrit-Reviewer: Jamal Carvalho <ja...@golang.org>
          Gerrit-Reviewer: Suzy Mueller <suz...@golang.org>
          Gerrit-Reviewer: kokoro <noreply...@google.com>
          Gerrit-Attention: Suzy Mueller <suz...@golang.org>
          Gerrit-Attention: Jamal Carvalho <ja...@golang.org>
          Gerrit-Attention: Hyang-Ah Hana Kim <hya...@gmail.com>
          Gerrit-Comment-Date: Wed, 18 May 2022 13:28:57 +0000

          Jamal Carvalho (Gerrit)

          unread,
          May 18, 2022, 11:55:58 AM5/18/22
          to Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, kokoro, Suzy Mueller, golang-co...@googlegroups.com

          Attention is currently required from: Hyang-Ah Hana Kim, Suzy Mueller.

          Patch set 4:Code-Review +2

          View Change

          1 comment:

          To view, visit change 405905. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: vscode-go
          Gerrit-Branch: master
          Gerrit-Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
          Gerrit-Change-Number: 405905
          Gerrit-PatchSet: 4
          Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
          Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
          Gerrit-Reviewer: Jamal Carvalho <ja...@golang.org>
          Gerrit-Reviewer: Suzy Mueller <suz...@golang.org>
          Gerrit-Reviewer: kokoro <noreply...@google.com>
          Gerrit-Attention: Suzy Mueller <suz...@golang.org>
          Gerrit-Attention: Hyang-Ah Hana Kim <hya...@gmail.com>
          Gerrit-Comment-Date: Wed, 18 May 2022 15:55:54 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          Gerrit-MessageType: comment

          Suzy Mueller (Gerrit)

          unread,
          May 18, 2022, 12:29:12 PM5/18/22
          to Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, Jamal Carvalho, kokoro, golang-co...@googlegroups.com

          Attention is currently required from: Hyang-Ah Hana Kim.

          View Change

          1 comment:

          • Patchset:

            • Patch Set #4:

              Seems like this change has introduced new test failures, though I don't immediately see how.

          To view, visit change 405905. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: vscode-go
          Gerrit-Branch: master
          Gerrit-Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
          Gerrit-Change-Number: 405905
          Gerrit-PatchSet: 4
          Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
          Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
          Gerrit-Reviewer: Jamal Carvalho <ja...@golang.org>
          Gerrit-Reviewer: Suzy Mueller <suz...@golang.org>
          Gerrit-Reviewer: kokoro <noreply...@google.com>
          Gerrit-Attention: Hyang-Ah Hana Kim <hya...@gmail.com>
          Gerrit-Comment-Date: Wed, 18 May 2022 16:29:08 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Gerrit-MessageType: comment

          Hyang-Ah Hana Kim (Gerrit)

          unread,
          May 19, 2022, 12:28:29 PM5/19/22
          to Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

          Attention is currently required from: Hyang-Ah Hana Kim.

          Hyang-Ah Hana Kim uploaded patch set #5 to this change.

          View Change

          The following approvals got outdated and were removed: Run-TryBot+1 by Hyang-Ah Hana Kim, TryBot-Result-1 by kokoro

          build/all.bash: rearrange test order

          VSCode modifies package.json while running in the
          integration test. It reverts back the package.json
          to original, but the revert file write can occur
          asynchronously. That affects our document generator
          tests following the integration test.

          Change the test order so we run the document generator
          test before.

          Usually, integration test takes long. So, running
          this quick documentation consistency test first and
          reporting the proble early is better.

          Fixes golang/vscode-go#2230

          Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
          ---
          M build/all.bash
          1 file changed, 32 insertions(+), 5 deletions(-)

          To view, visit change 405905. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: vscode-go
          Gerrit-Branch: master
          Gerrit-Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
          Gerrit-Change-Number: 405905
          Gerrit-PatchSet: 5
          Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
          Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
          Gerrit-Reviewer: Jamal Carvalho <ja...@golang.org>
          Gerrit-Reviewer: Suzy Mueller <suz...@golang.org>
          Gerrit-Reviewer: kokoro <noreply...@google.com>
          Gerrit-Attention: Hyang-Ah Hana Kim <hya...@gmail.com>
          Gerrit-MessageType: newpatchset

          Hyang-Ah Hana Kim (Gerrit)

          unread,
          May 19, 2022, 1:11:58 PM5/19/22
          to Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, Jamal Carvalho, kokoro, Suzy Mueller, golang-co...@googlegroups.com

          Patch set 6:Run-TryBot +1

          View Change

            To view, visit change 405905. To unsubscribe, or for help writing mail filters, visit settings.

            Gerrit-Project: vscode-go
            Gerrit-Branch: master
            Gerrit-Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
            Gerrit-Change-Number: 405905
            Gerrit-PatchSet: 6
            Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
            Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
            Gerrit-Reviewer: Jamal Carvalho <ja...@golang.org>
            Gerrit-Reviewer: Suzy Mueller <suz...@golang.org>
            Gerrit-Reviewer: kokoro <noreply...@google.com>
            Gerrit-Comment-Date: Thu, 19 May 2022 17:11:55 +0000

            kokoro (Gerrit)

            unread,
            May 19, 2022, 1:24:02 PM5/19/22
            to Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, Jamal Carvalho, Suzy Mueller, golang-co...@googlegroups.com

            Attention is currently required from: Hyang-Ah Hana Kim.

            Kokoro presubmit build finished with status: FAILURE
            Logs at: https://source.cloud.google.com/results/invocations/bcd25ef1-94d5-48aa-b57c-b019f0f1ff18

            Patch set 6:TryBot-Result -1

            View Change

              To view, visit change 405905. To unsubscribe, or for help writing mail filters, visit settings.

              Gerrit-Project: vscode-go
              Gerrit-Branch: master
              Gerrit-Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
              Gerrit-Change-Number: 405905
              Gerrit-PatchSet: 6
              Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
              Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
              Gerrit-Reviewer: Jamal Carvalho <ja...@golang.org>
              Gerrit-Reviewer: Suzy Mueller <suz...@golang.org>
              Gerrit-Reviewer: kokoro <noreply...@google.com>
              Gerrit-Attention: Hyang-Ah Hana Kim <hya...@gmail.com>
              Gerrit-Comment-Date: Thu, 19 May 2022 17:23:57 +0000

              Hyang-Ah Hana Kim (Gerrit)

              unread,
              May 19, 2022, 1:46:04 PM5/19/22
              to Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

              Attention is currently required from: Hyang-Ah Hana Kim.

              Hyang-Ah Hana Kim uploaded patch set #7 to this change.

              View Change

              The following approvals got outdated and were removed: Run-TryBot+1 by Hyang-Ah Hana Kim, TryBot-Result-1 by kokoro

              build/all.bash: rearrange test order

              VSCode modifies package.json while running in the
              integration test. It reverts back the package.json
              to original, but the revert file write can occur
              asynchronously. That affects our document generator
              tests following the integration test.

              Change the test order so we run the document generator
              test before.

              Usually, integration test takes long. So, running
              this quick documentation consistency test first and
              reporting the proble early is better.

              Fixes golang/vscode-go#2230

              Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
              ---
              M build/all.bash
              1 file changed, 32 insertions(+), 5 deletions(-)

              To view, visit change 405905. To unsubscribe, or for help writing mail filters, visit settings.

              Gerrit-Project: vscode-go
              Gerrit-Branch: master
              Gerrit-Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
              Gerrit-Change-Number: 405905
              Gerrit-PatchSet: 7
              Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
              Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
              Gerrit-Reviewer: Jamal Carvalho <ja...@golang.org>
              Gerrit-Reviewer: Suzy Mueller <suz...@golang.org>
              Gerrit-Reviewer: kokoro <noreply...@google.com>
              Gerrit-Attention: Hyang-Ah Hana Kim <hya...@gmail.com>
              Gerrit-MessageType: newpatchset

              kokoro (Gerrit)

              unread,
              May 19, 2022, 2:03:27 PM5/19/22
              to Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, Jamal Carvalho, Suzy Mueller, golang-co...@googlegroups.com

              Attention is currently required from: Hyang-Ah Hana Kim.

              Kokoro presubmit build finished with status: SUCCESS
              Logs at: https://source.cloud.google.com/results/invocations/3f739d44-335c-4406-8daa-774e70e48232

              Patch set 7:TryBot-Result +1

              View Change

                To view, visit change 405905. To unsubscribe, or for help writing mail filters, visit settings.

                Gerrit-Project: vscode-go
                Gerrit-Branch: master
                Gerrit-Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
                Gerrit-Change-Number: 405905
                Gerrit-PatchSet: 7
                Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
                Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
                Gerrit-Reviewer: Jamal Carvalho <ja...@golang.org>
                Gerrit-Reviewer: Suzy Mueller <suz...@golang.org>
                Gerrit-Reviewer: kokoro <noreply...@google.com>
                Gerrit-Attention: Hyang-Ah Hana Kim <hya...@gmail.com>
                Gerrit-Comment-Date: Thu, 19 May 2022 18:03:22 +0000

                Hyang-Ah Hana Kim (Gerrit)

                unread,
                May 19, 2022, 2:05:09 PM5/19/22
                to Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

                Attention is currently required from: Hyang-Ah Hana Kim.

                Hyang-Ah Hana Kim uploaded patch set #8 to this change.

                View Change

                The following approvals got outdated and were removed: Run-TryBot+1 by Hyang-Ah Hana Kim, TryBot-Result+1 by kokoro

                build/all.bash: rearrange test order

                VSCode modifies package.json while running in the
                integration test. It reverts back the package.json
                to original, but the revert file write can occur
                asynchronously. That affects our document generator
                tests following the integration test.

                Change the test order so we run the document generator
                test before.

                Usually, integration test takes long. So, running
                this quick documentation consistency test first and
                reporting the proble early is better.

                Fixes golang/vscode-go#2230

                Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
                ---
                M build/all.bash
                1 file changed, 32 insertions(+), 5 deletions(-)

                To view, visit change 405905. To unsubscribe, or for help writing mail filters, visit settings.

                Gerrit-Project: vscode-go
                Gerrit-Branch: master
                Gerrit-Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
                Gerrit-Change-Number: 405905
                Gerrit-PatchSet: 8
                Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
                Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
                Gerrit-Reviewer: Jamal Carvalho <ja...@golang.org>
                Gerrit-Reviewer: Suzy Mueller <suz...@golang.org>
                Gerrit-Reviewer: kokoro <noreply...@google.com>
                Gerrit-Attention: Hyang-Ah Hana Kim <hya...@gmail.com>
                Gerrit-MessageType: newpatchset

                kokoro (Gerrit)

                unread,
                May 19, 2022, 2:09:52 PM5/19/22
                to Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, Jamal Carvalho, Suzy Mueller, golang-co...@googlegroups.com

                Attention is currently required from: Hyang-Ah Hana Kim.

                Kokoro presubmit build finished with status: FAILURE
                Logs at: https://source.cloud.google.com/results/invocations/f36ff8b3-e80d-4d21-985c-4c7c1c03fec1

                Patch set 8:TryBot-Result -1

                View Change

                  To view, visit change 405905. To unsubscribe, or for help writing mail filters, visit settings.

                  Gerrit-Project: vscode-go
                  Gerrit-Branch: master
                  Gerrit-Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
                  Gerrit-Change-Number: 405905
                  Gerrit-PatchSet: 8
                  Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
                  Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
                  Gerrit-Reviewer: Jamal Carvalho <ja...@golang.org>
                  Gerrit-Reviewer: Suzy Mueller <suz...@golang.org>
                  Gerrit-Reviewer: kokoro <noreply...@google.com>
                  Gerrit-Attention: Hyang-Ah Hana Kim <hya...@gmail.com>
                  Gerrit-Comment-Date: Thu, 19 May 2022 18:09:48 +0000

                  kokoro (Gerrit)

                  unread,
                  May 19, 2022, 2:50:24 PM5/19/22
                  to Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, Jamal Carvalho, Suzy Mueller, golang-co...@googlegroups.com

                  Attention is currently required from: Hyang-Ah Hana Kim.

                  Kokoro presubmit build finished with status: FAILURE

                  Logs at: https://source.cloud.google.com/results/invocations/ab3ba043-f4fc-4e2b-a8aa-5578424aeaa5

                  Patch set 9:TryBot-Result -1

                  View Change

                    To view, visit change 405905. To unsubscribe, or for help writing mail filters, visit settings.

                    Gerrit-Project: vscode-go
                    Gerrit-Branch: master
                    Gerrit-Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
                    Gerrit-Change-Number: 405905
                    Gerrit-PatchSet: 9
                    Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
                    Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
                    Gerrit-Reviewer: Jamal Carvalho <ja...@golang.org>
                    Gerrit-Reviewer: Suzy Mueller <suz...@golang.org>
                    Gerrit-Reviewer: kokoro <noreply...@google.com>
                    Gerrit-Attention: Hyang-Ah Hana Kim <hya...@gmail.com>
                    Gerrit-Comment-Date: Thu, 19 May 2022 18:50:19 +0000

                    Hyang-Ah Hana Kim (Gerrit)

                    unread,
                    May 19, 2022, 4:00:54 PM5/19/22
                    to Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

                    Attention is currently required from: Hyang-Ah Hana Kim.

                    Hyang-Ah Hana Kim uploaded patch set #10 to this change.

                    View Change

                    The following approvals got outdated and were removed: Run-TryBot+1 by Hyang-Ah Hana Kim, TryBot-Result-1 by kokoro

                    build/all.bash: rearrange test order

                    VSCode modifies package.json while running in the
                    integration test. It reverts back the package.json
                    to original, but the revert file write can occur
                    asynchronously. That affects our document generator
                    tests following the integration test.

                    Change the test order so we run the document generator
                    test before.

                    Usually, integration test takes long. So, running
                    this quick documentation consistency test first and
                    reporting the proble early is better.

                    Fixes golang/vscode-go#2230

                    Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
                    ---
                    M build/all.bash
                    1 file changed, 32 insertions(+), 5 deletions(-)

                    To view, visit change 405905. To unsubscribe, or for help writing mail filters, visit settings.

                    Gerrit-Project: vscode-go
                    Gerrit-Branch: master
                    Gerrit-Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
                    Gerrit-Change-Number: 405905
                    Gerrit-PatchSet: 10
                    Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
                    Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
                    Gerrit-Reviewer: Jamal Carvalho <ja...@golang.org>
                    Gerrit-Reviewer: Suzy Mueller <suz...@golang.org>
                    Gerrit-Reviewer: kokoro <noreply...@google.com>
                    Gerrit-Attention: Hyang-Ah Hana Kim <hya...@gmail.com>
                    Gerrit-MessageType: newpatchset

                    Hyang-Ah Hana Kim (Gerrit)

                    unread,
                    May 19, 2022, 4:28:12 PM5/19/22
                    to Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, kokoro, Jamal Carvalho, Suzy Mueller, golang-co...@googlegroups.com

                    Patch set 10:Run-TryBot +1

                    View Change

                      To view, visit change 405905. To unsubscribe, or for help writing mail filters, visit settings.

                      Gerrit-Project: vscode-go
                      Gerrit-Branch: master
                      Gerrit-Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
                      Gerrit-Change-Number: 405905
                      Gerrit-PatchSet: 10
                      Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
                      Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
                      Gerrit-Reviewer: Jamal Carvalho <ja...@golang.org>
                      Gerrit-Reviewer: Suzy Mueller <suz...@golang.org>
                      Gerrit-Reviewer: kokoro <noreply...@google.com>
                      Gerrit-Comment-Date: Thu, 19 May 2022 20:28:07 +0000

                      kokoro (Gerrit)

                      unread,
                      May 19, 2022, 4:55:01 PM5/19/22
                      to Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, Jamal Carvalho, Suzy Mueller, golang-co...@googlegroups.com

                      Attention is currently required from: Hyang-Ah Hana Kim.

                      Kokoro presubmit build finished with status: FAILURE
                      Logs at: https://source.cloud.google.com/results/invocations/d8727df9-15a1-4fc5-8009-8141fce4c6e6

                      Patch set 10:TryBot-Result -1

                      View Change

                        To view, visit change 405905. To unsubscribe, or for help writing mail filters, visit settings.

                        Gerrit-Project: vscode-go
                        Gerrit-Branch: master
                        Gerrit-Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
                        Gerrit-Change-Number: 405905
                        Gerrit-PatchSet: 10
                        Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
                        Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
                        Gerrit-Reviewer: Jamal Carvalho <ja...@golang.org>
                        Gerrit-Reviewer: Suzy Mueller <suz...@golang.org>
                        Gerrit-Reviewer: kokoro <noreply...@google.com>
                        Gerrit-Attention: Hyang-Ah Hana Kim <hya...@gmail.com>
                        Gerrit-Comment-Date: Thu, 19 May 2022 20:54:57 +0000

                        Hyang-Ah Hana Kim (Gerrit)

                        unread,
                        May 19, 2022, 4:58:42 PM5/19/22
                        to Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, kokoro, Jamal Carvalho, Suzy Mueller, golang-co...@googlegroups.com

                        Attention is currently required from: Hyang-Ah Hana Kim, Suzy Mueller.

                        View Change

                        1 comment:

                        • Patchset:

                          • Patch Set #4:

                            Seems like this change has introduced new test failures, though I don't immediately see how.

                          • I am really puzzled... still investigating.

                        To view, visit change 405905. To unsubscribe, or for help writing mail filters, visit settings.

                        Gerrit-Project: vscode-go
                        Gerrit-Branch: master
                        Gerrit-Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
                        Gerrit-Change-Number: 405905
                        Gerrit-PatchSet: 10
                        Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
                        Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
                        Gerrit-Reviewer: Jamal Carvalho <ja...@golang.org>
                        Gerrit-Reviewer: Suzy Mueller <suz...@golang.org>
                        Gerrit-Reviewer: kokoro <noreply...@google.com>
                        Gerrit-Attention: Suzy Mueller <suz...@golang.org>
                        Gerrit-Attention: Hyang-Ah Hana Kim <hya...@gmail.com>
                        Gerrit-Comment-Date: Thu, 19 May 2022 20:58:38 +0000
                        Gerrit-HasComments: Yes
                        Gerrit-Has-Labels: No
                        Comment-In-Reply-To: Suzy Mueller <suz...@golang.org>
                        Gerrit-MessageType: comment

                        Hyang-Ah Hana Kim (Gerrit)

                        unread,
                        May 19, 2022, 10:50:33 PM5/19/22
                        to Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

                        Attention is currently required from: Hyang-Ah Hana Kim, Suzy Mueller.

                        Hyang-Ah Hana Kim uploaded patch set #11 to this change.

                        View Change

                        The following approvals got outdated and were removed: Run-TryBot+1 by Hyang-Ah Hana Kim, TryBot-Result-1 by kokoro

                        build/all.bash: rearrange test order

                        VSCode modifies package.json while running in the
                        integration test. It reverts back the package.json
                        to original, but the revert file write can occur
                        asynchronously. That affects our document generator
                        tests following the integration test.

                        Change the test order so we run the document generator
                        test before.

                        Usually, integration test takes long. So, running
                        this quick documentation consistency test first and
                        reporting the proble early is better.

                        Fixes golang/vscode-go#2230

                        Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
                        ---
                        M build/all.bash
                        1 file changed, 34 insertions(+), 5 deletions(-)

                        To view, visit change 405905. To unsubscribe, or for help writing mail filters, visit settings.

                        Gerrit-Project: vscode-go
                        Gerrit-Branch: master
                        Gerrit-Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
                        Gerrit-Change-Number: 405905
                        Gerrit-PatchSet: 11
                        Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
                        Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
                        Gerrit-Reviewer: Jamal Carvalho <ja...@golang.org>
                        Gerrit-Reviewer: Suzy Mueller <suz...@golang.org>
                        Gerrit-Reviewer: kokoro <noreply...@google.com>
                        Gerrit-Attention: Suzy Mueller <suz...@golang.org>
                        Gerrit-Attention: Hyang-Ah Hana Kim <hya...@gmail.com>
                        Gerrit-MessageType: newpatchset

                        Hyang-Ah Hana Kim (Gerrit)

                        unread,
                        May 19, 2022, 10:50:57 PM5/19/22
                        to Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, kokoro, Jamal Carvalho, Suzy Mueller, golang-co...@googlegroups.com

                        Attention is currently required from: Suzy Mueller.

                        Patch set 11:Run-TryBot +1

                        View Change

                          To view, visit change 405905. To unsubscribe, or for help writing mail filters, visit settings.

                          Gerrit-Project: vscode-go
                          Gerrit-Branch: master
                          Gerrit-Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
                          Gerrit-Change-Number: 405905
                          Gerrit-PatchSet: 11
                          Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
                          Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
                          Gerrit-Reviewer: Jamal Carvalho <ja...@golang.org>
                          Gerrit-Reviewer: Suzy Mueller <suz...@golang.org>
                          Gerrit-Reviewer: kokoro <noreply...@google.com>
                          Gerrit-Attention: Suzy Mueller <suz...@golang.org>
                          Gerrit-Comment-Date: Fri, 20 May 2022 02:50:53 +0000

                          kokoro (Gerrit)

                          unread,
                          May 19, 2022, 11:06:48 PM5/19/22
                          to Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, Jamal Carvalho, Suzy Mueller, golang-co...@googlegroups.com

                          Attention is currently required from: Hyang-Ah Hana Kim, Suzy Mueller.

                          Kokoro presubmit build finished with status: FAILURE
                          Logs at: https://source.cloud.google.com/results/invocations/d6afa623-0d90-4c8e-b626-d0fa789bbd92

                          Patch set 11:TryBot-Result -1

                          View Change

                            To view, visit change 405905. To unsubscribe, or for help writing mail filters, visit settings.

                            Gerrit-Project: vscode-go
                            Gerrit-Branch: master
                            Gerrit-Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
                            Gerrit-Change-Number: 405905
                            Gerrit-PatchSet: 11
                            Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
                            Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
                            Gerrit-Reviewer: Jamal Carvalho <ja...@golang.org>
                            Gerrit-Reviewer: Suzy Mueller <suz...@golang.org>
                            Gerrit-Reviewer: kokoro <noreply...@google.com>
                            Gerrit-Attention: Suzy Mueller <suz...@golang.org>
                            Gerrit-Attention: Hyang-Ah Hana Kim <hya...@gmail.com>
                            Gerrit-Comment-Date: Fri, 20 May 2022 03:06:43 +0000

                            Hyang-Ah Hana Kim (Gerrit)

                            unread,
                            May 20, 2022, 6:58:41 PM5/20/22
                            to Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

                            Attention is currently required from: Hyang-Ah Hana Kim, Suzy Mueller.

                            Hyang-Ah Hana Kim uploaded patch set #12 to this change.

                            View Change

                            The following approvals got outdated and were removed: Run-TryBot+1 by Hyang-Ah Hana Kim, TryBot-Result-1 by kokoro

                            build/all.bash: rearrange test order

                            VSCode modifies package.json while running in the
                            integration test. It reverts back the package.json
                            to original, but the revert file write can occur
                            asynchronously. That affects our document generator
                            tests following the integration test.

                            Change the test order so we run the document generator
                            test before.

                            Usually, integration test takes long. So, running
                            this quick documentation consistency test first and
                            reporting the proble early is better.

                            Also, change Dockerfile to bring up the container
                            as non-root user (node created by the node container)


                            Fixes golang/vscode-go#2230

                            Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
                            ---
                            M build/Dockerfile
                            M build/all.bash
                            2 files changed, 50 insertions(+), 18 deletions(-)

                            To view, visit change 405905. To unsubscribe, or for help writing mail filters, visit settings.

                            Gerrit-Project: vscode-go
                            Gerrit-Branch: master
                            Gerrit-Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
                            Gerrit-Change-Number: 405905
                            Gerrit-PatchSet: 12
                            Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
                            Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
                            Gerrit-Reviewer: Jamal Carvalho <ja...@golang.org>
                            Gerrit-Reviewer: Suzy Mueller <suz...@golang.org>
                            Gerrit-Reviewer: kokoro <noreply...@google.com>
                            Gerrit-Attention: Suzy Mueller <suz...@golang.org>
                            Gerrit-Attention: Hyang-Ah Hana Kim <hya...@gmail.com>
                            Gerrit-MessageType: newpatchset

                            kokoro (Gerrit)

                            unread,
                            May 20, 2022, 7:13:18 PM5/20/22
                            to Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, Jamal Carvalho, Suzy Mueller, golang-co...@googlegroups.com

                            Attention is currently required from: Hyang-Ah Hana Kim, Suzy Mueller.

                            Kokoro presubmit build finished with status: SUCCESS
                            Logs at: https://source.cloud.google.com/results/invocations/6e0a2119-1f32-4534-a6e1-0d7aa99ca331

                            Patch set 12:TryBot-Result +1

                            View Change

                              To view, visit change 405905. To unsubscribe, or for help writing mail filters, visit settings.

                              Gerrit-Project: vscode-go
                              Gerrit-Branch: master
                              Gerrit-Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
                              Gerrit-Change-Number: 405905
                              Gerrit-PatchSet: 12
                              Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
                              Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
                              Gerrit-Reviewer: Jamal Carvalho <ja...@golang.org>
                              Gerrit-Reviewer: Suzy Mueller <suz...@golang.org>
                              Gerrit-Reviewer: kokoro <noreply...@google.com>
                              Gerrit-Attention: Suzy Mueller <suz...@golang.org>
                              Gerrit-Attention: Hyang-Ah Hana Kim <hya...@gmail.com>
                              Gerrit-Comment-Date: Fri, 20 May 2022 23:13:13 +0000

                              Hyang-Ah Hana Kim (Gerrit)

                              unread,
                              May 20, 2022, 9:16:58 PM5/20/22
                              to Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

                              Attention is currently required from: Hyang-Ah Hana Kim, Suzy Mueller.

                              Hyang-Ah Hana Kim uploaded patch set #13 to this change.

                              View Change

                              The following approvals got outdated and were removed: Run-TryBot+1 by Hyang-Ah Hana Kim, TryBot-Result+1 by kokoro

                              build/all.bash: rearrange test order

                              VSCode modifies package.json while running in the
                              integration test. It reverts back the package.json
                              to original, but the revert file write can occur
                              asynchronously. That affects our document generator
                              tests following the integration test.

                              Change the test order so we run the document generator
                              test before.

                              Usually, integration test takes long. So, running
                              this quick documentation consistency test first and
                              reporting the proble early is better.

                              Also, change Dockerfile to bring up the container
                              as non-root user (node created by the node container)

                              Fixes golang/vscode-go#2230

                              Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
                              ---
                              M build/Dockerfile
                              M build/all.bash
                              2 files changed, 42 insertions(+), 20 deletions(-)

                              To view, visit change 405905. To unsubscribe, or for help writing mail filters, visit settings.

                              Gerrit-Project: vscode-go
                              Gerrit-Branch: master
                              Gerrit-Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
                              Gerrit-Change-Number: 405905
                              Gerrit-PatchSet: 13
                              Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
                              Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
                              Gerrit-Reviewer: Jamal Carvalho <ja...@golang.org>
                              Gerrit-Reviewer: Suzy Mueller <suz...@golang.org>
                              Gerrit-Reviewer: kokoro <noreply...@google.com>
                              Gerrit-Attention: Suzy Mueller <suz...@golang.org>
                              Gerrit-Attention: Hyang-Ah Hana Kim <hya...@gmail.com>
                              Gerrit-MessageType: newpatchset

                              kokoro (Gerrit)

                              unread,
                              May 20, 2022, 9:31:36 PM5/20/22
                              to Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, Jamal Carvalho, Suzy Mueller, golang-co...@googlegroups.com

                              Attention is currently required from: Hyang-Ah Hana Kim, Suzy Mueller.

                              Kokoro presubmit build finished with status: SUCCESS
                              Logs at: https://source.cloud.google.com/results/invocations/db6b1ea5-7db5-4674-9fca-4b4f7979749d

                              Patch set 13:TryBot-Result +1

                              View Change

                                To view, visit change 405905. To unsubscribe, or for help writing mail filters, visit settings.

                                Gerrit-Project: vscode-go
                                Gerrit-Branch: master
                                Gerrit-Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
                                Gerrit-Change-Number: 405905
                                Gerrit-PatchSet: 13
                                Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
                                Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
                                Gerrit-Reviewer: Jamal Carvalho <ja...@golang.org>
                                Gerrit-Reviewer: Suzy Mueller <suz...@golang.org>
                                Gerrit-Reviewer: kokoro <noreply...@google.com>
                                Gerrit-Attention: Suzy Mueller <suz...@golang.org>
                                Gerrit-Attention: Hyang-Ah Hana Kim <hya...@gmail.com>
                                Gerrit-Comment-Date: Sat, 21 May 2022 01:31:32 +0000

                                Hyang-Ah Hana Kim (Gerrit)

                                unread,
                                May 23, 2022, 8:41:51 AM5/23/22
                                to Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, kokoro, Jamal Carvalho, Suzy Mueller, golang-co...@googlegroups.com

                                Attention is currently required from: Jamal Carvalho, Suzy Mueller.

                                View Change

                                1 comment:

                                • Patchset:

                                  • Patch Set #4:

                                    I am really puzzled... still investigating.

                                    Turned out it's the USER issue. The container runs as a root - I thought the default node container was running as a 'node' but it wasn't. (or changed?). As a result, all directories and files created during `go` command execution had root-only access. I don't know why but the vscode instance and npm scripts don't run as root and failed to access/write the directories. Explicitly specifying the user prevented this error. More over, 'go clean -modcache' added as a workaround for rsync permission issue (when turning down the container, kokoro was unhappy about the module cache entries written as root) is no longer necessary.

                                    Dockerfile was updated. PTAL.

                                To view, visit change 405905. To unsubscribe, or for help writing mail filters, visit settings.

                                Gerrit-Project: vscode-go
                                Gerrit-Branch: master
                                Gerrit-Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
                                Gerrit-Change-Number: 405905
                                Gerrit-PatchSet: 13
                                Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
                                Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
                                Gerrit-Reviewer: Jamal Carvalho <ja...@golang.org>
                                Gerrit-Reviewer: Suzy Mueller <suz...@golang.org>
                                Gerrit-Reviewer: kokoro <noreply...@google.com>
                                Gerrit-Attention: Suzy Mueller <suz...@golang.org>
                                Gerrit-Attention: Jamal Carvalho <ja...@golang.org>
                                Gerrit-Comment-Date: Mon, 23 May 2022 12:41:45 +0000
                                Gerrit-HasComments: Yes
                                Gerrit-Has-Labels: No
                                Comment-In-Reply-To: Suzy Mueller <suz...@golang.org>
                                Comment-In-Reply-To: Hyang-Ah Hana Kim <hya...@gmail.com>
                                Gerrit-MessageType: comment

                                Suzy Mueller (Gerrit)

                                unread,
                                May 23, 2022, 1:55:38 PM5/23/22
                                to Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, kokoro, Jamal Carvalho, golang-co...@googlegroups.com

                                Attention is currently required from: Hyang-Ah Hana Kim, Jamal Carvalho.

                                Patch set 13:Code-Review +2

                                View Change

                                1 comment:

                                • Patchset:

                                  • Patch Set #4:

                                    Turned out it's the USER issue. […]

                                    Wow, great job finding that!

                                To view, visit change 405905. To unsubscribe, or for help writing mail filters, visit settings.

                                Gerrit-Project: vscode-go
                                Gerrit-Branch: master
                                Gerrit-Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
                                Gerrit-Change-Number: 405905
                                Gerrit-PatchSet: 13
                                Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
                                Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
                                Gerrit-Reviewer: Jamal Carvalho <ja...@golang.org>
                                Gerrit-Reviewer: Suzy Mueller <suz...@golang.org>
                                Gerrit-Reviewer: kokoro <noreply...@google.com>
                                Gerrit-Attention: Jamal Carvalho <ja...@golang.org>
                                Gerrit-Attention: Hyang-Ah Hana Kim <hya...@gmail.com>
                                Gerrit-Comment-Date: Mon, 23 May 2022 17:55:34 +0000
                                Gerrit-HasComments: Yes
                                Gerrit-Has-Labels: Yes

                                Hyang-Ah Hana Kim (Gerrit)

                                unread,
                                May 23, 2022, 2:42:16 PM5/23/22
                                to Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, Suzy Mueller, kokoro, Jamal Carvalho, golang-co...@googlegroups.com

                                Attention is currently required from: Jamal Carvalho.

                                View Change

                                1 comment:

                                • Commit Message:

                                  • Done

                                To view, visit change 405905. To unsubscribe, or for help writing mail filters, visit settings.

                                Gerrit-Project: vscode-go
                                Gerrit-Branch: master
                                Gerrit-Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
                                Gerrit-Change-Number: 405905
                                Gerrit-PatchSet: 14
                                Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
                                Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
                                Gerrit-Reviewer: Jamal Carvalho <ja...@golang.org>
                                Gerrit-Reviewer: Suzy Mueller <suz...@golang.org>
                                Gerrit-Reviewer: kokoro <noreply...@google.com>
                                Gerrit-Attention: Jamal Carvalho <ja...@golang.org>
                                Gerrit-Comment-Date: Mon, 23 May 2022 18:42:11 +0000
                                Gerrit-HasComments: Yes
                                Gerrit-Has-Labels: No
                                Comment-In-Reply-To: Jamal Carvalho <ja...@golang.org>
                                Gerrit-MessageType: comment

                                Hyang-Ah Hana Kim (Gerrit)

                                unread,
                                May 23, 2022, 2:42:27 PM5/23/22
                                to Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Suzy Mueller, kokoro, Jamal Carvalho, golang-co...@googlegroups.com

                                Hyang-Ah Hana Kim submitted this change.

                                View Change



                                13 is the latest approved patch-set.
                                No files were changed between the latest approved patch-set and the submitted one.

                                Approvals: Jamal Carvalho: Looks good to me, approved Suzy Mueller: Looks good to me, approved
                                build/all.bash: rearrange test order

                                VSCode modifies package.json while running in the
                                integration test. It reverts back the package.json
                                to original, but the revert file write can occur
                                asynchronously. That affects our document generator
                                tests following the integration test.

                                Change the test order so we run the document generator
                                test before.

                                Usually, integration test takes long. So, running
                                this quick documentation consistency test first and
                                reporting the problem early is better.


                                Also, change Dockerfile to bring up the container
                                as non-root user (node created by the node container)

                                Fixes golang/vscode-go#2230

                                Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
                                Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/405905
                                Reviewed-by: Jamal Carvalho <ja...@golang.org>
                                Reviewed-by: Suzy Mueller <suz...@golang.org>

                                ---
                                M build/Dockerfile
                                M build/all.bash
                                2 files changed, 45 insertions(+), 20 deletions(-)

                                diff --git a/build/Dockerfile b/build/Dockerfile
                                index 1ca02ee..0e4b9c9 100644
                                --- a/build/Dockerfile
                                +++ b/build/Dockerfile
                                @@ -2,7 +2,6 @@
                                ARG GOVERSION=1
                                FROM golang:${GOVERSION} AS gobuilder

                                -ENV GO111MODULE on
                                ENV GOBIN /gobin

                                # Install other Go tools tests depend on
                                @@ -12,10 +11,6 @@

                                FROM node:latest

                                -# Prepare a home directory under workspace.
                                -RUN mkdir -p /workspace/vscodego
                                -ENV HOME=/workspace/vscodego
                                -
                                # GO111MODULE=auto
                                RUN mkdir /go
                                COPY --from=gobuilder /gobin /go/bin
                                @@ -23,11 +18,12 @@

                                # Add the default GOPATH/bin to the PATH.
                                # Add the directories of the go tool chains to PATH.
                                -ENV PATH /workspace/vscodego/go/bin:/go/bin:/usr/local/go/bin:${PATH}
                                +ENV PATH /go/bin:/usr/local/go/bin:${PATH}
                                ENV DEBIAN_FRONTEND noninteractive

                                RUN apt-get -qq update && apt-get install -qq -y libnss3 libgtk-3-dev libxss1 libasound2 xvfb libsecret-1-0 jq > /dev/null
                                RUN npm install -g typescript vsce

                                +USER node
                                WORKDIR /workspace
                                ENTRYPOINT ["build/all.bash"]
                                diff --git a/build/all.bash b/build/all.bash
                                index 4a1a7ed..c2f9d95 100755
                                --- a/build/all.bash
                                +++ b/build/all.bash
                                @@ -42,27 +42,26 @@
                                }

                                run_test() {
                                - echo "**** Run test ****"
                                df -h | grep shm
                                - npm ci
                                - npm run compile
                                - npm run unit-test
                                - npm test --silent
                                - npm run lint

                                - # BUG(github.com/golang/vscode-go/issues/2230): Disable test temporarily.
                                - # echo "**** Run settings generator ****"
                                - # go run tools/generate.go -w=false -gopls=true
                                -
                                - echo "**** Check if vsce works ****"
                                - vsce package
                                + echo "**** Run settings generator ****"
                                + go run ./tools/generate.go -w=false -gopls=true

                                echo "**** Run Go tests ****"
                                go test ./...
                                - # TODO(hyangah): see if go clean -modcache makes kokoro builder happy
                                - go clean -modcache
                                +
                                + echo "**** Test build ****"
                                + npm ci
                                + npm run compile
                                +
                                + echo "**** Run test ****"
                                + npm run unit-test
                                + npm test --silent
                                +
                                + npm run lint
                                }

                                +
                                run_test_in_docker() {
                                echo "**** Building the docker image ***"
                                docker build -t vscode-test-env ${GOVERSION:+ --build-arg GOVERSION="${GOVERSION}"} -f ./build/Dockerfile .

                                To view, visit change 405905. To unsubscribe, or for help writing mail filters, visit settings.

                                Gerrit-Project: vscode-go
                                Gerrit-Branch: master
                                Gerrit-Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
                                Gerrit-Change-Number: 405905
                                Gerrit-PatchSet: 15
                                Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
                                Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
                                Gerrit-Reviewer: Jamal Carvalho <ja...@golang.org>
                                Gerrit-Reviewer: Suzy Mueller <suz...@golang.org>
                                Gerrit-Reviewer: kokoro <noreply...@google.com>
                                Gerrit-MessageType: merged
                                Reply all
                                Reply to author
                                Forward
                                0 new messages