Skip to content

Refactor code and fix issues#77

Open
mohamed-rafraf wants to merge 9 commits intoforge-build:mainfrom
mohamed-rafraf:refactor
Open

Refactor code and fix issues#77
mohamed-rafraf wants to merge 9 commits intoforge-build:mainfrom
mohamed-rafraf:refactor

Conversation

@mohamed-rafraf
Copy link
Copy Markdown

What This PR Fixes:

  • Secret Update Issue: Fixes the EnsureCredentialsSecret function to update an existing Kubernetes secret correctly. Previously, once a secret was created, it was not updated even if the function was invoked multiple times.
  • Unnecessary Reconciliation: Skips unnecessary reconciliation steps for provisioners and connection checks if the build is already completed and the associated infrastructure has been cleaned up. This prevents redundant operations and improves efficiency.
  • Removed Unnecessary Logic: Removes the reconcileImageProvided function. Image build events are now triggered by provider extensions once the provisionerReady status is set to true, making the logic redundant.

Refactoring and Code Structure Improvements:

This PR also includes a significant refactoring of the codebase inspired by patterns observed in well-known open-source projects. Key improvements include:

  • Modular Code Organization: The code structure has been reorganized into clear, logical modules, making it easier to navigate and maintain.
  • Dedicated Logging Package: A custom logging package has been introduced. This logging package standardizes log messages and provides consistent logging capabilities across the core controller and provider extensions.

These changes are aimed at enhancing the overall readability, maintainability, and scalability of the codebase while ensuring adherence to industry best practices.

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.

1 participant