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

chore: Refactor file resolving #1

Merged

Conversation

c-pius
Copy link
Owner

@c-pius c-pius commented Oct 18, 2024

Description

Changes proposed in this pull request:

  • addresses feat: Generate .spec.resources kyma-project/modulectl#73 (comment)
  • we separate URL to tmp file resolving to a separate class that can be reused for both manifest and defaultCR
  • reading of defaultCR data moved out of moduleconfig_reader (separation of concerns, and we already have a specialized FileReader service doing that)
  • now we have a clean moduleconfig_reader (is only reading and validating the user provided module config, doesn't change the inputs)

Related issue(s)

return file, nil
}

if !filepath.IsAbs(file) {
Copy link

Choose a reason for hiding this comment

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

Do we agree to only take remote link as input but not file anymore?

link must be a valid web URL (http* and not file://)

Then is this filepath code still in use?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Right now it is. I would do a separate PR to deprecate it to make this change more explicit. Also we need to double check if we should do the same in other places (right now we used it at least for manifest and defaultCR).

Copy link

Choose a reason for hiding this comment

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

I doubt we use it elsewhere, but I'm fine covering this in another PR or even an issue. tbh, I'm not so confident that I can remember this comment after it merged. 😄

@c-pius c-pius merged commit ec78003 into feat/support-module-config-resources Oct 21, 2024
3 checks passed
@c-pius c-pius deleted the chore/refactor-file-resolving branch October 21, 2024 11:26
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