Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

e2e-tests: Add filtered indexer e2e tests #1503

Merged
merged 5 commits into from
Mar 15, 2023

Conversation

Eric-Warehime
Copy link
Contributor

Summary

Adds an e2e test which uses a conduit writer pipeline w/ a filter processor.

Uses docker-compose w/ a conduit writer, an e2e reader w/ queries, and a pgsql db.

Followup steps: working on separating these tests into conduit and indexer.

Test Plan

make e2e-filter-test-nightly

@Eric-Warehime Eric-Warehime added the Enhancement New feature or request label Mar 10, 2023
tempdir = tempfile.mkdtemp()
if not args.keep_temps:
atexit.register(shutil.rmtree, tempdir, onerror=logger.error)
else:
logger.info("leaving temp dir %r", tempdir)
# Sane default for lastblock--used for read_only runs
lastblock = 93
Copy link
Contributor

Choose a reason for hiding this comment

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

why the lastblock 93?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The e2e test data currently contains 93 rounds. Usually we get this via reading the e2e data to see how many rounds we should expect to process. But in this case our read-only indexer will be in a separate container from the algod/e2e test data so we have no source of truth.

To resolve that I've just defaulted this to 93--it still gets overwritten by the lastblock value in regular e2elive.py runs.

algoddir = None
if not args.read_only:
tempnet, lastblock = setup_algod(tempdir, args.source_net, args.s3_source_net)
algoddir = os.path.join(tempnet, "Node")
Copy link
Contributor

Choose a reason for hiding this comment

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

can these be in the else block starting at line 106?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Probably, let me try to move it around.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

RUN mkdir -p /opt/go/indexer
RUN mkdir -p /opt/conduit-dir
RUN mkdir -p /opt/algod-dir
COPY . /opt/go/indexer
Copy link
Contributor

Choose a reason for hiding this comment

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

we'll be removing conduit from this repo? should we download the conduit repo instead?

Copy link
Contributor Author

@Eric-Warehime Eric-Warehime Mar 14, 2023

Choose a reason for hiding this comment

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

Yes, but when I wrote this the conduit repo didn't exist/didn't have a buildable binary.

We can either wait until everything is ready (which maybe it is now?) and update this or just do this in a followup commit.

I think I prefer following up on this in the future. For example, this PR #1505 is failing on this same issues and would force me to make this change as well.

@Eric-Warehime Eric-Warehime merged commit 68495ae into algorand:develop Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants