tabbycat
tabbycat copied to clipboard
Move post-compile script to release tasks
See: https://devcenter.heroku.com/articles/release-phase#specifying-release-phase-tasks https://help.heroku.com/GDQ74SU2/django-migrations
This currently fails due to an npm thing, I don't know if @philipbelesky could take a guess as to why? It runs at a different time to when the post-compile hook ran (it runs after the release is "done", not before), so I imagine that might be having an impact, or maybe it's getting confused about where the node_modules
directory is. 🤔
Failing part:
remote: - Building for production...
remote: ERROR Failed to compile with 1 errors21:41:31
remote:
remote: error in ./tabbycat/templates/js-bundles/main.js
remote:
remote: Module build failed (from ./node_modules/thread-loader/dist/cjs.js):
remote: Thread Loader (Worker 0)
remote: Cannot find module '@babel/core'
remote: babel-loader@8 requires Babel 7.x (the package '@babel/core'). If you'd like to use Babel 6.x ('babel-core'), you should install 'babel-loader@7'.
But I have a feeling that without context this won't mean very much, so maybe try deploying this branch when you get a chance. release-tasks
is not called refactor/release-tasks
so that the deploy link will work: https://www.heroku.com/deploy?template=https://github.com/TabbycatDebate/tabbycat/tree/release-tasks
This is likely due to some of the dependency bumps I did yesterday, although they all passed a local build. Will check it out!
Hmm, so when I deploy it I don't get any log for the release phase. It just fails without output. Do you have the same?
Hmm, so when I deploy it I don't get any log for the release phase. It just fails without output. Do you have the same?
Hmm, no, I get the release tasks running after the release. I'll run a deploy and post the output in a bit (I didn't save any before). I'm just testing using the Python script though. I haven't tried the deploy via web button, and I guess it wouldn't surprise me if it didn't show there, since it probably calls it done and dusted once the release is done (which happens before the release tasks)?
Starting at what used to be the last few lines:
remote: -----> Compressing...
remote: Done: 179.6M
remote: -----> Launching...
remote: ! Release command declared: this new release will not be available until the command succeeds.
remote: Released v14
remote: https://fierce-citadel-78663.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
remote: Running release command...
remote:
remote: -----> I'm the release tasks script
remote: -----> Running database migration
remote: Operations to perform:
remote: Apply all migrations: actionlog, adjallocation, [...]
and then it runs the release tasks script until:
remote: npm ERR! A complete log of this run can be found in:
remote: npm ERR! /app/.npm/_logs/2020-06-21T09_33_58_995Z-debug.log
remote: Waiting for release.... failed.
To https://git.heroku.com/fierce-citadel-78663.git
At this stage the app is a generic new app:
Mental note, full error log:
remote: - Building for production...
remote: ERROR Build failed with errors.
remote: ERROR Failed to compile with 1 errors11:20:48 AM
remote:
remote: error in ./tabbycat/templates/js-bundles/main.js
remote:
remote: Module build failed (from ./node_modules/thread-loader/dist/cjs.js):
remote: Thread Loader (Worker 0)
remote: Cannot find module '@babel/core'
remote: Require stack:
remote: - /app/node_modules/babel-loader/lib/index.js
remote: - /app/node_modules/loader-runner/lib/loadLoader.js
remote: - /app/node_modules/loader-runner/lib/LoaderRunner.js
remote: - /app/node_modules/thread-loader/dist/worker.js
remote: babel-loader@8 requires Babel 7.x (the package '@babel/core'). If you'd like to use Babel 6.x ('babel-core'), you should install 'babel-loader@7'.
remote:
remote: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)
remote: at Function.Module._load (internal/modules/cjs/loader.js:842:27)
remote: at Module.require (internal/modules/cjs/loader.js:1026:19)
remote: at require (internal/modules/cjs/helpers.js:72:18)
remote: at Object.<anonymous> (/app/node_modules/babel-loader/lib/index.js:10:11)
remote: at Module._compile (internal/modules/cjs/loader.js:1138:30)
remote: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
remote: at Module.load (internal/modules/cjs/loader.js:986:32)
remote: at Function.Module._load (internal/modules/cjs/loader.js:879:14)
remote: at Module.require (internal/modules/cjs/loader.js:1026:19)
remote:
remote: @ multi ./tabbycat/templates/js-bundles/main.js
remote:
remote: npm ERR! code ELIFECYCLE
remote: npm ERR! errno 1
remote: npm ERR! tabbycat@ build-vue: `npx vue-cli-service build`
remote: npm ERR! Exit status 1
remote: npm ERR!
remote: npm ERR! Failed at the tabbycat@ build-vue script.
remote: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
remote:
remote: npm ERR! A complete log of this run can be found in:
remote: npm ERR! /app/.npm/_logs/2020-06-21T11_20_48_516Z-debug.log
remote: ERROR: "build-vue" exited with 1.
remote: npm ERR! code ELIFECYCLE
remote: npm ERR! errno 1
remote: npm ERR! tabbycat@ build: `NODE_ENV='production' npm-run-all -p build-* cp-*`
remote: npm ERR! Exit status 1
remote: npm ERR!
remote: npm ERR! Failed at the tabbycat@ build script.
remote: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
remote:
remote: npm ERR! A complete log of this run can be found in:
remote: npm ERR! /app/.npm/_logs/2020-06-21T11_20_48_568Z-debug.log
Ok, the release phase seems to work for me now. Let me know if it doesn't for you!
Good news:
- The deploy script runs to completion.
- The deploy button ran to completion the second time.
Bad news:
- There's some sort of static file mishap:
- The deploy button failed the first time, but I couldn't find the release log for the failed attempt.
Also, although this is the method that Heroku recommends, I have to say it's annoying that a consequence of this is that the console output of the release tasks is not shown on the web-based deploy page, unlike the build log. 😞 Though at least it emails you a link to the release logs.
WARNING Compiled with 18 warnings 11 h 58 min 11 s
Module Warning (from ./node_modules/eslint-loader/index.js):
/Users/etienne/Git/tabbycat-cloned/tabbycat/adjallocation/templates/DebateOrPanelAdjudicators.vue
46:19 error Expected to return a value in "averageScore" computed property vue/return-in-computed-property
51:25 error Expected to return a value in "averageVotingScore" computed property vue/return-in-computed-property
✖ 2 problems (2 errors, 0 warnings)
Module Warning (from ./node_modules/eslint-loader/index.js):
/Users/etienne/Git/tabbycat-cloned/tabbycat/adjallocation/templates/DraggableAdjudicator.vue
37:58 error The "isTrainee" property should be a constructor vue/require-prop-type-constructor
48:18 error Expected to return a value in "clashableID" computed property vue/return-in-computed-property
✖ 2 problems (2 errors, 0 warnings)
Module Warning (from ./node_modules/eslint-loader/index.js):
/Users/etienne/Git/tabbycat-cloned/tabbycat/adjallocation/templates/EditEitherAdjudicatorsSharedMixin.vue
40:36 error Do not access Object.prototype method 'hasOwnProperty' from target object no-prototype-builtins
✖ 1 problem (1 error, 0 warnings)
Module Warning (from ./node_modules/eslint-loader/index.js):
/Users/etienne/Git/tabbycat-cloned/tabbycat/draw/templates/DraggableTeam.vue
24:58 error The "isTrainee" property should be a constructor vue/require-prop-type-constructor
✖ 1 problem (1 error, 0 warnings)
Module Warning (from ./node_modules/eslint-loader/index.js):
/Users/etienne/Git/tabbycat-cloned/tabbycat/printing/templates/PrintableDebateInfo.vue
92:16 error This 'v-if' should be moved to the wrapper element vue/no-use-v-if-with-v-for
144:17 error The "PrintableTeamScores" component has been registered but not used vue/no-unused-components
✖ 2 problems (2 errors, 0 warnings)
Module Warning (from ./node_modules/eslint-loader/index.js):
/Users/etienne/Git/tabbycat-cloned/tabbycat/printing/templates/PrintableFeedback.vue
25:34 error This 'v-if' should be moved to the wrapper element vue/no-use-v-if-with-v-for
30:34 error This 'v-if' should be moved to the wrapper element vue/no-use-v-if-with-v-for
✖ 2 problems (2 errors, 0 warnings)
Module Warning (from ./node_modules/eslint-loader/index.js):
/Users/etienne/Git/tabbycat-cloned/tabbycat/templates/allocations/DragAndDropDebate.vue
51:36 error This 'v-if' should be moved to the wrapper element vue/no-use-v-if-with-v-for
61:36 error This 'v-if' should be moved to the wrapper element vue/no-use-v-if-with-v-for
✖ 2 problems (2 errors, 0 warnings)
Module Warning (from ./node_modules/eslint-loader/index.js):
/Users/etienne/Git/tabbycat-cloned/tabbycat/templates/allocations/DragAndDropStore.js
43:11 error 'loadDirectFromKey' is never reassigned. Use 'const' instead prefer-const
47:11 error 'LoadKeyedAsDictionary' is never reassigned. Use 'const' instead prefer-const
108:11 error 'debatesArray' is never reassigned. Use 'const' instead prefer-const
114:11 error 'bracketKey' is never reassigned. Use 'const' instead prefer-const
126:106 error Missing trailing comma comma-dangle
130:18 error 'debate' is never reassigned. Use 'const' instead prefer-const
135:21 error 'team' is never reassigned. Use 'const' instead prefer-const
138:28 error 'bc' is never reassigned. Use 'const' instead prefer-const
139:25 error 'category' is never reassigned. Use 'const' instead prefer-const
150:98 error Missing trailing comma comma-dangle
155:51 error ["sort_index"] is better written in dot notation dot-notation
195:11 error 'teams' is never reassigned. Use 'const' instead prefer-const
196:16 error 'debateOrPanelID' is never reassigned. Use 'const' instead prefer-const
197:13 error 'debateOrPanel' is never reassigned. Use 'const' instead prefer-const
199:20 error 'position' is never reassigned. Use 'const' instead prefer-const
271:11 error 'allocatedIDs' is never reassigned. Use 'const' instead prefer-const
272:11 error 'doubleAllocatedIDs' is never reassigned. Use 'const' instead prefer-const
273:16 error 'debateOrPanelID' is never reassigned. Use 'const' instead prefer-const
275:18 error 'position' is never reassigned. Use 'const' instead prefer-const
276:20 error 'adjudicatorID' is never reassigned. Use 'const' instead prefer-const
298:30 error ["componentID"] is better written in dot notation dot-notation
309:24 error Unnecessarily quoted property 'id' found quote-props
309:34 error Unnecessarily quoted property 'vue_last_modified' found quote-props
✖ 23 problems (23 errors, 0 warnings)
23 errors and 0 warnings potentially fixable with the `--fix` option.
Module Warning (from ./node_modules/eslint-loader/index.js):
/Users/etienne/Git/tabbycat-cloned/tabbycat/templates/allocations/DraggableItem.vue
35:17 error The "hoverPanel" property should be a constructor vue/require-prop-type-constructor
38:21 error The "hoverConflicts" property should be a constructor vue/require-prop-type-constructor
✖ 2 problems (2 errors, 0 warnings)
Module Warning (from ./node_modules/eslint-loader/index.js):
/Users/etienne/Git/tabbycat-cloned/tabbycat/templates/allocations/DraggableMixin.vue
5:13 error The "locked" property should be a constructor vue/require-prop-type-constructor
✖ 1 problem (1 error, 0 warnings)
Module Warning (from ./node_modules/eslint-loader/index.js):
/Users/etienne/Git/tabbycat-cloned/tabbycat/templates/allocations/DroppableMixin.vue
8:13 error The "locked" property should be a constructor vue/require-prop-type-constructor
✖ 1 problem (1 error, 0 warnings)
Module Warning (from ./node_modules/eslint-loader/index.js):
/Users/etienne/Git/tabbycat-cloned/tabbycat/templates/allocations/HoverPanel.vue
6:12 error The 'rows' variable inside 'v-for' directive should be replaced with a computed property that returns filtered array instead. You should not mix 'v-for' with 'v-if' vue/no-use-v-if-with-v-for
✖ 1 problem (1 error, 0 warnings)
Module Warning (from ./node_modules/eslint-loader/index.js):
/Users/etienne/Git/tabbycat-cloned/tabbycat/templates/allocations/HoverPanelAdjudicatorMixin.vue
26:28 error Expected to return a value in "bottomleftadjudicator" computed property vue/return-in-computed-property
33:29 error Expected to return a value in "bottomrightadjudicator" computed property vue/return-in-computed-property
✖ 2 problems (2 errors, 0 warnings)
Module Warning (from ./node_modules/eslint-loader/index.js):
/Users/etienne/Git/tabbycat-cloned/tabbycat/templates/allocations/HoverPanelGroup.vue
4:10 error The 'groups' variable inside 'v-for' directive should be replaced with a computed property that returns filtered array instead. You should not mix 'v-for' with 'v-if' vue/no-use-v-if-with-v-for
✖ 1 problem (1 error, 0 warnings)
Module Warning (from ./node_modules/eslint-loader/index.js):
/Users/etienne/Git/tabbycat-cloned/tabbycat/templates/allocations/HoverPanelTeamMixin.vue
57:21 error Expected to return a value in "bottomleftteam" computed property vue/return-in-computed-property
64:22 error Expected to return a value in "bottomrightteam" computed property vue/return-in-computed-property
✖ 2 problems (2 errors, 0 warnings)
Module Warning (from ./node_modules/eslint-loader/index.js):
/Users/etienne/Git/tabbycat-cloned/tabbycat/templates/modals/ModalForAllocating.vue
102:42 error The "forPanels" property should be a constructor vue/require-prop-type-constructor
102:60 error The "forVenues" property should be a constructor vue/require-prop-type-constructor
✖ 2 problems (2 errors, 0 warnings)
Module Warning (from ./node_modules/eslint-loader/index.js):
/Users/etienne/Git/tabbycat-cloned/tabbycat/templates/tables/SortableTableMixin.vue
6:28 error The "defaultSortKey" property should be a constructor vue/require-prop-type-constructor
6:50 error The "defaultSortOrder" property should be a constructor vue/require-prop-type-constructor
✖ 2 problems (2 errors, 0 warnings)
Module Warning (from ./node_modules/eslint-loader/index.js):
/Users/etienne/Git/tabbycat-cloned/tabbycat/venues/templates/DraggableVenue.vue
25:58 error The "isTrainee" property should be a constructor vue/require-prop-type-constructor
✖ 1 problem (1 error, 0 warnings)
^ Linter errors should be fixed on 'develop' now @tienne-B
I'll try to look into the no-assets issue soon.