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(http): include transferCache when cloning HttpRequest #54939

Conversation

mlz11
Copy link
Contributor

@mlz11 mlz11 commented Mar 19, 2024

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Fixes #54924.

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@pullapprove pullapprove bot requested a review from dylhunn March 19, 2024 07:54
@mlz11 mlz11 force-pushed the include-transferCache-in-http-request-clone-method branch from b07fbb4 to f829824 Compare March 19, 2024 07:58
@mlz11 mlz11 force-pushed the include-transferCache-in-http-request-clone-method branch 4 times, most recently from 6b9a647 to 12b50df Compare March 19, 2024 08:24
Copy link
Contributor

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

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

Thanks for this.

Can you please update the commit message scope from common to http?

@alan-agius4 alan-agius4 added area: common/http target: patch This PR is targeted for the next patch release server: http cache labels Mar 19, 2024
@ngbot ngbot bot added this to the Backlog milestone Mar 19, 2024
@alan-agius4 alan-agius4 added the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Mar 19, 2024
@mlz11 mlz11 force-pushed the include-transferCache-in-http-request-clone-method branch from 12b50df to 6f244fc Compare March 19, 2024 10:25
@mlz11
Copy link
Contributor Author

mlz11 commented Mar 19, 2024

Thanks for this.

Can you please update the commit message scope from common to http?

Thanks @alan-agius4 for the quick review 🙂
Of course, done ✅

@mlz11 mlz11 force-pushed the include-transferCache-in-http-request-clone-method branch from 6f244fc to 8a90bb8 Compare March 19, 2024 10:30
Copy link
Contributor

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for your contribution

@alan-agius4 alan-agius4 removed the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Mar 19, 2024
@alan-agius4
Copy link
Contributor

Can you please run update the golden files via yarn bazel run //packages/common:common_api.accept?

Fixes a bug where HttpRequest.clone() does not include the transferCache property.

Fixes angular#54924.
Refactor how boolean options are handled in HttpRequest.clone() method by using nullish coalescing operator
@mlz11 mlz11 force-pushed the include-transferCache-in-http-request-clone-method branch from 8a90bb8 to 89e3d25 Compare March 19, 2024 10:56
@mlz11
Copy link
Contributor Author

mlz11 commented Mar 19, 2024

Can you please run update the golden files via yarn bazel run //packages/common:common_api.accept?

Of course, done ✅
I was wondering why tests were failing 😅

@@ -479,6 +482,10 @@ export class HttpRequest<T> {
const url = update.url || this.url;
const responseType = update.responseType || this.responseType;

// Carefully handle the transferCache to differentiate between
// `false` and `undefined` in the update args.
Copy link

Choose a reason for hiding this comment

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

now it also handles null so mayby add that to comment : undefined or null here and in other places that were edited. Also why not add move this logic together with withCredentials and reportProgress? becouse now
this comment is duplicated in lines 485 and 495

@alan-agius4 alan-agius4 added the action: review The PR is still awaiting reviews from at least one requested reviewer label Mar 19, 2024
@mlz11 mlz11 changed the title fix(common): include transferCache when cloning HttpRequest fix(hhtp): include transferCache when cloning HttpRequest Mar 19, 2024
@mlz11 mlz11 changed the title fix(hhtp): include transferCache when cloning HttpRequest fix(http): include transferCache when cloning HttpRequest Mar 19, 2024
@alan-agius4 alan-agius4 removed the request for review from dylhunn March 19, 2024 17:26
@alan-agius4 alan-agius4 requested review from AndrewKushnir and removed request for alan-agius4 March 19, 2024 17:26
Copy link
Contributor

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

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

LGTM

@AndrewKushnir AndrewKushnir removed the action: review The PR is still awaiting reviews from at least one requested reviewer label Mar 19, 2024
@alan-agius4 alan-agius4 added the action: merge The PR is ready for merge by the caretaker label Mar 19, 2024
Copy link
Contributor

@dylhunn dylhunn left a comment

Choose a reason for hiding this comment

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

reviewed-for: public-api

Copy link
Contributor

@jessicajaniuk jessicajaniuk left a comment

Choose a reason for hiding this comment

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

reviewed-for: public-api

Copy link
Contributor

@atscott atscott left a comment

Choose a reason for hiding this comment

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

reviewed-for: public-api

@dylhunn
Copy link
Contributor

dylhunn commented Mar 22, 2024

This PR was merged into the repository by commit b80434a.

@dylhunn dylhunn closed this in cf73983 Mar 22, 2024
dylhunn pushed a commit that referenced this pull request Mar 22, 2024
#54939)

Refactor how boolean options are handled in HttpRequest.clone() method by using nullish coalescing operator

PR Close #54939
dylhunn pushed a commit that referenced this pull request Mar 22, 2024
Fixes a bug where HttpRequest.clone() does not include the transferCache property.

Fixes #54924.

PR Close #54939
dylhunn pushed a commit that referenced this pull request Mar 22, 2024
#54939)

Refactor how boolean options are handled in HttpRequest.clone() method by using nullish coalescing operator

PR Close #54939
ilirbeqirii pushed a commit to ilirbeqirii/angular that referenced this pull request Apr 6, 2024
)

Fixes a bug where HttpRequest.clone() does not include the transferCache property.

Fixes angular#54924.

PR Close angular#54939
ilirbeqirii pushed a commit to ilirbeqirii/angular that referenced this pull request Apr 6, 2024
angular#54939)

Refactor how boolean options are handled in HttpRequest.clone() method by using nullish coalescing operator

PR Close angular#54939
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Apr 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: common/http server: http cache target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HttpRequest.clone forgets transferCache
7 participants