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

Adding GetManifestFiles() and refactoring #346

Merged
merged 8 commits into from
Jul 29, 2024

Conversation

manasachi
Copy link
Contributor

@manasachi manasachi commented Jul 24, 2024

Description

  • Added GetManifestFiles function which gets a list of ManifestFiles based on whether given path is a Helm or Kustomize Directory/file, a dir of manifest files, or path to a single manifest file. Note: The existing GetManifestFiles function is renamed to GetManifestFilesFromDir(), so no breaking changes can be introduced in validate.go
  • Removes those existing checks from validate.go run().
  • Tests will be improved once ManifestFile struct Path property is updated to hold file content as []byte

Fixes # (issue)
Feature # (details)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Refactor

How Has This Been Tested?

Tested that validate.go does not break with removing code from run(). Added separate test cases for GetManifestFiles()

  • Test A
  • Test B

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@manasachi manasachi changed the title cherry-picked last changes, pushing new Adding GetManifestFiles() and refactoring Jul 24, 2024
@manasachi manasachi changed the base branch from main to staging-safeguards July 24, 2024 19:28
@manasachi manasachi closed this Jul 24, 2024
@manasachi manasachi reopened this Jul 24, 2024
@manasachi manasachi force-pushed the mchinta/getmanifestfiles branch from 2acbef3 to 8048731 Compare July 25, 2024 13:01
Copy link
Member

@NickKeller NickKeller left a comment

Choose a reason for hiding this comment

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

Looks good - but can you change the import alias to something more descriptive than just h?

@manasachi manasachi removed the request for review from davidgamero July 29, 2024 17:58
@manasachi manasachi merged commit f3489e3 into staging-safeguards Jul 29, 2024
2 checks passed
@manasachi manasachi deleted the mchinta/getmanifestfiles branch July 29, 2024 17:58
This was referenced Aug 12, 2024
manasachi added a commit that referenced this pull request Oct 7, 2024
Signed-off-by: Manasa Chinta <manasachinta7@gmail.com>
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