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

fix: Local development & add steps in README.md #173

Merged
merged 8 commits into from
Aug 9, 2023

Conversation

morgsmccauley
Copy link
Collaborator

@morgsmccauley morgsmccauley commented Aug 9, 2023

This PR contains various fixes to the local development environment, I've commented inline the reasoning for these changes. On top of this, I've expanded README.md to include steps for setting up.

@morgsmccauley morgsmccauley changed the title fix/local development fix: Local development & add steps in README.md Aug 9, 2023
@morgsmccauley morgsmccauley marked this pull request as ready for review August 9, 2023 08:44
@morgsmccauley morgsmccauley requested a review from a team as a code owner August 9, 2023 08:44
WORKDIR /tmp/
COPY Cargo.toml Cargo.lock ./
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This step caches built dependencies in a docker layer, causing a slower first time build, but faster subsequent builds. We aren't caching docker images in CI, and dev builds don't take too long so this doesn't provide much benefit.

@@ -1,30 +1,16 @@
FROM rust:1.68 AS build

ARG CARGO_BUILD_MODE=release
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Default to release builds, but set to debug when building via the local Docker Compose

@@ -74,13 +74,17 @@ const getMessagesFromStream = async <Message extends Record<string, string>>(
return results?.[0].messages as StreamMessages<Message>;
};

const incrementStreamId = (id: string): string => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

When lastProcessedId was null, this code would generate an invalid ID, causing errors in Redis.

@darunrs
Copy link
Collaborator

darunrs commented Aug 9, 2023

It might also be good to highlight steps for running provisioning to get the databases set up too.

@morgsmccauley
Copy link
Collaborator Author

It might also be good to highlight steps for running provisioning to get the databases set up too.

@darunrs that's no longer required, the indexers will self provision.

@morgsmccauley morgsmccauley merged commit dc69002 into main Aug 9, 2023
3 checks passed
@morgsmccauley morgsmccauley deleted the fix/local-development branch August 9, 2023 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants