Skip to content

Add SDA Workflow#277

Draft
mcopik wants to merge 45 commits intofeature/workflowsfrom
feature/sda-workflow
Draft

Add SDA Workflow#277
mcopik wants to merge 45 commits intofeature/workflowsfrom
feature/sda-workflow

Conversation

@mcopik
Copy link
Collaborator

@mcopik mcopik commented Jan 6, 2026

Tasks to accomplish:

  • Identical configuration for Redis and Memgraph
  • Build instructions for the custom image.

@coderabbitai
Copy link

coderabbitai bot commented Jan 6, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2389bb1a-4aba-4e80-94ab-8a260d33c9c5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/sda-workflow

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

"type": "map",
"array": "astros.people",
"root": "map_astros",
"root": "map",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not sure why this change is necessary - need to check.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I ran into issue trying to run this on AWS since the task name shadows the function name

"memory": 128,
"languages": ["python"],
"modules": ["storage"],
"container-image": "logru/sda-no-db:latest"
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 is good but it would be great if we had a clear path to reproduce these images - @LoloGruber, can you please point me to this Dockerfile? On the main branch, we have now C++ support that gives us a way to add "dependencies" images, and I can integrate that.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I added code to container.py to build an image by injecting aws bootstrap code to a user-defined base image. This is the related Dockerfile for AWS

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I meant the Dockerfile that builds SDA :-) I don't see it in the Dockerfile you linked.

Copy link
Collaborator

Choose a reason for hiding this comment

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

import json
import os

class MemgraphConfig:
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 is a comment for me - we need to integrate it internaly, just like we did with the config for Redis.

"module_packages": {}
"module_packages": {
"storage": [
"boto3"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Interesting - I guess it's a side-effect of using a custom Docker image?

Copy link
Collaborator

Choose a reason for hiding this comment

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

No, this is required to be able to transfer files via upload_func to S3. I think the workflows branch was previously only tested on Azure.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We tested the workflow on all three providers.

I suspect something else: previously, functions were deployed as code packages on AWS (so AWS provides runtime with boto3) or as containers, and these containers inherit from a base image that is AWS-specific and already contains boto3. If we now support a custom container base image that is not AWS-specific, so boto3 is missing.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah okay, that makes sense

],
is_workflow: bool,
) -> Tuple[bool, str, bool, str]:
# Check if custom container image is specified which would collide with container deployment option
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm wondering if it should not be reversed - if the benchmark specified a custom container image, then shouldn't we instead throw an error when non-container (code package) deployment is selected? Because that is a clear contradiction.

Copy link
Collaborator

Choose a reason for hiding this comment

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

You are correct, I didnt want to make any big changes to the code flow of SeBS, but I would also rather deny any other types of deployment if a custom image is specified

Copy link
Collaborator

Choose a reason for hiding this comment

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

I will just remove this check and force a container deployment when a custom image is specified

sebs/aws/aws.py Outdated
f'"{self.config.resources.redis_password}"',
)

assert not (code_package.container_deployment and code_package.benchmark_config.container_image is not None), \
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

As noted in a different comment - I think it should be an error to try to deploy a benchmark with custom image in the "code package" mode (non-container).

Copy link
Collaborator

Choose a reason for hiding this comment

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

As you see in the branching below, for me, it is a third option to deploy a function. Code-Package (Python functions as zip), Container (Python functions within image), User-defined Container (containing the Python functions and SeBS boilerplate code). I wanted to avoid the user using the flag --container-deployment and also specifying a custom base image. If you agree, I think it would be a valid approach to overrule this flag when a custom image is defined

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.

2 participants