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

Use faster devtools in webpack #10228

Merged
merged 15 commits into from Aug 16, 2020
Merged

Use faster devtools in webpack #10228

merged 15 commits into from Aug 16, 2020

Conversation

nishantwrp
Copy link
Contributor

@nishantwrp nishantwrp commented Aug 9, 2020

Overview

  1. This PR fixes or fixes part of #[fill_in_number_here].
  2. This PR does the following: Use faster devtools in webpack

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

  • 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
Copy link

oppiabot bot commented Aug 9, 2020

Hi, @nishantwrp, this pull request does not have a "CHANGELOG: ..." label as mentioned in the PR checkbox list. Please add this label. PRs without this label will not be merged. If you are unsure of which label to add, please ask the reviewers for guidance. Thanks!

@oppiabot
Copy link

oppiabot bot commented Aug 9, 2020

Assigning @vojtechjelinek for the first-pass review of this pull request. Thanks!

@nishantwrp
Copy link
Contributor Author

nishantwrp commented Aug 9, 2020

Older devtools for source maps can be used by --source_maps flag in start and e2e tests script.

Copy link
Member

@vojtechjelinek vojtechjelinek left a comment

Thanks! Few comments.

scripts/run_e2e_tests.py Outdated Show resolved Hide resolved
scripts/run_e2e_tests.py Outdated Show resolved Hide resolved
@@ -107,7 +107,7 @@ def main():
atexit.register(cleanup)

python_utils.PRINT('Building files in production mode.')
build.main(args=['--prod_env'])
build.main(args=['--prod_env', '--source_maps'])
Copy link
Member

@vojtechjelinek vojtechjelinek Aug 10, 2020

Choose a reason for hiding this comment

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

I think we do not need --source_maps here.

Copy link
Contributor Author

@nishantwrp nishantwrp Aug 12, 2020

Choose a reason for hiding this comment

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

I did because i want atleast one ci check to have the --source_maps in prod_env to check if there are no issues when deploying.

Copy link
Member

@vojtechjelinek vojtechjelinek Aug 13, 2020

Choose a reason for hiding this comment

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

Hmmm, okay, but I would prefer if you used some e2e test and also this needs to be documented.

Copy link
Contributor Author

@nishantwrp nishantwrp Aug 13, 2020

Choose a reason for hiding this comment

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

