First, I initialized gqlgen.
go run github.com/99designs/gqlgen init
Second, I fixed resolver.go and schema.resolvers.go
And, I execute this. Then error has occurred.
$ go run github.com/99designs/gqlgen generate
reloading module info
modelgen: unable to find type: github.com/99designs/gqlgen/interfaces.Int
exit status 1
Do you know what is problem?
I did not expect what is problem.
I add this to gqlgen.yml, problem is solved.
models:
ID:
model:
- github.com/99designs/gqlgen/graphql.ID
- github.com/99designs/gqlgen/graphql.Int
- github.com/99designs/gqlgen/graphql.Int64
- github.com/99designs/gqlgen/graphql.Int32
Int:
model:
- github.com/99designs/gqlgen/graphql.Int
- github.com/99designs/gqlgen/graphql.Int64
- github.com/99designs/gqlgen/graphql.Int32
Related
I encountered this error below, shown from our CI logs. I'm confused about which is causing this since there are two errors shown consecutively.
My colleague suspected this was caused by the previous build files. I tried to update the expires_in to 1 day, hoping it would clear the previous one, but it seems it doesn't have any effect.
As of now, I'm trying to look for examples of how to delete the previous build before executing the script, but I can't find any references to it. Does anybody have any suggestions on how to fix this one?
// <----------- tests were all passed
Tests:
207 passed
Time:
444.37s
// <----------- first error shown
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in ....
// <----------- and this error shown at the bottom part
Uploading artifacts
WARNING
Path coverage does not exist
WARNING
Path ./report.xml does not exist
FATAL
Error creating artifact: All paths are empty
Job failed with exit code 255
jobs:
- name: PHP Unit Test
stage: test
image: sunasp4/php-workspace:7.4
workspace: shared
before_script:
- php artisan optimize:clear
script:
- php artisan test --coverage-clover ./report.xml --coverage-html=coverage
only:
events:
- pull_request
coverage:
type: clover
path: ./report.xml
artifacts:
paths:
- coverage
expires_in: 2 days
I am running some screen diffing tests in one of my Cloud Build steps. The tests produce png files that I would like to view after the build, but it appears to upload artifacts on successful builds.
If my test fail, the process exits with a non-zero code, which results in this error:
ERROR: build step 0 "gcr.io/k8s-skaffold/skaffold" failed: step exited with non-zero status: 1
Which further results in another error
ERROR: (gcloud.builds.submit) build a22d1ab5-c996-49fe-a782-a74481ad5c2a completed with status "FAILURE"
And no artifacts get uploaded.
I added || true after my tests, so it exits successfully, and the artifacts get uploaded.
I want to:
A) Confirm that this behavior is expected
B) Know if there is a way to upload artifacts even if a step fails
Edit:
Here is my cloudbuild.yaml
options:
machineType: 'N1_HIGHCPU_32'
timeout: 3000s
steps:
- name: 'gcr.io/k8s-skaffold/skaffold'
env:
- 'CLOUD_BUILD=1'
entrypoint: bash
args:
- -x # print commands as they are being executed
- -c # run the following command...
- build/test/smoke/smoke-test.sh
artifacts:
objects:
location: 'gs://cloudbuild-artifacts/$BUILD_ID'
paths: [
'/workspace/build/test/cypress/screenshots/*.png'
]
Google Cloud Build doesn't allow us to upload artifacts (or run some steps ) if a build step fails. This is the expected behavior.
There is an already feature request created in Public Issue Tracker to allow us to run some steps even though the build has finished or failed. Please feel free to star it to get all the related updates on this issue.
A workaround per now is as you mentioned using || true after the tests or use || exit 0 as mentioned in this Github issue.
I am building websites with Hugo and deploying using Travis-Ci. Recently (about within 3 days) an error occurred:
$ go get github.com/gohugoio/hugo
# github.com/gohugoio/hugo/tpl/internal/go_templates/fmtsort
../../gohugoio/hugo/tpl/internal/go_templates/fmtsort/sort.go:58:18: mapValue.MapRange undefined (type reflect.Value has no field or method MapRange)
The command "go get github.com/gohugoio/hugo" failed and exited with 2 during .
Since the code errored at go get line, I think it must be caused by some updates by Hugo.
.travis.yml
sudo: false
language: go
git:
depth: 1
install:
- go get github.com/gohugoio/hugo
script:
- git submodule init
- git submodule update
- hugo
# Deploy to GitHub pages
deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
local_dir: public
on:
branch: master
Since Hugo 0.48, Hugo uses the Go Modules support built into Go 1.11 to build.
docker run -it golang:1.10
root#2598ed7e489d: go get github.com/gohugoio/hugo
src/github.com/gohugoio/hugo/tpl/internal/go_templates/fmtsort/sort.go:58:18: mapValue.MapRange undefined (type reflect.Value has no field or method MapRange)
docker run -it golang:1.11
root#07e6e634656a: go get https://github.com/gohugoio/hugo
will not return any error
using go versions > 1.11 will not cause this issue.
In example 1,similar error is there.
In example 2,it is installed successfully.
So I am trying to learn CircleCI and been following the getting started tutorial: https://circleci.com/docs/2.0/getting-started/
config.yml:
version: 2
jobs:
one:
docker:
- image: circleci/ruby:2.4.1
steps:
- checkout
- run: echo "A first hello"
- run: sleep 25
two:
docker:
- image: circleci/ruby:2.4.1
steps:
- checkout
- run: echo "A more familiar hi"
- run: sleep 15
workflows:
version: 2
one_and_two:
jobs:
- one
- two
This returns
Error: Unable to parse YAML
mapping values are not allowed here
in 'string', line 2, column 6:
jobs:
^
I don't understand the problem. From the documentation, it appears that it is the correct indentation level. So what is the source of this error, exactly?
The documentation shows clearly that version and jobs must be on the same indentation level. If you indent jobs more, you make it part of the scalar 2.
This would be valid YAML:
version: 2
jobs
and equalivalent to:
version: 2 jobs
However, the : after jobs makes it invalid since YAML does not allow implicit keys to be multi-line (version: would be a proper implicit key).
To fix the error, simply do not indent jobs more than version.
I'm running the cypress-example-kitchen sink app on CircleCI.
This is my yaml config script:
version: 2.1
orbs:
cypress: cypress-io/cypress#1.0.1
workflows:
build:
jobs:
- cypress/install:
build: 'npm run build'
- cypress/run:
requires:
- cypress/install
start: 'npm start'
This kicks off and passes just fine when I make a commit to my fork of the repo above.
However, when I try to execute a CircleCI build programmatically, using
curl -X POST https://circleci.com/api/v1.1/project/github/Atticus29/cypress-example-kitchensink?circle-token=myApiToken, the build fails and the jobs dashboard on CircleCI tells me that something is wrong with my config file:
6 schema violations found required key [jobs] not found workflows:
5 schema violations found
workflows: minimum size: [2], found: 1
workflows: build: jobs: 4 schema violations found
workflows: build: jobs: 0: 0 subschemas matched instead of one
workflows: build: jobs: 0: expected type: String, found: Mapping
workflows: build: jobs: 0: install: extraneous key [build] is not permitted
workflows: build: jobs: 1: 0 subschemas matched instead of one
workflows: build: jobs: 1: expected type: String, found: Mapping
workflows: build: jobs: 1: run: extraneous key [start] is not permitted
And that something went wrong with my build:
Build-agent version 0.1.1216-48f80d08 (2018-12-07T16:01:40+0000)
Configuration errors: 2 errors occurred:
Configuration version 2.1 requires the "Enable Build Processing" project setting. Enable Build Processing under Project Settings ->
Advanced Settings. In order to retrigger build processing, you must
push a new commit.
Cannot find a job named build to run in the jobs: section of your configuration file. If you expected a workflow to run, check your
config contains a top-level key called 'workflows:'
I can confirm that Enable Build Processing is on.
None of these were problems when I ran the build in the usual way. Any advice?
Circle CI for some reason keeps on assuming that the projects are not set up for v2.0 despite config.yml being called the right thing and living in the right place in the repo. After a few commits, this issue seems to go away?
I ended up running a build programmatically with the following script:
#!/bin/bash
PERSONAL_TOKEN=myPersonalTokenHere
MOST_RECENT_BUILD=`curl -s "https://circleci.com/api/v1.1/recent-builds?circle-token=$PERSONAL_TOKEN&limit=1"| grep 'build_num'|grep -o '\d.'|sed 's/,//g'|sort -r -n|head -n1`
curl -X POST "https://circleci.com/api/v1.1/project/github/holmbergius/wildMeCypress/$MOST_RECENT_BUILD/retry?circle-token=$PERSONAL_TOKEN"