-
Notifications
You must be signed in to change notification settings - Fork 669
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
Update verify scripts to use the generation scripts directly #982
Update verify scripts to use the generation scripts directly #982
Conversation
ping @spike-liu, are you able to check |
Yes, of course. Let me do some research. |
@damemi Yes, you are right. Previously replacing . with ${PRJ_PREFIX} in find_dirs_containing_comment_tags is for the consistency with the original hardcode. Verified in local test, this line could be removed safely and verify-deep-copies.sh could be run successfully within this PR as below: As for the issue in #976, I found some golang files under _tmp folder generated in verify-xxx.sh would be found mistakenly by find_dirs_containing_comment_tags(). However we could fix with excluding _tmp folders as below: Please feel free to let me know if PR was needed. |
@spike-liu thanks for debugging this! yes, if you wouldn't mind opening a PR with your fixes it would be really helpful |
Done with #988 Please feel free to review. |
/cc @knelasevero |
Nice! This have been bugging me for some time. Great stuff /lgtm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: damemi The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
In #958 we are noticing odd behavior with the
verify
tools for our generator scripts, specifically conversions. CI is failing to verify the conversion-gen saying there are changes missing. But, running these generators on some local environments (and containers) produces no diff, while other environments do produce the generated output that the tests are expecting.96c03a3 and 2b1746c update the generator scripts (deepcopies, conversion, and defaulters) to dynamically parse which files to run on using the function
find_dirs_containing_comment_tags
. But, it didn't update the verify scripts to parse similarly (they are still hardcoded).Updating the verify scripts to call the generators directly is a good idea to keep our generators and changes in line. Doing so fixed the verify failures (at least for me locally). But, I don't know if this is actually fixing it, or if there is a bug in the new generator command with
find_dirs_containing_comment_tags
and this is just copying the bug over to the verify scripts as well.What looks suspicious to me is this line which replaces
.
in the path names with${PRJ_PREFIX}
. So on my local for example, the output of this function for conversion-gen is:as opposed to
This stands out because
verify-conversions.sh
specifically currently has the latter as its input dirs. But, the generator is using the former as its input dirs.The fact that this shows up differently on different environments makes me think it may be an issue with how
PRJ_PREFIX
is parsed. Maybe similar to #313. Marking this WIP for now to continue work on itSee also a similar weird output from the deepcopy script in #976 (comment)