Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.

Runlog refactor Tier 3#145

Draft
boxhock wants to merge 2 commits intofeature/fluxmonitorfrom
runlog-service-refactor-tier-3
Draft

Runlog refactor Tier 3#145
boxhock wants to merge 2 commits intofeature/fluxmonitorfrom
runlog-service-refactor-tier-3

Conversation

@boxhock
Copy link
Copy Markdown
Contributor

@boxhock boxhock commented Apr 28, 2021

No description provided.

Copy link
Copy Markdown

@ebarakos ebarakos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good, apart from the fact that there exists some duplication in WS files. Can we do something to avoid this?

},
{
"skips unfiltered WS Oracle request",
fields{jobid: "Z9999"},
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this Z here? Moved by the older tests, just wondering if it is intentional or something.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's intentional since it tests this line in the runlog file:

if query.JobID != r.jobid {
		return nil, errNoJobMatch
	}

Comment thread blockchain/blockchain.go
Addresses: addresses,
}
case agoric.Name:
// TODO: No data stored here?
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, we don't need any data for this subscription?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess not? In the original implementation the stored data is also empty...

Comment thread subscriber/subscriber.go
Client
// CoreWS are pure WS connections without
// any JSON-RPC support
CoreWS
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the difference between this and WS above? Could we merge them?

Comment thread subscriber/core_ws.go
@@ -0,0 +1,112 @@
package subscriber
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe core_ws.go could be utilized inside ws.go so we avoid duplication? I see quite similar parts.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea of utilizing core_ws inside ws seems more efficient instead of duplicating functionality. Currently taking a look

Comment thread blockchain/agoric_test.go
@@ -1,221 +0,0 @@
package blockchain
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about some of the other tests here?

Comment thread subscriber/core_ws.go
if err != nil {
logger.Error(err)
var fac time.Duration
if attempts < 5 {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe these numbers could be constants on top? Applies to the old implementation.

Base automatically changed from runlog-service-refactor-tier-2 to feature/fluxmonitor May 5, 2021 15:46
@aalu1418 aalu1418 force-pushed the runlog-service-refactor-tier-3 branch from 3df499c to f10388c Compare May 5, 2021 19:22
@aalu1418
Copy link
Copy Markdown
Collaborator

aalu1418 commented May 5, 2021

Rebased it to the feature/fluxmonitor branch

Notes: https://stackoverflow.com/questions/41859325/rebase-branch-after-github-squash-and-merge-onto-master

@ebarakos
Copy link
Copy Markdown

@aalu1418 can you merge this along with the core_ws refactor?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants