Skip to content

Add support to skip quota#42

Merged
estevao90 merged 7 commits intomainfrom
support-skip-quota
May 12, 2025
Merged

Add support to skip quota#42
estevao90 merged 7 commits intomainfrom
support-skip-quota

Conversation

@estevao90
Copy link
Copy Markdown
Contributor

No description provided.

@estevao90 estevao90 requested a review from Copilot May 7, 2025 23:27
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for skipping the resource quota deployment by introducing a new boolean flag. The changes incorporate the new flag in the deployment data structure, update the repository rules YAML configuration, and propagate the flag into the deployment environment generation.

  • Added a new field "SkipQuotaDeploy" to relevant structures.
  • Updated the generation of Kubernetes environment files to conditionally skip quota deployment.
  • Mapped the new field appropriately in the deployment environment.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/infra/structure.go Added the "SkipQuotaDeploy" field and updated quota template rendering logic.
src/entities/reporules.go Introduced the YAML field "skip-quota-deploy" in repository rules.
src/entities/deployenv.go Mapped the new flag from GitOps rules to the deployment data.
Comments suppressed due to low confidence (2)

src/infra/structure.go:132

  • Please ensure that tests verify that the quota template is not processed when 'SkipQuotaDeploy' is set to true.
+	if !d.SkipQuotaDeploy {

src/entities/deployenv.go:149

  • [nitpick] Verify that this data mapping for 'SkipQuotaDeploy' aligns with expected behavior, particularly if 'ResourcesQuotas' might be nil in any scenarios.
+			SkipQuotaDeploy:  d.Repository.GitOpsRules.SkipQuotaDeploy,

Comment thread src/infra/structure.go
@codecov
Copy link
Copy Markdown

codecov Bot commented May 8, 2025

Codecov Report

Attention: Patch coverage is 11.11111% with 16 lines in your changes missing coverage. Please review.

Project coverage is 25.74%. Comparing base (5c414b9) to head (1195435).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/infra/structure.go 0.00% 9 Missing ⚠️
src/entities/deployenv.go 0.00% 5 Missing ⚠️
src/infra/datagenerator.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #42      +/-   ##
==========================================
- Coverage   25.81%   25.74%   -0.08%     
==========================================
  Files          18       18              
  Lines        1069     1080      +11     
==========================================
+ Hits          276      278       +2     
- Misses        781      790       +9     
  Partials       12       12              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@estevao90 estevao90 merged commit a978718 into main May 12, 2025
3 checks passed
@estevao90 estevao90 deleted the support-skip-quota branch May 12, 2025 21:37
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