Skip to content

Conversation

@evanwave
Copy link
Contributor

Motivation

This PR addresses several areas of improvement in the FunctionStream project:

  1. Namespace Consistency: Updates example configuration files to use the more descriptive function-stream namespace instead of the abbreviated fs namespace, improving clarity and consistency across the project.

  2. Python SDK Enhancement: Significantly enhances the Python SDK (fs-python) with new metadata access capabilities, improved documentation, and better error handling for message processing.

  3. Operator Improvements: Adds code generation capabilities to the operator Makefile for generating client SDKs, improving the development workflow.

  4. Docker Build Enhancement: Adds multi-platform Docker build support for the Python SDK base image.

Modifications

Configuration Updates

  • Example Functions: Updated functions/example-external.yaml and functions/example-functions.yaml to use function-stream namespace and subscription names instead of fs
  • Helm Values: Changed operator image pull policy from IfNotPresent to Always in operator/deploy/chart/values.yaml

Python SDK Enhancements

  • Version Update: Bumped Python SDK version from 0.6.0rc1 to 0.6.0rc2
  • Metadata Support: Added get_metadata() method to FSContext class for accessing message metadata (topic, message_id)
  • Data Production: Added produce() method to FSContext for output stream data production
  • Enhanced Documentation: Significantly improved docstrings throughout the codebase with comprehensive parameter descriptions, return value documentation, and usage examples
  • Improved Error Handling: Enhanced error handling in message processing with better metadata access and validation
  • Code Quality: Added comprehensive unit tests for new functionality and improved existing test coverage

Operator Improvements

  • Code Generation: Added code-generator target to operator Makefile with version v0.32.1
  • Client SDK Generation: Added generate-client target for generating Kubernetes client SDKs using code-generator tools
  • Tool Installation: Integrated client-gen, lister-gen, informer-gen, and deepcopy-gen tools

Docker Build Enhancement

  • Multi-Platform Support: Added docker-buildx target in Python SDK Makefile for building images for both linux/amd64 and linux/arm64 architectures

Testing Improvements

  • Enhanced Test Coverage: Added comprehensive tests for new metadata functionality and context methods
  • Better Test Structure: Improved test organization and mock setup for more reliable testing

These changes improve the overall developer experience, provide better functionality for Python SDK users, and establish more consistent naming conventions across the project.

Signed-off-by: EvanWave <evanwave@unitestream.com>
@evanwave evanwave self-assigned this Aug 12, 2025
@RobertIndie RobertIndie merged commit 20787ec into main Aug 12, 2025
5 checks passed
@RobertIndie RobertIndie deleted the python-doc branch August 12, 2025 14:14
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