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

Refractors UrlInterpolationService to not return null at interpolateUrl #13371

Merged
merged 68 commits into from
Jul 15, 2021

Conversation

mridul-netizen
Copy link
Contributor

Overview

  1. This PR fixes or fixes part of #[NA].
  2. This PR does the following: [Refractors UrlInterpolationService to not return null at interpolateUrl]

Essential Checklist

  • The PR title starts with "Fix #bugnum: ", followed by a short, clear summary of the changes. (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • The linter/Karma presubmit checks have passed locally on your machine.
  • "Allow edits from maintainers" is checked. (See here for instructions on how to enable it.)
    • This lets reviewers restart your CircleCI tests for you.
  • The PR is made from a branch that's not called "develop".

PR Pointers

  • Make sure to follow the instructions for making a code change.
  • Oppiabot will notify you when you don't add a PR_CHANGELOG label. If you are unable to do so, please @-mention a code owner (who will be in the Reviewers list), or ask on Gitter.
  • For what code owners will expect, see the Code Owner's wiki page.
  • Make sure your PR follows conventions in the style guide, otherwise this will lead to review delays.
  • Never force push. If you do, your PR will be closed.
  • Oppiabot can assign anyone for review/help if you leave a comment like the following: "{{Question/comment}} @{{reviewer_username}} PTAL"
  • Some of the e2e tests are flaky, and can fail for reasons unrelated to your PR. We are working on fixing this, but in the meantime, if you need to restart the tests, please check the "If your build fails" wiki page.

Copy link
Contributor

@EeshaArif EeshaArif left a comment

Choose a reason for hiding this comment

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

LGTM! Thankyou @mridul-netizen

@oppiabot
Copy link

oppiabot bot commented Jul 11, 2021

Unassigning @EeshaArif since they have already approved the PR.

@oppiabot
Copy link

oppiabot bot commented Jul 11, 2021

Assigning @nithusha21, @DubeySandeep for code owner reviews. Thanks!

@mridul-netizen
Copy link
Contributor Author

@nithusha21 @DubeySandeep PTAL

Copy link
Member

@srijanreddy98 srijanreddy98 left a comment

Choose a reason for hiding this comment

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

LGTM!

@oppiabot
Copy link

oppiabot bot commented Jul 12, 2021

Unassigning @nithusha21 since they have already approved the PR.

Copy link
Member

@DubeySandeep DubeySandeep left a comment

Choose a reason for hiding this comment

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

@mridul-netizen Thanks a lot for this fix, I've left one minor comment, PTAL!

if (!urlTemplate) {
this.alertsService.fatalWarning(
'Invalid or empty URL template passed in: \'' + urlTemplate + '\'');
return null;
Copy link
Member

Choose a reason for hiding this comment

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

Are we expecting to stop the function execution here?

Copy link
Member

Choose a reason for hiding this comment

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

Sorry I missed the above comment.

Copy link
Member

Choose a reason for hiding this comment

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

Can you please add a code comment explaining the same. ALso, can you confirm that we have a unit test to ensure that the function execution stops after line 121?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I updated the comment. Yes, we're expecting an error, particular unit-tests are there for each case. Actually previously when we were not hitting return null statements then coverage was not full
image
Removing them also increased the coverage

@oppiabot
Copy link

oppiabot bot commented Jul 12, 2021

Unassigning @DubeySandeep since the review is done.

@mridul-netizen
Copy link
Contributor Author

@DubeySandeep PTAL!

@oppiabot
Copy link

oppiabot bot commented Jul 15, 2021

Unassigning @DubeySandeep since they have already approved the PR.

@oppiabot oppiabot bot added the PR: LGTM label Jul 15, 2021
@oppiabot
Copy link

oppiabot bot commented Jul 15, 2021

Hi @mridul-netizen, this PR is ready to be merged. Please address any remaining comments prior to merging, and feel free to merge this PR once the CI checks pass and you're happy with it. Thanks!

@mridul-netizen mridul-netizen merged commit 94e42f1 into oppia:develop Jul 15, 2021
@mridul-netizen mridul-netizen deleted the interpolation branch July 15, 2021 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants