Skip to content

Commit

Permalink
Revert "Merge branch 'linkedflow' into master"
Browse files Browse the repository at this point in the history
This reverts commit 61c9f04, reversing
changes made to 0cb91dd.
  • Loading branch information
Ale0x78 committed Nov 8, 2024
1 parent 61c9f04 commit 12428bc
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 27 deletions.
4 changes: 0 additions & 4 deletions .github/build-postprocessors/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
FROM golang:1.22 AS build


COPY post-processor /post-processor


RUN apt update
RUN apt install -y --no-install-recommends git python3 python3-pip curl make
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -y
ENV PATH="${PATH}:/root/.cargo/bin"

WORKDIR /
RUN make -C post-processor

FROM ubuntu:latest
COPY --from=build /post-processor/artifacts /artifacts

1 change: 0 additions & 1 deletion .github/workflows/post-processor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ jobs:
platforms: linux/amd64,linux/arm64
push: true
tags: visiblev8/vv8-postprocessors:latest

- name: Remove artifacts
if: always()
uses: docker://ubuntu:latest
Expand Down
12 changes: 4 additions & 8 deletions post-processor/flow/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ func (agg *flowAggregator) IngestRecord(ctx *core.ExecutionContext, lineNumber i
agg.scriptList[ctx.Script.ID] = script
}

currentAction := fmt.Sprint(offset) + string(',') + fullName + string(',') + string(op)
currentAction := fmt.Sprint(offset) + string(',') + fullName

if agg.lastAction[:len(agg.lastAction) - 2] == currentAction[:len(currentAction) - 2] && op == 'c' {
script.APIs = script.APIs[:len(script.APIs) - 1]
if agg.lastAction == currentAction && op == 'c' {
return nil
}

script.APIs = append(script.APIs, currentAction)
Expand All @@ -96,8 +96,6 @@ func (agg *flowAggregator) IngestRecord(ctx *core.ExecutionContext, lineNumber i

var scriptFlowFields = [...]string{
"isolate",
"submissionid",
"instanceid",
"visiblev8",
"code",
"url",
Expand All @@ -113,7 +111,7 @@ func (agg *flowAggregator) DumpToPostgresql(ctx *core.AggregationContext, sqlDb
return err
}

stmt, err := txn.Prepare(pq.CopyIn("linked_flow", scriptFlowFields[:]...))
stmt, err := txn.Prepare(pq.CopyIn("script_flow", scriptFlowFields[:]...))
if err != nil {
txn.Rollback()
return err
Expand All @@ -132,8 +130,6 @@ func (agg *flowAggregator) DumpToPostgresql(ctx *core.AggregationContext, sqlDb
_, err = stmt.Exec(
script.info.Isolate.ID,
script.info.VisibleV8,
ctx.Ln.SubmissionID,
script.info.CodeHash,
script.info.Code,
script.info.URL,
evaledById,
Expand Down
14 changes: 0 additions & 14 deletions post-processor/postgres_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -172,20 +172,6 @@ CREATE TABLE IF NOT EXISTS script_flow (
evaled_by INT -- REFERENCES script_flow (id)
);

CREATE TABLE IF NOT EXISTS linked_flow (
id SERIAL PRIMARY KEY NOT NULL,
isolate TEXT NOT NULL, -- V8 isolate pointer
submissionid TEXT,
scriptSHA2 BYTEA,
visiblev8 BOOLEAN NOT NULL, -- Is the script loaded by the browser/injected by VisibleV8 (in most cases you want to ignore scripts if this is true)

code TEXT NOT NULL,
first_origin TEXT,
url TEXT,
apis TEXT[] NOT NULL, -- All APIs loaded by a script in the order they were executed
evaled_by INT -- REFERENCES script_flow (id)
);

-- Feature usage information (for monomorphic callsites)
CREATE TABLE IF NOT EXISTS feature_usage (
id SERIAL PRIMARY KEY NOT NULL,
Expand Down

0 comments on commit 12428bc

Please sign in to comment.