Closed hut8 closed 2 years ago
Output from logs locally vs remote logs:
{:message=>"running bower", :command=>"/home/liam/rails-assets/node_modules/.bin/bower install -p -F swipe#2.0.0 --json --config.tmp=/tmp/bower20220715-1929983-10usurp/tmp --config.storage.packages=/tmp/bower20220715-1929983-10usurp/cache --config.interactive=false"}
{:message=>"running shell command", :command=>"cd /tmp/d20220715-1929983-1dtakld && /home/liam/rails-assets/node_modules/.bin/bower install -p -F swipe#2.0.0 --json --config.tmp=/tmp/bower20220715-1929983-10usurp/tmp --config.storage.packages=/tmp/bower20220715-1929983-10usurp/cache --config.interactive=false"}
{:message=>"shell command finished", :command=>"/home/liam/rails-assets/node_modules/.bin/bower install -p -F swipe#2.0.0 --json --config.tmp=/tmp/bower20220715-1929983-10usurp/tmp --config.storage.packages=/tmp/bower20220715-1929983-10usurp/cache --config.interactive=false", :output=>"{\n \"Swipe\": {\n \"endpoint\": {\n \"name\": \"Swipe\",\n \"source\": \"swipe\",\n \"target\": \"2.0.0\"\n },\n \"canonicalDir\": \"/tmp/d20220715-1929983-1dtakld/bower_components/Swipe\",\n \"pkgMeta\": {\n \"name\": \"Swipe\",\n \"version\": \"2.0.0\",\n \"main\": [\n \"./swipe.js\"\n ],\n \"author\": \"Brad Birdsall\",\n \"license\": \"MIT\",\n \"ignore\": [\n \"**/*.html\",\n \"**/*.css\",\n \"Gruntfile.js\"\n ],\n \"homepage\": \"https://github.com/bradbirdsall/Swipe\",\n \"_release\": \"2.0.0\",\n \"_resolution\": {\n \"type\": \"version\",\n \"tag\": \"2.0.0\",\n \"commit\": \"ec579c7846acaac2e74d67c00b073e48c19b010d\"\n },\n \"_source\": \"https://github.com/bradbirdsall/Swipe.git\",\n \"_target\": \"2.0.0\"\n },\n \"dependencies\": {},\n \"nrDependants\": 0\n }\n}\n"}
[1m[35mComponent Load (0.6ms)[0m SELECT "components".* FROM "components" WHERE "components"."name" = $1 LIMIT 1 [["name", "swipe"]]
Building Swipe#2.0.0...
{:message=>"running shell command", :command=>"cd /tmp/d20220715-1929983-15zpfyd && rake build"}
{:message=>"shell command finished", :command=>"rake build", :output=>"rails-assets-swipe 2.0.0 built to pkg/rails-assets-swipe-2.0.0.gem.\n"}
[1m[36m (0.2ms)[0m [1mBEGIN[0m
[1m[35mComponent Exists (0.5ms)[0m SELECT 1 AS one FROM "components" WHERE "components"."name" = 'swipe' LIMIT 1
[1m[36mSQL (0.9ms)[0m [1mINSERT INTO "components" ("name", "bower_name", "description", "homepage", "summary_cache", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["name", "swipe"], ["bower_name", "swipe"], ["description", ""], ["homepage", "https://github.com/bradbirdsall/Swipe"], ["summary_cache", "{\"name\":\"swipe\",\"description\":\"\",\"homepage\":\"https://github.com/bradbirdsall/Swipe\",\"versions\":[]}"], ["created_at", "2022-07-15 12:21:06.557270"], ["updated_at", "2022-07-15 12:21:06.557270"]]
[1m[35mVersion Exists (0.9ms)[0m SELECT 1 AS one FROM "versions" WHERE ("versions"."string" = '2.0.0' AND "versions"."component_id" = 1) LIMIT 1
[1m[36mSQL (1.3ms)[0m [1mINSERT INTO "versions" ("string", "bower_version", "dependencies", "build_status", "asset_paths", "main_paths", "component_id", "position", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id"[0m [["string", "2.0.0"], ["bower_version", "2.0.0"], ["dependencies", ""], ["build_status", "builded"], ["asset_paths", "{app/assets/javascripts/Swipe/swipe.js,app/assets/javascripts/Swipe.js}"], ["main_paths", "{app/assets/javascripts/Swipe/swipe.js}"], ["component_id", 1], ["position", ".00000000000002.00000000000000.00000000000000."], ["created_at", "2022-07-15 12:21:06.563728"], ["updated_at", "2022-07-15 12:21:06.563728"]]
Pretty-printed output of bower install:
{
"Swipe": {
"endpoint": {
"name": "Swipe",
"source": "swipe",
"target": "2.0.0"
},
"canonicalDir": "/tmp/d20220715-1929983-1dtakld/bower_components/Swipe",
"pkgMeta": {
"name": "Swipe",
"version": "2.0.0",
"main": [
"./swipe.js"
],
"author": "Brad Birdsall",
"license": "MIT",
"ignore": [
"**/*.html",
"**/*.css",
"Gruntfile.js"
],
"homepage": "https://github.com/bradbirdsall/Swipe",
"_release": "2.0.0",
"_resolution": {
"type": "version",
"tag": "2.0.0",
"commit": "ec579c7846acaac2e74d67c00b073e48c19b010d"
},
"_source": "https://github.com/bradbirdsall/Swipe.git",
"_target": "2.0.0"
},
"dependencies": {},
"nrDependants": 0
}
}
{:message=>"running bower", :command=>"/home/runner/work/rails-assets/rails-assets/node_modules/.bin/bower install -p -F swipe#2.0.0 --json --config.tmp=/tmp/bower20220715-3824-1iir5qy/tmp --config.storage.packages=/tmp/bower20220715-3824-1iir5qy/cache --config.interactive=false"}
{:message=>"running shell command", :command=>"cd /tmp/d20220715-3824-8xxqhl && /home/runner/work/rails-assets/rails-assets/node_modules/.bin/bower install -p -F swipe#2.0.0 --json --config.tmp=/tmp/bower20220715-3824-1iir5qy/tmp --config.storage.packages=/tmp/bower20220715-3824-1iir5qy/cache --config.interactive=false"}
{:message=>"shell command finished", :command=>"/home/runner/work/rails-assets/rails-assets/node_modules/.bin/bower install -p -F swipe#2.0.0 --json --config.tmp=/tmp/bower20220715-3824-1iir5qy/tmp --config.storage.packages=/tmp/bower20220715-3824-1iir5qy/cache --config.interactive=false", :output=>"{\n \"Swipe\": {\n \"endpoint\": {\n \"name\": \"Swipe\",\n \"source\": \"swipe\",\n \"target\": \"2.0.0\"\n },\n \"canonicalDir\": \"/tmp/d20220715-3824-8xxqhl/bower_components/Swipe\",\n \"pkgMeta\": {\n \"name\": \"Swipe\",\n \"version\": \"2.0.0\",\n \"main\": [\n \"./swipe.js\"\n ],\n \"author\": \"Brad Birdsall\",\n \"license\": \"MIT\",\n \"ignore\": [\n \"**/*.html\",\n \"**/*.css\",\n \"Gruntfile.js\"\n ],\n \"homepage\": \"https://github.com/bradbirdsall/Swipe\",\n \"_release\": \"2.0.0\",\n \"_resolution\": {\n \"type\": \"version\",\n \"tag\": \"2.0.0\",\n \"commit\": \"ec579c7846acaac2e74d67c00b073e48c19b010d\"\n },\n \"_source\": \"https://github.com/bradbirdsall/Swipe.git\",\n \"_target\": \"2.0.0\"\n },\n \"dependencies\": {},\n \"nrDependants\": 0\n }\n}\n"}
[1m[35mComponent Load (0.8ms)[0m SELECT "components".* FROM "components" WHERE "components"."name" = $1 LIMIT 1 [["name", "swipe"]]
Building Swipe#2.0.0...
{:message=>"running shell command", :command=>"cd /tmp/d20220715-3824-14daqpt && rake build"}
{:message=>"shell command finished", :command=>"rake build", :output=>"rails-assets-swipe 2.0.0 built to pkg/rails-assets-swipe-2.0.0.gem.\n"}
[1m[36m (0.4ms)[0m [1mBEGIN[0m
[1m[35mComponent Exists (0.6ms)[0m SELECT 1 AS one FROM "components" WHERE "components"."name" = 'swipe' LIMIT 1
[1m[36mSQL (0.8ms)[0m [1mINSERT INTO "components" ("name", "bower_name", "description", "homepage", "summary_cache", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["name", "swipe"], ["bower_name", "swipe"], ["description", ""], ["homepage", "https://github.com/bradbirdsall/Swipe"], ["summary_cache", "{\"name\":\"swipe\",\"description\":\"\",\"homepage\":\"https://github.com/bradbirdsall/Swipe\",\"versions\":[]}"], ["created_at", "2022-07-15 12:06:09.409287"], ["updated_at", "2022-07-15 12:06:09.409287"]]
[1m[35mVersion Exists (0.9ms)[0m SELECT 1 AS one FROM "versions" WHERE ("versions"."string" = '2.0.0' AND "versions"."component_id" = 1) LIMIT 1
[1m[36mSQL (1.0ms)[0m [1mINSERT INTO "versions" ("string", "bower_version", "dependencies", "build_status", "asset_paths", "main_paths", "component_id", "position", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id"[0m [["string", "2.0.0"], ["bower_version", "2.0.0"], ["dependencies", ""], ["build_status", "builded"], ["asset_paths", "{app/assets/javascripts/Swipe/swipe.js,app/assets/javascripts/Swipe.js}"], ["main_paths", "{app/assets/javascripts/Swipe/swipe.js}"], ["component_id", 1], ["position", ".00000000000002.00000000000000.00000000000000."], ["created_at", "2022-07-15 12:06:09.413653"], ["updated_at", "2022-07-15 12:06:09.413653"]]
Pretty printed bower install output:
{
"Swipe": {
"endpoint": {
"name": "Swipe",
"source": "swipe",
"target": "2.0.0"
},
"canonicalDir": "/tmp/d20220715-3824-8xxqhl/bower_components/Swipe",
"pkgMeta": {
"name": "Swipe",
"version": "2.0.0",
"main": [
"./swipe.js"
],
"author": "Brad Birdsall",
"license": "MIT",
"ignore": [
"**/*.html",
"**/*.css",
"Gruntfile.js"
],
"homepage": "https://github.com/bradbirdsall/Swipe",
"_release": "2.0.0",
"_resolution": {
"type": "version",
"tag": "2.0.0",
"commit": "ec579c7846acaac2e74d67c00b073e48c19b010d"
},
"_source": "https://github.com/bradbirdsall/Swipe.git",
"_target": "2.0.0"
},
"dependencies": {},
"nrDependants": 0
}
}
The output of bower looks identical. Also I've put effort into making absolute sure that bower is precisely the same, including dependencies, on both local and remote, and also cleared my bower cache and other caches.
These outputs overall look identical except for the expected difference in paths. So, nothing to see here. 😕
I added functionality to make a tarball of the directory (in this case, the bower_components subdirectory) and upload it as an artifact. They contain identical files.
On CI:
{:all=>[[#<Build::Path:swipe.js>, #<Build::Path:app/assets/javascripts/Swipe/swipe.js>], ["//= require Swipe/swipe.js\n", #<Build::Path:app/assets/javascripts/Swipe.js>]], :main=>[[#<Build::Path:swipe.js>, #<Build::Path:app/assets/javascripts/Swipe/swipe.js>]]}
Local:
{:all=>[[#<Build::Path:swipe.js>, #<Build::Path:app/assets/javascripts/Swipe/swipe.js>], ["//= require Swipe/swipe.js\n", #<Build::Path:app/assets/javascripts/Swipe.js>]], :main=>[[#<Build::Path:swipe.js>, #<Build::Path:app/assets/javascripts/Swipe/swipe.js>]]}
So these are identical too.
Identified cause: I had run tests before upgrade. All the gems were built and the original paths to gem directories were intact. The test suite never removes those directories before writing to them, so the old files stuck around. That explains the difference in behavior. The directories in question were in public/gems/*(/)
Test suite needs to be updated to fix that.
When running locally, all tests pass. On CI, several fail. I am having a hard time identifying the exact difference that causes the errors. Example:
CI
Local
So, in this one example,
swipe
should haveswipe.js
but instead containsSwipe.js
. Note that there's a packageSwipe
which works fine on both.Potential problems
Check means "I checked and it's not the problem."
bower