When these builds are run, the job “Verify Node Version” results in:
Now using node v11.15.0 (64-bit)
/tmp/.bash_env-5e616cc5c8ed5d059c07c545-0-build: line 6: node: command not found
bash: node: command not found
Exited with code exit status 127
However, when I SSH into this machine, I can run node --version without issue, and it gives me 11.15.0. Thoughts on what I might be doing incorrectly here?
I am trying to get --split-by=timings to work on an Elixir project but I keep getting the following error:
$ TESTFILES=$(circleci tests glob "test/**/*_test.exs" | circleci tests split --split-by=timings --show-counts)
Read 359 lines of autodetect(s)
Error autodetecting timing type, falling back to weighting by name. Autodetect no matching filename or classname. If file names are used, double check paths for absolute vs relative.
Example input file: "test/channels/filter_header_channel_test.exs"
Example file from timings: ""
Bucket 0: assigning 90 autodetect(s), total weight 90
When I SSH into a container, here’s what the very end of .circleci-task-data/circle-test-results/results.json look like:
{"classname":"Elixir.Foo.ControllerTest","file":null,"name":"test some stuff","result":"success","run_time":0.5231,"message":null,"source":"unknown","source_type":"unknown"}
{"classname":"Elixir.FooProject.SomeTest","file":null,"name":"test some stuff","result":"success","run_time":0.0038,"message":null,"source":"unknown","source_type":"unknown"}],
"files":["results.xml","results.xml","results.xml","results.xml"],"exceptions":[]}
Note that all of the test cases in that file have "file":null.
(“files” seems to be an aggregation from the 4 containers I’m running (parallelism: 4)
I have compared notes with someone running a Ruby project, and the JSON in his test container looks like:
And, as noted in the sample, all of his test cases have a file name.
Now, I assume that results.json is created out of the JUnit formatter results that get saved as part of the store_test_results step in the build. Looking into the XML that gets stored after a build, and comparing notes again with the Ruby project, it appears that for Ruby/Rspec projects, RspecJunitFormatter outputs XML that includes a file attribute, whereas the XML outputted from Elixir’s JUnit Formatter (https://github.com/victorolinasc/junit-formatter) does NOT have that field. Compare:
<testsuite>
<testcase classname="Elixir.FooProject.SomeQueryTest" name="test where stuff happens" time="0.1038"/>
</testsuite>
Okay, so one includes file names, the other does not. CircleCI’s split function has a --timings-type flag that can be passed-in to tell the splitter to either look for filename or classname. However, adding --timings-type=classname to the command does not fix the issue, instead, it causes a new error:
Read 359 lines of classname(s)
No timing found for "test/channels/test1.exs"
No timing found for "test/channels/test2.exs"
...
No timing found for "test/views/test200.exs"
No timing found for "test/views/test201.exs"
Bucket 0: assigning 90 classname(s), total weight 2799000
Which leads me to believe that CircleCI’s split utility requires a file name in the JUnit XML, which currently is not available in Elixir’s junit-formatter.
Can someone confirm this or not? Am I missing something in my configuration?
Config.yml
For thoroughness, here are the relevant parts of my config file:
Aside from timings not working, build run successfully with parallelization and files are split by filename.
In our project, timings were actually working until December 9th, 2019, when they suddenly stopped. We had not implemented JUnit and were not using workflows.
As of CircleCI v2.0, projects are expected to output their own JUnit XML.
Splitting by timing data should work regardless of using workflows or not.
Additionally, I would draw your attention to a comment made in the RspecJunitFormatter repo:
Specifically the comment:
I think both file and filename are non-standard. Junit is a pretty lean, and isn’t really standardised at all, it’s just what the original junit tool used to produce. But many tools consuming rspec junit formatter output now rely on the file attribute so we cannot remove it now. I’m afraid this might be a problem xunit needs to fix — to ignore unknown attributes, or something.
Another quick matrix update: To prepare for our work on implementing the matrix jobs functionality, matrix is now a “reserved keyword” in CircleCI Config Version 2.1; this won’t affect you unless you already have a parameterized job with a parameter called matrix. If you happen to encounter any config compilation errors because of this, it can be addressed by renaming the parameter to something else.
The problem was a context variable that was too big. I don’t know what the exact limit is, but suffice it to say you shouldn’t put certain MacOS provisioning profiles in a context or your build won’t get off the ground.
CircleCI devs, PMs – would be good to check for size when the user creates a context item and reject it if toooooo big.
Hey, I am trying to implement caching to speed up the time for testing of my app.
I have gotten CircleCi to save and restore the cache successfully.
However, it does still reinstall all of the dependencies each time, is this a bug or am I doing something wrong in my code?
Please see the message from CircleCi and my code below
Restoring response from CircleCI:
Found a cache from build 13 at deps1-CircleCi-caching-integration-x442no1rWzQq7IjN88tbxpE0VT7AchlwkRloCNuuS0k=
Size: 32 B
Cached paths:
* /home/circleci/project/venv
Downloading cache archive...
Validating cache...
Unarchiving cache...
So I run a pod search command in my fastlane that gets run on CircleCI that has always worked without issues in the past. Recently, it started abruptly exiting the CircleCI job without any helpful diagnostic messages (even after using the --verbose option). The only messages I see from CircleCI are “Error executing build steps” and “Build was canceled”. It doesn’t seem like it’s specific to pod search either. Doing pod repo update produces the same result.
@soybelles Hi and welcome to the forum! Please could you reach out to support so we can look into this further? I would like to check if this is related to a similar issue we have seen this week. Please send us a link to the last successful build and one of the cancelled builds. Thank you
Hey there! I’m currently trying to use caching to reduce the amount of time installing dependencies takes in my builds, but I’m seeing that even with caching implemented as suggested, yarn install is still taking ~1 minute, which is quite long, considering the restore_cache step is saying that it found an applicable cache. Does anyone see anything specifically wrong with my caching setup here?
Here’s my config: (these are steps in my main test build job)
#!/bin/bash -eo pipefail
yarn install --frozen-lockfile
yarn install v1.22.0
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.9: The platform "linux" is incompatible with this module.
info "fsevents@1.2.9" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
<various peer dependency warnings>
e.g.
warning " > babel-loader@8.0.6" has unmet peer dependency "webpack@>=2".
[4/4] Building fresh packages...
Done in 50.98s.
CircleCI received exit code 0
The cause of it taking 51 seconds eludes me! Locally, it takes 0.6s, so I thought it might be yarn’s internal registry cache, but even after clearing that with yarn cache clear, it was the same time. Am I missing something? I’d like to be able to knock a full minute off my build if possible. Let me know if whoever reads this needs more information as well, but I think this should be all of the pertinent config/logs.
It looks like there is a discrepancy between your migration and your result. You have a ALTER TABLE place_destinations in your migration, but it is reporting a CREATE TABLE "place_destinations" in the error.
Also you are talking about PostgreSQL tables, but this query is being run in SQLite.
Enabling pipelines – is this a potentially destructive action?
ie, will any existing configuration break? or is it backwards-compatible?
Enabling pipelines should not break your project. You can try out pipelines by adding pipelines: true in your config, before enabling it for your project.
Please feel free to ping this thread if you have any issues.
Hi Blair - We are actively working on enabling config to build as part of 2.1. I will ping this thread once the PR is merged. Thank you so much for your patience.
If env var interpolation still does not work for entrypoints and commands, you could try abandoning secondary Docker containers in the CircleCI infra, and spin up your images in Docker Compose inside your build container. I presume that you will have more control over the env vars you inject into the containers that way.
getting this error when trying to add my own swift package from a BitBucket private repo:
Fetching user@bitbucket.org:abcdef/org.git
[16:51:03]: ▸ xcodebuild: error: Could not resolve package dependencies:
[16:51:03]: ▸ The server SSH fingerprint failed to verify.
All of my other Git commands are working correctly, how do I control the SSH key that Xcode uses to fetch dependencies? I saw the below workaround for GitHub, but the workaround doesn’t seem to work for me (of course replacing GitHub.com with bitbucket.org).
Did anyone figure out how to get this working for rspec?
At a random point in the middle of December (with no circleci changes on our end as far as we can tell), every run of our circleci pipeline has the No timing found for… message for every file in the test suite.