Skip to content

Commit

Permalink
Restore some files from main.
Browse files Browse the repository at this point in the history
  • Loading branch information
jlewi committed Apr 17, 2024
1 parent 4f940d3 commit d9c3200
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 29 deletions.
5 changes: 0 additions & 5 deletions app/cmd/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ import (
"fmt"
"os"

"github.com/go-logr/zapr"
"go.uber.org/zap"

"github.com/jlewi/foyle/app/pkg/application"

"github.com/jlewi/monogo/helpers"
Expand Down Expand Up @@ -36,8 +33,6 @@ func NewServeCmd() *cobra.Command {
defer helpers.DeferIgnoreError(app.Shutdown)

logVersion()
log := zapr.NewLogger(zap.L())
log.Info("Starting server")
return s.Run()

}()
Expand Down
9 changes: 0 additions & 9 deletions app/pkg/application/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,14 +294,5 @@ func (a *App) Shutdown() error {
for _, closer := range a.logClosers {
closer()
}
//if err := l.Sync(); err != nil {
// // N.B. I don't understand why but calling sync appears to cause an error complaining about calling sync
// // on /dev/stderr so we just filter that out to avoid spam.
// pathErr := &fs.PathError{}
//
// if !errors.As(err, &pathErr) {
// return err
// }
//}
return nil
}
4 changes: 1 addition & 3 deletions frontend/foyle/src/web/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ export class FoyleClient {
// Include a default so that address is always well defined
const address = config.get<string>("executor-address", "http://localhost:8080");

const body = request.toJsonString();
console.log(`Sending request ${body}`);
const body = request.toJsonString();
return fetch(address + "/api/v1alpha1/execute", {
method: 'POST',
body: body,
Expand All @@ -43,7 +42,6 @@ export class FoyleClient {
})
.then(response => response.json())
.then(data => {
console.log(`Generate response ${data}`);
const resp = agentpb.GenerateResponse.fromJson(data);
return resp;
});
Expand Down
12 changes: 0 additions & 12 deletions frontend/foyle/src/web/test/suite/metadata.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,6 @@ suite('Metadata Test Suite', () => {
}
});

test('test setBlockFromMeta-undefined', () => {
// This test case was trying to reproduce the error in the browser that
// "meta.hasOwnProperty is not a function"

// No traceids
const meta1 = Object.create(null);
const actual = new docpb.Block();
metadata.setBlockFromMeta(actual, meta1);


});

test('test setBlockFromMeta', () => {
class TestCase {
meta: metadata.CellMetadata;
Expand Down

0 comments on commit d9c3200

Please sign in to comment.