Skip to content

feat: set taskmaster manifest from FOCA config#206

Merged
JaeAeich merged 9 commits into
mainfrom
template
Oct 13, 2024
Merged

feat: set taskmaster manifest from FOCA config#206
JaeAeich merged 9 commits into
mainfrom
template

Conversation

@JaeAeich

@JaeAeich JaeAeich commented Sep 5, 2024

Copy link
Copy Markdown

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.

@sourcery-ai

sourcery-ai Bot commented Sep 5, 2024

Copy link
Copy Markdown
Contributor

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.

@JaeAeich JaeAeich requested a review from uniqueg September 5, 2024 18:15

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread tesk/utils.py
Comment thread tesk/custom_config.py
Comment thread deployment/config.yaml
Comment thread tesk/utils.py Outdated
@codecov

codecov Bot commented Sep 5, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.21%. Comparing base (5d385ba) to head (2ac6959).
Report is 1 commits behind head on main.

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.

@jemaltahir jemaltahir left a comment

Copy link
Copy Markdown

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 :)

Comment thread tesk/utils.py Outdated
Comment thread tesk/utils.py
Comment thread tesk/utils.py
Comment thread tesk/utils.py
@JaeAeich

JaeAeich commented Sep 9, 2024

Copy link
Copy Markdown
Author

@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
Comment thread tesk/custom_config.py Outdated
Comment thread tesk/custom_config.py Outdated
Comment thread tesk/custom_config.py Outdated
Comment thread tesk/custom_config.py Outdated
Comment thread tesk/utils.py Outdated
Comment thread tesk/utils.py Outdated
Comment thread tesk/utils.py Outdated
Comment thread tesk/utils.py
Comment thread tesk/utils.py
Comment thread tesk/utils.py
@uniqueg uniqueg mentioned this pull request Sep 10, 2024
@JaeAeich JaeAeich requested a review from uniqueg September 10, 2024 18:33

@uniqueg uniqueg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me. Ideally, I would have liked to see some abstraction over the FTP stuff, but let's move forward now and figure that out some other time.

@uniqueg uniqueg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Clicked the wrong button, apologies. Approved now.

@JaeAeich JaeAeich merged commit a3e2cc2 into main Oct 13, 2024
@JaeAeich JaeAeich deleted the template branch October 13, 2024 17:09
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