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

Fix: excluding files from unneededGoFiles was not working #120

Merged
merged 6 commits into from
Dec 12, 2023
Merged

Fix: excluding files from unneededGoFiles was not working #120

merged 6 commits into from
Dec 12, 2023

Conversation

shamil
Copy link
Contributor

@shamil shamil commented Nov 9, 2023

Bug

files in unneededGoFiles were not excluded.

Bug Description

unneededGoFiles string set contain files which are relative to the import path (kubernetes/*), while the paths of generated files are relative to pkg.Name (crds/*). This PR makes sure to use a proper path when comparing files in unneededGoFiles.

@shamil
Copy link
Contributor Author

shamil commented Nov 9, 2023

Seems similar to #77 with a bit different approach to preserve current directory structure

@shamil
Copy link
Contributor Author

shamil commented Dec 12, 2023

@mjeffryes can you also look at this PR?

Copy link
Member

@mjeffryes mjeffryes left a comment

Choose a reason for hiding this comment

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

Thanks @shamil! This change looks good, but could you please add a test that checks the unneededGoFiles are removed so we can catch if it regresses?

@shamil
Copy link
Contributor Author

shamil commented Dec 12, 2023

@mjeffryes I added the requested test in fcd5520

One caveat, since in this project the tests are separated from the actual code, I had to export the UnneededGoFiles variable in order to be able to use it in the test.

Let me know if anything else needed.
Thanks

Copy link
Member

@mjeffryes mjeffryes left a comment

Choose a reason for hiding this comment

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

Thanks that looks great!

@mjeffryes mjeffryes merged commit d89eeaf into pulumi:master Dec 12, 2023
1 check passed
@shamil shamil deleted the uneeded_go_files_fix branch December 12, 2023 18:56
@shamil
Copy link
Contributor Author

shamil commented Dec 12, 2023

@mjeffryes thanks a lot for quick review. When should we expect a new release?

@mjeffryes
Copy link
Member

I've just kicked off a release build here: https://github.com/pulumi/crd2pulumi/actions/runs/7186377517

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