Are you talking about this flag to be documented? Then please tell me which wiki page to document this. (I couldn't find any suitable page). Also I'll mail oppia-dev about it once it's merged.

Copy link
Contributor Author

@nishantwrp nishantwrp Aug 13, 2020

Choose a reason for hiding this comment

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

Also, I think we can keep this in the lighthouse checks itself given that there is already a special config for terser in e2e tests.

Copy link
Member

@vojtechjelinek vojtechjelinek Aug 13, 2020

Choose a reason for hiding this comment

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

Sorry, I meant to have a comment in the code explaining why we use the flag here since if it is not really needed for the tests I can imagine someone refactoring the tests and thinking it can be removed if there is no comment in the code.

Copy link
Contributor Author

@nishantwrp nishantwrp Aug 13, 2020

Choose a reason for hiding this comment

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

done

webpack.dev.sourcemap.config.ts Outdated Show resolved Hide resolved
webpack.dev.config.ts Show resolved Hide resolved
webpack.prod.config.ts Outdated Show resolved Hide resolved
webpack.prod.sourcemap.config.ts Outdated Show resolved Hide resolved
scripts/start.py Outdated Show resolved Hide resolved
scripts/run_e2e_tests.py Outdated Show resolved Hide resolved
Copy link
Member

@vojtechjelinek vojtechjelinek left a comment

Thanks! Just a few remaining comments.

/webpack.common.config.ts @nishantwrp @jameesjohn @vojtechjelinek
/webpack.common.macros.ts @jameesjohn @vojtechjelinek
/webpack.dev.config.ts @jameesjohn @vojtechjelinek
/webpack.prod.config.ts @jameesjohn @vojtechjelinek
/webpack.dev.config.ts @nishantwrp @jameesjohn @vojtechjelinek
/webpack.dev.sourcemap.config.ts @nishantwrp @vojtechjelinek
/webpack.prod.config.ts @nishantwrp @jameesjohn @vojtechjelinek
/webpack.prod.sourcemap.config.ts @nishantwrp @vojtechjelinek
/webpack.terser.config.ts @nishantwrp @vojtechjelinek
Copy link
Member

@vojtechjelinek vojtechjelinek Aug 13, 2020

Choose a reason for hiding this comment

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

Let's do /webpack.*.ts here with me and you as code owners.

Copy link
Contributor Author

@nishantwrp nishantwrp Aug 13, 2020

Choose a reason for hiding this comment

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

done

@nishantwrp
Copy link
Contributor Author

nishantwrp commented Aug 13, 2020

@seanlip Maybe this is a problem with this PR #10144. (This is an error with the commit of this PR in develop)

@seanlip
Copy link
Member

seanlip commented Aug 13, 2020

@nishantwrp
Copy link
Contributor Author

nishantwrp commented Aug 13, 2020

Not sure! Maybe the conflicts not resolved properly or something. You can check the CI checks run on this commit in develop.

@vojtechjelinek
Copy link
Member

vojtechjelinek commented Aug 13, 2020

@seanlip
Copy link
Member

seanlip commented Aug 13, 2020

@seanlip
Copy link
Member

seanlip commented Aug 13, 2020

@nishantwrp
Copy link
Contributor Author

nishantwrp commented Aug 13, 2020

Please check PRs and provide an analysis before you make assertions like
that.

I told that this pr was a problem because this PR's commit was the first commit to fail the CI with this error.

@seanlip
Copy link
Member

seanlip commented Aug 13, 2020

Ah ok, thanks! That is sufficient reasoning; next time please include it with the claim, and then it is helpful. Thanks!

@vojtechjelinek
Copy link
Member

vojtechjelinek commented Aug 13, 2020

@seanlip This happened due to a race condition, the passing commit on #10144 was made 4 days ago, merged 2 hours ago. In between the PR #9434 was merged which added require for login-required-message.component.ts into some files (for example https://github.com/oppia/oppia/blame/develop/core/templates/pages/contributor-dashboard-page/question-opportunities/question-opportunities.directive.ts#L32).

@seanlip
Copy link
Member

seanlip commented Aug 13, 2020

Ah ok, thanks @vojtechjelinek! That's good to know.

The PR has been reverted in develop, so if you merge from develop that should fix the broken tests.

Copy link
Contributor

@ankita240796 ankita240796 left a comment

LGTM for release-scripts, Thanks @nishantwrp!

@ankita240796 ankita240796 removed their assignment Aug 14, 2020
Copy link
Member

@DubeySandeep DubeySandeep left a comment

LGTM for the code owner files*

Copy link
Contributor

@jameesjohn jameesjohn left a comment

LGTM!

Copy link
Member

@vojtechjelinek vojtechjelinek left a comment

Thanks, just one nit.

# We are using --source_maps here, so that we have atlease one ci check
# that builds using source maps in prod env. This is to ensure that
# there are no issues while deploying oppia.
Copy link
Member

@vojtechjelinek vojtechjelinek Aug 15, 2020

Choose a reason for hiding this comment

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

Suggested change
# We are using --source_maps here, so that we have atlease one ci check
# that builds using source maps in prod env. This is to ensure that
# there are no issues while deploying oppia.
# We are using --source_maps here, so that we have at least one CI check
# that builds using source maps in prod env. This is to ensure that
# there are no issues while deploying oppia.

Copy link
Contributor Author

@nishantwrp nishantwrp Aug 15, 2020

Choose a reason for hiding this comment

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

done

Copy link
Member

@vojtechjelinek vojtechjelinek left a comment

Actually, requested changes so it cannot be merged.

Copy link
Member

@vojtechjelinek vojtechjelinek left a comment

LGTM!

@seanlip seanlip merged commit 2d4e576 into oppia:develop Aug 16, 2020
6 checks passed
shavavo pushed a commit to shavavo/oppia that referenced this pull request Aug 20, 2020
* Devtools

* Fixed backend tests

* Fixed backend tests

* Increase backend coverage

* Source maps in lighthouse ci

* Reviews

* reviews

* reviews

* reviews

* reviews
@nishantwrp nishantwrp deleted the webpack-devtools branch Aug 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants