-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Ember Upgrade to 3.24 #13443
Ember Upgrade to 3.24 #13443
Conversation
@Monkeychip would you mind giving the recent changes a once over when you have a minute? Based on our conversation, the latest batch of commits address the following:
|
@Monkeychip I fixed the issue with the hanging acceptance test. I traced it back to the |
* Update browserslist * Add browserslistrc * ember-cli-update --to 3.26, fix conflicts * Run codemodes that start with ember-* * More codemods - before cp* * More codemods (curly data-test-*) * WIP ember-basic-dropdown template errors * updates ember-basic-dropdown and related deps to fix build issues * updates basic dropdown instances to new version API * updates more deps -- ember-template-lint is working again * runs no-implicit-this codemod * creates and runs no-quoteless-attributes codemod * runs angle brackets codemod * updates lint:hbs globs to only touch hbs files * removes yield only templates * creates and runs deprecated args transform * supresses lint error for invokeAction on LinkTo component * resolves remaining ambiguous path lint errors * resolves simple-unless lint errors * adds warnings for deprecated tagName arg on LinkTo components * adds warnings for remaining curly component invocation * updates global template lint rules * resolves remaining template lint errors * disables some ember specfic lint rules that target pre octane patterns * js lint fix run * resolves remaining js lint errors * fixes test run * adds npm-run-all dep * fixes test attribute issues * fixes console acceptance tests * fixes tests * adds yield only wizard/tutorial-active template * fixes more tests * attempts to fix more flaky tests * removes commented out settled in transit test * updates deprecations workflow and adds initializer to filter by version * updates flaky policies acl old test * updates to flaky transit test * bumps ember deps down to LTS version * runs linters after main merge * fixes client count tests after bad merge conflict fixes * fixes client count history test * more updates to lint config * another round of hbs lint fixes after extending stylistic rule * updates lint-staged commands * removes indent eslint rule since it seems to break things * fixes bad attribute in transform-edit-form template * test fixes * fixes enterprise tests * adds changelog * removes deprecated ember-concurrency-test-waiters dep and adds @ember/test-waiters * flaky test fix Co-authored-by: hashishaw <[email protected]>
The primary goal here was to upgrade Ember to the latest LTS version (3.24) and as many of the other dependencies as necessary to get the app to build. Here is a brief overview of the changes and things to be aware of.
Linting
Some new lint rules were added which led to cleaning up all of the new and existing
js
andhbs
lint errors. Since some rules are Octane focused, individual rules have either been globally ignored until we can fully glimmerize everything or ignored/configured to warn on a per file basis. The.eslintrc.js
and.template-lintrc.js
contain all the rule overrides. We should work towards fully adopting the recommended lint rules over time.While template linting was available in the project prior to the upgrade it was not being utilized. Part of the issue (for me at least) was that the Ember Language Server VSCode extension was not working with ember-template-lint. It may no longer be maintained since there hasn't been an update since May 2020 and perhaps that is why it is not working in the latest VSCode with the newest version of ember-template-lint.
It is highly recommended to use the Unstable Ember Language Server extension which is a fork that is actively maintained and works with ember-template-lint in the Vault project. Since some folks may not prefer live linting in the editor I added the
lint:hbs:quiet
task to the test run. Bothjs
andhbs
linting must find no errors before the Ember tests will run. Note that the lint tasks that contain:quiet
will not fail if they contain warnings. We should strive to resolve all warnings over time and eventually flip them back to error.Deprecations
ember-cli-deprecation-workflow was enabled to handle deprecation warnings. It's not always trivial to refactor to get around deprecations and they may also be reported from addons which may involve updating, or in the case of no longer maintained addons there may need to be a plan to migrate away from usage. With that in mind I created an initializer to filter out deprecation warnings that will remain until version 4.0.0. This gives us time to address any immediate issues and plan a path forward before our next major upgrade.
Test Failures
After touching many files fixing lint errors it was expected that there would be failing tests. I would like to briefly highlight some async issues that reoccur throughout the acceptance tests. It seems that after the upgrade the issue has increased and many acceptance tests that wait on an async action before asserting that a route transition has taken place fail intermittently.
There is a new lint rule that errors when placing
settled();
after aclick
citing that the click handler uses settled internally. To get around this for the time being and attempt to fix the flakiness I refactored any failures caught by CircleCI to usewaitUntil
:We should attempt to address this issue globally and try and get to a point where we can reduce the usage of
settled
andwaitUntil
which will both clean up the readability of the tests and reduce intermittent failures.