Skip to content

Commit

Permalink
Switch away from Webpacker to Shakapacker (#10389)
Browse files Browse the repository at this point in the history
* patch the generator to use custom branch

* Remove Webpacker, Install Shakapacker

* Patch shakapacker decidim-core

* Update the rake task and base Js

* Update shakapacker npm package

* Update npm api

* Patch the workflows

* Fixing decidim-admin test suite

* Fixing decidim-core specs

* Fix decidim-dev specs

* Fixing decidim-core

* Fixing decidim-assemblies specs

* Fixing decidim-verifications specs

* Fixing decidim-consultations specs

* Fix more decidim-assemblies

* Fixing decidim-consultations

* Fix decidim-conferences

* Partially fixing decidim-initiatives

* Partially fixing participatory-processes

* Fixing decdim-generators

* Running linters

* Fixing more decidim-core specs

* Partially fix decidim-proposals

* Fix decidim-accountability specs

* Fix decidim-proposal cell

* Fix decidim-budgets specs

* Fix decidim-debates

* Fix decidim-templates

* Partially fix decidim-surveys

* Fix decidim-surveys

* Partially fix decidim-meetings

* Fix decidim-templates

* fix geocoding fields

* Fix more decidim-initiatives

* Fix more decidim-meetings specs

* Fix more decidim-proposals

* Fix more decidim-meetings

* Fix decidim-elections, decidim-votings (#10422)

* Fix decidim-elections, decidim-votings

* fix more decidim-elections

* Fixing more decidim-elections

* more fixes in decidim-elections

* Add release notes

* Lint RELEASE_NOTES.md

* Set custom webpacker.yml location

* Patch lighthouse workflow

* Remove unecessary content_fors

* Patch the webpacker config

* Make use of append_stylesheet_pack_tag

* Fixing the map elements

* patch the release notes

* Lint erb files

* Apply MR recommendations

* Patch rails cells to use the rails view context as a reference

* Replace javascript_snippets and stylesheet_snippets by append_assets

* Update to shakapacker 6.6.0

* Remove shakapacker override in generator

* Remove workflow patch

* Linters

* Fix generator

* Bugfix

* Revert commonmarker downgrade

* Apply review recomandations regarding procfile

* Apply review recommendations

* Lock both JS and Ruby shakapacker versions at 6.6.x to avoid breaking our pipelines

* Run the decidim:procfile:install rake task during application generation

* Chmod the bin/dev script correctly

* Change the default for WEBPACKER_RUNTIME_COMPILE to false

* Compile the assets automatically during tests if they haven't been compiled before

* Remove unnecessary lines from the map specs after the refactoring

* Lock both JS and Ruby shakapacker versions at 6.6.x to avoid breaking

* Preparing to merge to develop

* Adding development notes, as suggested

* Last batch of changes
  • Loading branch information
alecslupu committed Mar 21, 2023
1 parent 66301d7 commit c782bb2
Show file tree
Hide file tree
Showing 189 changed files with 8,389 additions and 6,776 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci_accountability.yml
Expand Up @@ -28,6 +28,7 @@ env:
DECIDIM_MODULE: decidim-accountability
PARALLEL_TEST_PROCESSORS: 2
CODECOV_TOKEN: bc15b944-6b42-420a-b3f9-a5a8fb214326
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_admin.yml
Expand Up @@ -23,6 +23,7 @@ env:
DECIDIM_MODULE: decidim-admin
PARALLEL_TEST_PROCESSORS: 2
CODECOV_TOKEN: bc15b944-6b42-420a-b3f9-a5a8fb214326
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_admin_system.yml
Expand Up @@ -23,6 +23,7 @@ env:
DECIDIM_MODULE: decidim-admin
PARALLEL_TEST_PROCESSORS: 2
CODECOV_TOKEN: bc15b944-6b42-420a-b3f9-a5a8fb214326
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_api.yml
Expand Up @@ -24,6 +24,7 @@ env:
DECIDIM_MODULE: decidim-api
PARALLEL_TEST_PROCESSORS: 2
CODECOV_TOKEN: bc15b944-6b42-420a-b3f9-a5a8fb214326
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_assemblies.yml
Expand Up @@ -23,6 +23,7 @@ env:
DECIDIM_MODULE: decidim-assemblies
PARALLEL_TEST_PROCESSORS: 2
CODECOV_TOKEN: bc15b944-6b42-420a-b3f9-a5a8fb214326
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_blogs.yml
Expand Up @@ -26,6 +26,7 @@ env:
DECIDIM_MODULE: decidim-blogs
PARALLEL_TEST_PROCESSORS: 2
CODECOV_TOKEN: bc15b944-6b42-420a-b3f9-a5a8fb214326
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_budgets.yml
Expand Up @@ -25,6 +25,7 @@ env:
DECIDIM_MODULE: decidim-budgets
PARALLEL_TEST_PROCESSORS: 2
CODECOV_TOKEN: bc15b944-6b42-420a-b3f9-a5a8fb214326
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_comments.yml
Expand Up @@ -23,6 +23,7 @@ env:
DECIDIM_MODULE: decidim-comments
PARALLEL_TEST_PROCESSORS: 2
CODECOV_TOKEN: bc15b944-6b42-420a-b3f9-a5a8fb214326
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_conferences.yml
Expand Up @@ -24,6 +24,7 @@ env:
DECIDIM_MODULE: decidim-conferences
PARALLEL_TEST_PROCESSORS: 2
CODECOV_TOKEN: bc15b944-6b42-420a-b3f9-a5a8fb214326
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_consultations.yml
Expand Up @@ -24,6 +24,7 @@ env:
DECIDIM_MODULE: decidim-consultations
PARALLEL_TEST_PROCESSORS: 2
CODECOV_TOKEN: bc15b944-6b42-420a-b3f9-a5a8fb214326
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_core_lib.yml
Expand Up @@ -23,6 +23,7 @@ env:
DECIDIM_MODULE: decidim-core
PARALLEL_TEST_PROCESSORS: 2
CODECOV_TOKEN: bc15b944-6b42-420a-b3f9-a5a8fb214326
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_core_system.yml
Expand Up @@ -23,6 +23,7 @@ env:
PARALLEL_TEST_PROCESSORS: 2
DECIDIM_SERVICE_WORKER_ENABLED: true
CODECOV_TOKEN: bc15b944-6b42-420a-b3f9-a5a8fb214326
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_core_system_ssl.yml
Expand Up @@ -23,6 +23,7 @@ env:
DECIDIM_SERVICE_WORKER_ENABLED: true
TEST_SSL: true
CODECOV_TOKEN: bc15b944-6b42-420a-b3f9-a5a8fb214326
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_core_unit.yml
Expand Up @@ -22,6 +22,7 @@ env:
DECIDIM_MODULE: decidim-core
PARALLEL_TEST_PROCESSORS: 2
CODECOV_TOKEN: bc15b944-6b42-420a-b3f9-a5a8fb214326
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_debates.yml
Expand Up @@ -24,6 +24,7 @@ env:
DECIDIM_MODULE: decidim-debates
PARALLEL_TEST_PROCESSORS: 2
CODECOV_TOKEN: bc15b944-6b42-420a-b3f9-a5a8fb214326
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_dev_system.yml
Expand Up @@ -21,6 +21,7 @@ env:
DECIDIM_MODULE: decidim-dev
PARALLEL_TEST_PROCESSORS: 2
CODECOV_TOKEN: bc15b944-6b42-420a-b3f9-a5a8fb214326
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_elections_system_admin.yml
Expand Up @@ -26,6 +26,7 @@ env:
DECIDIM_MODULE: decidim-elections
PARALLEL_TEST_PROCESSORS: 2
CODECOV_TOKEN: bc15b944-6b42-420a-b3f9-a5a8fb214326
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_elections_system_public.yml
Expand Up @@ -26,6 +26,7 @@ env:
DECIDIM_MODULE: decidim-elections
PARALLEL_TEST_PROCESSORS: 2
CODECOV_TOKEN: bc15b944-6b42-420a-b3f9-a5a8fb214326
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_elections_unit_tests.yml
Expand Up @@ -26,6 +26,7 @@ env:
DECIDIM_MODULE: decidim-elections
PARALLEL_TEST_PROCESSORS: 2
CODECOV_TOKEN: bc15b944-6b42-420a-b3f9-a5a8fb214326
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_forms.yml
Expand Up @@ -23,6 +23,7 @@ env:
DECIDIM_MODULE: decidim-forms
PARALLEL_TEST_PROCESSORS: 2
CODECOV_TOKEN: bc15b944-6b42-420a-b3f9-a5a8fb214326
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_generators_flags.yml
Expand Up @@ -21,6 +21,7 @@ env:
DECIDIM_MODULE: decidim-generators
PARALLEL_TEST_PROCESSORS: 2
CODECOV_TOKEN: bc15b944-6b42-420a-b3f9-a5a8fb214326
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_generators_main.yml
Expand Up @@ -21,6 +21,7 @@ env:
DECIDIM_MODULE: decidim-generators
PARALLEL_TEST_PROCESSORS: 2
CODECOV_TOKEN: bc15b944-6b42-420a-b3f9-a5a8fb214326
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_generators_rest.yml
Expand Up @@ -21,6 +21,7 @@ env:
DECIDIM_MODULE: decidim-generators
PARALLEL_TEST_PROCESSORS: 2
CODECOV_TOKEN: bc15b944-6b42-420a-b3f9-a5a8fb214326
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_initiatives.yml
Expand Up @@ -25,6 +25,7 @@ env:
DECIDIM_MODULE: decidim-initiatives
PARALLEL_TEST_PROCESSORS: 2
CODECOV_TOKEN: bc15b944-6b42-420a-b3f9-a5a8fb214326
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_initiatives_system_admin.yml
Expand Up @@ -25,6 +25,7 @@ env:
DECIDIM_MODULE: decidim-initiatives
PARALLEL_TEST_PROCESSORS: 2
CODECOV_TOKEN: bc15b944-6b42-420a-b3f9-a5a8fb214326
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_initiatives_system_public.yml
Expand Up @@ -25,6 +25,7 @@ env:
DECIDIM_MODULE: decidim-initiatives
PARALLEL_TEST_PROCESSORS: 2
CODECOV_TOKEN: bc15b944-6b42-420a-b3f9-a5a8fb214326
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_javascript.yml
Expand Up @@ -19,6 +19,7 @@ on:
env:
CI: "true"
NODE_VERSION: 16.9.1
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_main.yml
Expand Up @@ -13,6 +13,7 @@ env:
CI: "true"
RUBY_VERSION: 3.1.1
NODE_VERSION: 16.9.1
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_meetings_system_admin.yml
Expand Up @@ -26,6 +26,7 @@ env:
DECIDIM_MODULE: decidim-meetings
PARALLEL_TEST_PROCESSORS: 2
CODECOV_TOKEN: bc15b944-6b42-420a-b3f9-a5a8fb214326
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_meetings_system_public.yml
Expand Up @@ -26,6 +26,7 @@ env:
DECIDIM_MODULE: decidim-meetings
PARALLEL_TEST_PROCESSORS: 2
CODECOV_TOKEN: bc15b944-6b42-420a-b3f9-a5a8fb214326
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_meetings_unit_tests.yml
Expand Up @@ -26,6 +26,7 @@ env:
DECIDIM_MODULE: decidim-meetings
PARALLEL_TEST_PROCESSORS: 2
CODECOV_TOKEN: bc15b944-6b42-420a-b3f9-a5a8fb214326
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_pages.yml
Expand Up @@ -23,6 +23,7 @@ env:
DECIDIM_MODULE: decidim-pages
PARALLEL_TEST_PROCESSORS: 2
CODECOV_TOKEN: bc15b944-6b42-420a-b3f9-a5a8fb214326
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_participatory_processes.yml
Expand Up @@ -24,6 +24,7 @@ env:
DECIDIM_MODULE: decidim-participatory_processes
PARALLEL_TEST_PROCESSORS: 2
CODECOV_TOKEN: bc15b944-6b42-420a-b3f9-a5a8fb214326
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_performance_metrics_monitoring.yml
Expand Up @@ -21,6 +21,7 @@ env:
RUBY_VERSION: 3.1.1
NODE_VERSION: 16.9.1
RAILS_ENV: development
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_proposals_system_admin.yml
Expand Up @@ -28,6 +28,7 @@ env:
DECIDIM_MODULE: decidim-proposals
PARALLEL_TEST_PROCESSORS: 2
CODECOV_TOKEN: bc15b944-6b42-420a-b3f9-a5a8fb214326
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_proposals_system_public.yml
Expand Up @@ -28,6 +28,7 @@ env:
DECIDIM_MODULE: decidim-proposals
PARALLEL_TEST_PROCESSORS: 2
CODECOV_TOKEN: bc15b944-6b42-420a-b3f9-a5a8fb214326
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_proposals_unit_tests.yml
Expand Up @@ -28,6 +28,7 @@ env:
DECIDIM_MODULE: decidim-proposals
PARALLEL_TEST_PROCESSORS: 2
CODECOV_TOKEN: bc15b944-6b42-420a-b3f9-a5a8fb214326
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_sortitions.yml
Expand Up @@ -25,6 +25,7 @@ env:
DECIDIM_MODULE: decidim-sortitions
PARALLEL_TEST_PROCESSORS: 2
CODECOV_TOKEN: bc15b944-6b42-420a-b3f9-a5a8fb214326
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_surveys.yml
Expand Up @@ -26,6 +26,7 @@ env:
DECIDIM_MODULE: decidim-surveys
PARALLEL_TEST_PROCESSORS: 2
CODECOV_TOKEN: bc15b944-6b42-420a-b3f9-a5a8fb214326
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_system.yml
Expand Up @@ -22,6 +22,7 @@ env:
DECIDIM_MODULE: decidim-system
PARALLEL_TEST_PROCESSORS: 2
CODECOV_TOKEN: bc15b944-6b42-420a-b3f9-a5a8fb214326
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_templates.yml
Expand Up @@ -25,6 +25,7 @@ env:
DECIDIM_MODULE: decidim-templates
PARALLEL_TEST_PROCESSORS: 2
CODECOV_TOKEN: bc15b944-6b42-420a-b3f9-a5a8fb214326
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_verifications.yml
Expand Up @@ -23,6 +23,7 @@ env:
DECIDIM_MODULE: decidim-verifications
PARALLEL_TEST_PROCESSORS: 2
CODECOV_TOKEN: bc15b944-6b42-420a-b3f9-a5a8fb214326
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lint_code.yml
Expand Up @@ -14,6 +14,7 @@ env:
SIMPLECOV: "true"
RUBY_VERSION: 3.1.1
NODE_VERSION: 16.9.1
WEBPACKER_RUNTIME_COMPILE: "false"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down

0 comments on commit c782bb2

Please sign in to comment.