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: set taskmaster manifest from FOCA config #206

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Conversation

JaeAeich
Copy link

@JaeAeich JaeAeich commented Sep 5, 2024

Summary by Sourcery

Configure the taskmaster manifest from FOCA configuration by adding new methods to retrieve custom configurations and taskmaster templates. Enhance the configuration model to include taskmaster-specific properties, enabling more flexible and dynamic taskmaster setup.

New Features:

  • Introduce the ability to configure the taskmaster manifest using FOCA configuration, allowing for dynamic setup of taskmaster properties.

Enhancements:

  • Add a new custom configuration model for taskmaster environment properties, including image details, FTP settings, and executor secret configuration.

Copy link

sourcery-ai bot commented Sep 5, 2024

Reviewer's Guide by Sourcery

This pull request configures the taskmaster manifest from the FOCA configuration. It introduces new utility functions to handle custom configurations and creates a taskmaster template based on these configurations. The changes primarily affect the tesk/utils.py and tesk/custom_config.py files, with additional updates to the deployment/config.yaml file.

File-Level Changes

Change Details Files
Introduced new utility functions for handling custom configurations
  • Added get_custom_config() function to retrieve custom configuration from FOCA config file
  • Created get_taskmaster_template() function to generate a V1Job template for taskmaster
  • Implemented get_taskmaster_env_property() function to get taskmaster environment properties
tesk/utils.py
Extended custom configuration model with new classes and fields
  • Added FtpConfig class for FTP configuration
  • Created ExecutorSecret class for executor secret configuration
  • Implemented Taskmaster class for taskmaster environment properties
  • Updated CustomConfig class to include taskmaster field
tesk/custom_config.py
Updated deployment configuration with taskmaster settings
  • Added taskmaster image and version configuration
  • Included filer image and version settings
  • Added FTP configuration options
  • Included debug mode and environment variable settings
  • Added service account name for taskmaster
deployment/config.yaml
Imported necessary Kubernetes client models and TESK constants
  • Added imports for Kubernetes client models (V1Container, V1EnvVar, etc.)
  • Imported TESK-specific constants and custom configuration classes
tesk/utils.py

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @JaeAeich - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 2 issues found
  • 🟡 Security: 1 issue found
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

tesk/utils.py Show resolved Hide resolved
tesk/custom_config.py Show resolved Hide resolved
deployment/config.yaml Show resolved Hide resolved
tesk/utils.py Outdated Show resolved Hide resolved
Copy link

codecov bot commented Sep 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.21%. Comparing base (5d385ba) to head (2ac6959).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #206   +/-   ##
=======================================
  Coverage   98.21%   98.21%           
=======================================
  Files           8        8           
  Lines         561      561           
=======================================
  Hits          551      551           
  Misses         10       10           
Flag Coverage Δ
test_unit 98.21% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@jemaltahir jemaltahir left a comment

Choose a reason for hiding this comment

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

Could you look into the hard coded fields. Otherwise the code looks great :)

tesk/utils.py Outdated Show resolved Hide resolved
tesk/utils.py Show resolved Hide resolved
tesk/utils.py Show resolved Hide resolved
tesk/utils.py Show resolved Hide resolved
@JaeAeich
Copy link
Author

JaeAeich commented Sep 9, 2024

@jemaltahir The constants are coming from here, and they aren't used anywhere else, do you think I should still change it?

@uniqueg uniqueg changed the title feat: configure taskmaster manifest from FOCA config feat: set taskmaster manifest from FOCA config Sep 10, 2024
tesk/custom_config.py Outdated Show resolved Hide resolved
tesk/custom_config.py Outdated Show resolved Hide resolved
tesk/custom_config.py Outdated Show resolved Hide resolved
tesk/custom_config.py Outdated Show resolved Hide resolved
tesk/utils.py Outdated Show resolved Hide resolved
tesk/utils.py Outdated Show resolved Hide resolved
tesk/utils.py Outdated Show resolved Hide resolved
tesk/utils.py Show resolved Hide resolved
tesk/utils.py Show resolved Hide resolved
tesk/utils.py Show resolved Hide resolved
@uniqueg uniqueg mentioned this pull request Sep 10, 2024
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.

4 participants