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

feat: Upgrade to bacalhau 1.6 #441

Merged
merged 22 commits into from
Jan 10, 2025
Merged

feat: Upgrade to bacalhau 1.6 #441

merged 22 commits into from
Jan 10, 2025

Conversation

kelindi
Copy link
Contributor

@kelindi kelindi commented Nov 15, 2024

Summary

This pull request makes the following changes:

  • Upgrades Bacalhau to 1.6
  • Job Translator to support current lilypadspec
  • Removes Bacalhau cli usage and switches to API
  • Removes IPFS dependancy

Important Changes and Notes for clean up

  1. The RP polls bacalhau every 10 seconds to see if a job has been completed, we can change the frequency of this later on to improve the speed of jobs

Task/Issue reference

Test plan

  • Integration tests should pass (running ./stack integration-tests)
  • Jobs should run normally

You can also verify the output recieved using the following:

ipfs add -nQr /tmp/lilypad/data/downloaded-files/<DEALID> (using the output path from the CLI). The resulting CID should match the DataID provided by the CLI. See:

Screenshot 2025-01-09 at 14 55 40

@kelindi kelindi self-assigned this Nov 15, 2024
@kelindi kelindi requested a review from a team as a code owner November 15, 2024 18:27
@cla-bot cla-bot bot added the cla-signed label Nov 15, 2024
@kelindi kelindi changed the title Bacalhau 1.5 Update Bacalhau 1.5 Upgrade Nov 15, 2024
@kelindi kelindi changed the title Bacalhau 1.5 Upgrade [Feat] Upgrade to bacalhau 1.5 Nov 15, 2024
Copy link
Collaborator

@walkah walkah left a comment

Choose a reason for hiding this comment

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

This is a good start. let's get it rebased and cleaned up. lots of questions above

pkg/executor/bacalhau/bacalhau.go Outdated Show resolved Hide resolved
pkg/executor/bacalhau/bacalhau.go Outdated Show resolved Hide resolved
pkg/executor/bacalhau/bacalhau.go Outdated Show resolved Hide resolved
pkg/executor/bacalhau/bacalhau.go Outdated Show resolved Hide resolved
pkg/executor/bacalhau/bacalhau.go Outdated Show resolved Hide resolved
pkg/executor/bacalhau/client.go Show resolved Hide resolved
pkg/jobcreator/onchain_jobcreator.go Outdated Show resolved Hide resolved
pkg/solver/client.go Outdated Show resolved Hide resolved
pkg/system/log.go Outdated Show resolved Hide resolved
stack Outdated Show resolved Hide resolved
@walkah walkah changed the title [Feat] Upgrade to bacalhau 1.5 feat: Upgrade to bacalhau 1.5 Dec 5, 2024
@walkah walkah force-pushed the bacalhau-upgrade branch 2 times, most recently from d460bbf to 0406e23 Compare December 11, 2024 20:35
@walkah walkah changed the title feat: Upgrade to bacalhau 1.5 feat: Upgrade to bacalhau 1.6 Jan 9, 2025
@walkah walkah self-requested a review January 9, 2025 19:18
Comment on lines +53 to +67
- name: Start solver
run: |
./stack solver --disable-telemetry=true --api-host="" > solver.log &
sleep 5

- name: Display resource provider logs
run: docker logs resource-provider
- name: Run solver integration tests
run: ./stack integration-tests-solver

- name: Start resource provider
run: |
./stack resource-provider --disable-telemetry=true --api-host="" > resource-provider.log &
sleep 5

- name: Run main integration tests
run: ./stack integration-tests
Copy link
Collaborator

Choose a reason for hiding this comment

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

This staged set of integration tests allows us to run solver tests without having resource offers being added by an RP. This will be important for #462 e.g.

Comment on lines -36 to -42
# Install Bacalhau
RUN cd /tmp && \
wget https://github.com/bacalhau-project/bacalhau/releases/download/v1.3.2/bacalhau_v1.3.2_linux_amd64.tar.gz && \
tar xfv bacalhau_v1.3.2_linux_amd64.tar.gz && \
mv bacalhau /usr/local/bin/bacalhau && \
rm bacalhau_v1.3.2_linux_amd64.tar.gz

Copy link
Collaborator

Choose a reason for hiding this comment

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

Using the http API means we no longer need to also have the bacalhau CLI installed here

@@ -17,8 +17,8 @@ RUN mkdir -pm755 /etc/apt/keyrings && curl -o /etc/apt/keyrings/docker.asc -fsSL
RUN nvidia-ctk runtime configure --runtime=docker --set-as-default

# Install Bacalhau
ADD https://github.com/bacalhau-project/bacalhau/releases/download/v1.3.2/bacalhau_v1.3.2_linux_amd64.tar.gz .
RUN tar xfv bacalhau_v1.3.2_linux_amd64.tar.gz
ADD https://github.com/bacalhau-project/bacalhau/releases/download/v1.6.0/bacalhau_v1.6.0_linux_amd64.tar.gz .
Copy link
Contributor

Choose a reason for hiding this comment

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

🎉

@@ -1,4 +1,4 @@
//go:build integration
//go:build integration && solver
Copy link
Contributor

Choose a reason for hiding this comment

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

🙌

@@ -51,6 +51,7 @@ func SetupLogging() {
logLevel = parsedLogLevel
}
zerolog.CallerSkipFrameCount = 3 // Skip 3 frames (this function, log.Output, log.Logger)
zerolog.SetGlobalLevel(logLevel)
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh yeah that 😁

Copy link
Contributor

@bgins bgins left a comment

Choose a reason for hiding this comment

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

Looks great! Excellent work here @kelindi and @walkah ❤️

@walkah walkah merged commit 94d7812 into main Jan 10, 2025
4 checks passed
@walkah walkah deleted the bacalhau-upgrade branch January 10, 2025 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Bacalhau to use RPC interface (instead of shell commands)
3 participants