Skip to content

fix: go 1.22 test breakage#3459

Merged
gmlewis merged 1 commit intogoogle:masterfrom
amanv8060:fix-test
Feb 6, 2025
Merged

fix: go 1.22 test breakage#3459
gmlewis merged 1 commit intogoogle:masterfrom
amanv8060:fix-test

Conversation

@amanv8060
Copy link
Copy Markdown
Contributor

Use correct url escaping to fix the errors caused by mux changes.

Fixes: #3409

@amanv8060
Copy link
Copy Markdown
Contributor Author

@gmlewis could you please approve actions test to see if all works correctly?

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.03%. Comparing base (d392e2c) to head (927eeeb).
Report is 6 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3459   +/-   ##
=======================================
  Coverage   91.03%   91.03%           
=======================================
  Files         179      179           
  Lines       15535    15535           
=======================================
  Hits        14142    14142           
  Misses       1221     1221           
  Partials      172      172           

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

@gmlewis
Copy link
Copy Markdown
Collaborator

gmlewis commented Feb 5, 2025

@gmlewis could you please approve actions test to see if all works correctly?

Yes, however we don't want to remove problematic (but valid) branch names from the unit tests (as you have done in this PR)...
Instead, we want to fix the testing mux harness to properly handle all the problematic branch names.
Does that make sense?

@gmlewis gmlewis added the DO NOT MERGE Do not merge this PR. label Feb 5, 2025
@amanv8060
Copy link
Copy Markdown
Contributor Author

Yes, however we don't want to remove problematic (but valid) branch names from the unit tests (as you have done in this PR)... Instead, we want to fix the testing mux harness to properly handle all the problematic branch names. Does that make sense?

I am not sure if I get what you're saying, I haven't really removed any branch names, instead in the mux urls(the one's to be called) by api, I have just Path escaped them, github also does this, for eg,

This would go like this:

https://github.com/flutter/engine/compare/commit-list?range=main...shorebirdtech%3Aengine%3Ashorebird%2Fdev

Also see, tests in net/http.

IMO, one thing that could be done better here is,to create a util function of sort that would take the branch name and path escape them before adding it to mux route.

@gmlewis gmlewis added NeedsReview PR is awaiting a review before merging. and removed DO NOT MERGE Do not merge this PR. labels Feb 5, 2025
@gmlewis
Copy link
Copy Markdown
Collaborator

gmlewis commented Feb 5, 2025

I am not sure if I get what you're saying, I haven't really removed any branch names, instead in the mux urls(the one's to be called) by api, I have just Path escaped them

Ah! I see now what you are saying, @amanv8060. I apologize for the confusion I caused.

Yes, a utility function would help tremendously, I would think, and make it clearer what is happening.

Would you mind doing that as part of this PR?

@amanv8060
Copy link
Copy Markdown
Contributor Author

I would prefer to do that in seperate pr so that review becomes easier.

Copy link
Copy Markdown
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

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

Thank you, @amanv8060 !
LGTM.

Awaiting second LGTM+Approval from any other contributor to this repo before merging.

@stevehipwell - might you have time for a code review? Thanks!

Copy link
Copy Markdown
Contributor

@stevehipwell stevehipwell left a comment

Choose a reason for hiding this comment

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

LGTM

@gmlewis
Copy link
Copy Markdown
Collaborator

gmlewis commented Feb 6, 2025

Thank you, @stevehipwell and @alexandear !
Merging.

@gmlewis gmlewis removed the NeedsReview PR is awaiting a review before merging. label Feb 6, 2025
@gmlewis gmlewis merged commit 0ccbfaf into google:master Feb 6, 2025
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.

Update unit tests so that GODEBUG=httpmuxgo121=1 is not required

4 participants