Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update_repo errors #308

Open
joeflack4 opened this issue May 15, 2023 · 8 comments
Open

update_repo errors #308

joeflack4 opened this issue May 15, 2023 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@joeflack4
Copy link
Contributor

joeflack4 commented May 15, 2023

Overview

I ran sh run.sh make update_repo, and it appears to have worked correctly, at least partially. However, I got these errors at the end:

run.sh: line 72: --env: command not found
run.sh: line 76: syntax error near unexpected token `else'
run.sh: line 76: `else'
Logs

log.txt

@joeflack4 joeflack4 added the bug Something isn't working label May 15, 2023
@matentzn
Copy link
Member

  1. Please ensure you are using the latest dev image
  2. you always have to run the command twice for it to work! Once to update the update process itself, once to run the update

@joeflack4
Copy link
Contributor Author

joeflack4 commented May 16, 2023

@matentzn I just updated my ODK dev image again, thanks.

I added a note about possibly needing to run update_repo twice in my add-new-source.md updates #307 PR.

However, there are two important things to note:

  1. This still doesn't address the errors I described.
  2. Running it a second time didn't seem to have a noticeable effect. I ran it, did git status, saw that there were new files. Then I ran it again, and there were no new files. Can see the results in this log: update_repo.txt

@matentzn
Copy link
Member

The linked PR does not contain config file changes. update_repo only does something when there are changes to mondo-ingest-odk.yaml? Why are you updating?

@joeflack4
Copy link
Contributor Author

joeflack4 commented May 17, 2023

Hey @matentzn I think you may be misunderstanding, but I have comments related to this in a number of different places so it is a bit confusing.

PR #307 is just for documentation.
PR #299 (GARD) has changes to mondo-ingest-odk.yaml, but holding off on committing those update_repo changes, since some of them are not GARD related, and some are GARD related. But I think what I'm going to do is run it 1 time in a new PR from #311 main. Then when that's merged, I'll rebase the GARD branch, then run it again.

@joeflack4
Copy link
Contributor Author

joeflack4 commented Feb 6, 2024

@matentzn Just noting that, (i) running it 2x produces no new results (context), (ii) but running it a second time does produce no errors), and (iii) I'm still getting errors from running it the first time (see copy/paste of log below; or here for context).

Errors

Running with -Xmx20G of memory for ROBOT and Java-based pipeline steps.
make: Entering directory '/work/src/ontology'

mondo-ingest.Makefile:70: warning: overriding recipe for target 'components/omim.owl'
Makefile:447: warning: ignoring old recipe for target 'components/omim.owl'
mondo-ingest.Makefile:85: warning: overriding recipe for target 'components/ordo.owl'
Makefile:458: warning: ignoring old recipe for target 'components/ordo.owl'
mondo-ingest.Makefile:104: warning: overriding recipe for target 'components/ncit.owl'
Makefile:436: warning: ignoring old recipe for target 'components/ncit.owl'
mondo-ingest.Makefile:115: warning: overriding recipe for target 'components/doid.owl'
Makefile:392: warning: ignoring old recipe for target 'components/doid.owl'
mondo-ingest.Makefile:137: warning: overriding recipe for target 'component-download-icd10cm.owl'
Makefile:410: warning: ignoring old recipe for target 'component-download-icd10cm.owl'
mondo-ingest.Makefile:143: warning: overriding recipe for target 'components/icd10cm.owl'
Makefile:414: warning: ignoring old recipe for target 'components/icd10cm.owl'
mondo-ingest.Makefile:158: warning: overriding recipe for target 'components/icd10who.owl'
Makefile:425: warning: ignoring old recipe for target 'components/icd10who.owl'
mondo-ingest.Makefile:173: warning: overriding recipe for target 'component-download-gard.owl'
Makefile:399: warning: ignoring old recipe for target 'component-download-gard.owl'
mondo-ingest.Makefile:177: warning: overriding recipe for target 'components/gard.owl'
Makefile:403: warning: ignoring old recipe for target 'components/gard.owl'
mondo-ingest.Makefile:182: warning: overriding recipe for target 'mondo-ingest-full.owl'
Makefile:588: warning: ignoring old recipe for target 'mondo-ingest-full.owl'
mondo-ingest.Makefile:584: warning: overriding recipe for target 'help'
Makefile:659: warning: ignoring old recipe for target 'help'

sh ../scripts/update_repo.sh
This (experimental) update script will create a new repo according to your config file. It will:
(1) overwrite your repositories Makefile, ODK sparql queries (your custom queries wont be touched) and docker wrapper (run.sh).
(2) and add missing files, if any.

INFO:root: Copying: /tools/templates/CONTRIBUTING.md.jinja2 -> target/mondo-ingest/CONTRIBUTING.md.jinja2
INFO:root: Copying: /tools/templates/.gitignore.jinja2 -> target/mondo-ingest/.gitignore.jinja2
INFO:root: Copying: /tools/templates/README.md.jinja2 -> target/mondo-ingest/README.md.jinja2
INFO:root: Copying: /tools/templates/issue_template.md.jinja2 -> target/mondo-ingest/issue_template.md.jinja2
INFO:root: Copying: /tools/templates/_dynamic_files.jinja2 -> target/mondo-ingest/_dynamic_files.jinja2
INFO:root: Copying: /tools/templates/CODE_OF_CONDUCT.md -> target/mondo-ingest/CODE_OF_CONDUCT.md
INFO:root:Applying templates
INFO:root: Compiling: /tools/templates/CONTRIBUTING.md.jinja2 -> target/mondo-ingest/CONTRIBUTING.md
INFO:root: Compiling: /tools/templates/.gitignore.jinja2 -> target/mondo-ingest/.gitignore
INFO:root: Compiling: /tools/templates/README.md.jinja2 -> target/mondo-ingest/README.md
INFO:root: Compiling: /tools/templates/issue_template.md.jinja2 -> target/mondo-ingest/issue_template.md
INFO:root: Unpacking: target/mondo-ingest/_dynamic_files
INFO:root: Unpacking into: target/mondo-ingest/src/ontology/mondo-ingest-edit.owl
INFO:root: Unpacking into: target/mondo-ingest/src/ontology/mondo-ingest-idranges.owl
INFO:root: Unpacking into: target/mondo-ingest/src/ontology/mondo-ingest.Makefile
INFO:root: Unpacking into: target/mondo-ingest/src/ontology/imports/ro_import.owl
INFO:root: Unpacking into: target/mondo-ingest/src/ontology/imports/omo_import.owl
INFO:root: Unpacking into: target/mondo-ingest/src/ontology/imports/ro_terms.txt
INFO:root: Unpacking into: target/mondo-ingest/src/ontology/imports/omo_terms.txt
INFO:root: Unpacking into: target/mondo-ingest/src/sparql/mondo-ingest_terms.sparql
INFO:root: Unpacking into: target/mondo-ingest/src/ontology/components/doid.owl
INFO:root: Unpacking into: target/mondo-ingest/src/ontology/components/gard.owl
INFO:root: Unpacking into: target/mondo-ingest/src/ontology/components/icd10cm.owl
INFO:root: Unpacking into: target/mondo-ingest/src/ontology/components/icd10who.owl
INFO:root: Unpacking into: target/mondo-ingest/src/ontology/components/icd11.owl
INFO:root: Unpacking into: target/mondo-ingest/src/ontology/components/ncit.owl
INFO:root: Unpacking into: target/mondo-ingest/src/ontology/components/omim.owl
INFO:root: Unpacking into: target/mondo-ingest/src/ontology/components/ordo.owl
INFO:root: Unpacking into: target/mondo-ingest/src/ontology/profile.txt
INFO:root: Unpacking into: target/mondo-ingest/.github/workflows/qc.yml
INFO:root: Unpacking into: target/mondo-ingest/docs/index.md
INFO:root: Unpacking into: target/mondo-ingest/docs/cite.md
INFO:root: Unpacking into: target/mondo-ingest/docs/contributing.md
INFO:root: Unpacking into: target/mondo-ingest/docs/odk-workflows/index.md
INFO:root: Unpacking into: target/mondo-ingest/docs/odk-workflows/ContinuousIntegration.md
INFO:root: Unpacking into: target/mondo-ingest/docs/odk-workflows/EditorsWorkflow.md
INFO:root: Unpacking into: target/mondo-ingest/docs/odk-workflows/ReleaseWorkflow.md
INFO:root: Unpacking into: target/mondo-ingest/docs/odk-workflows/RepoManagement.md
INFO:root: Unpacking into: target/mondo-ingest/docs/odk-workflows/RepositoryFileStructure.md
INFO:root: Unpacking into: target/mondo-ingest/docs/odk-workflows/SettingUpDockerForODK.md
INFO:root: Unpacking into: target/mondo-ingest/docs/odk-workflows/UpdateImports.md
INFO:root: Unpacking into: target/mondo-ingest/docs/odk-workflows/components.md
INFO:root: Unpacking into: target/mondo-ingest/docs/odk-workflows/ManageDocumentation.md
INFO:root: Unpacking into: target/mondo-ingest/mkdocs.yaml
INFO:root: Unpacking into: target/mondo-ingest/.github/workflows/docs.yml
INFO:root:Applying templates
INFO:root: Copying: /tools/templates/src/sparql/xrefs.sparql -> target/mondo-ingest/src/sparql/xrefs.sparql
INFO:root: Copying: /tools/templates/src/sparql/labels.sparql -> target/mondo-ingest/src/sparql/labels.sparql
INFO:root: Copying: /tools/templates/src/sparql/subsets-labeled.sparql -> target/mondo-ingest/src/sparql/subsets-labeled.sparql
INFO:root: Copying: /tools/templates/src/sparql/edges.sparql -> target/mondo-ingest/src/sparql/edges.sparql
INFO:root: Copying: /tools/templates/src/sparql/inject-synonymtype-declaration.ru.jinja2 -> target/mondo-ingest/src/sparql/inject-synonymtype-declaration.ru.jinja2
INFO:root: Copying: /tools/templates/src/sparql/obsoletes.sparql -> target/mondo-ingest/src/sparql/obsoletes.sparql
INFO:root: Copying: /tools/templates/src/sparql/README.md.jinja2 -> target/mondo-ingest/src/sparql/README.md.jinja2
INFO:root: Copying: /tools/templates/src/sparql/preprocess-module.ru -> target/mondo-ingest/src/sparql/preprocess-module.ru
INFO:root: Copying: /tools/templates/src/sparql/terms.sparql -> target/mondo-ingest/src/sparql/terms.sparql
INFO:root: Copying: /tools/templates/src/sparql/inject-subset-declaration.ru.jinja2 -> target/mondo-ingest/src/sparql/inject-subset-declaration.ru.jinja2
INFO:root: Copying: /tools/templates/src/sparql/basic-report.sparql -> target/mondo-ingest/src/sparql/basic-report.sparql
INFO:root: Copying: /tools/templates/src/sparql/simple-seed.sparql -> target/mondo-ingest/src/sparql/simple-seed.sparql
INFO:root: Copying: /tools/templates/src/sparql/synonyms.sparql -> target/mondo-ingest/src/sparql/synonyms.sparql
INFO:root: Copying: /tools/templates/src/sparql/postprocess-module.ru -> target/mondo-ingest/src/sparql/postprocess-module.ru
INFO:root:Applying templates
INFO:root: Compiling: /tools/templates/src/sparql/inject-synonymtype-declaration.ru.jinja2 -> target/mondo-ingest/src/sparql/inject-synonymtype-declaration.ru
INFO:root: Compiling: /tools/templates/src/sparql/README.md.jinja2 -> target/mondo-ingest/src/sparql/README.md
INFO:root: Compiling: /tools/templates/src/sparql/inject-subset-declaration.ru.jinja2 -> target/mondo-ingest/src/sparql/inject-subset-declaration.ru
INFO:root: Copying: /tools/templates/src/scripts/update_repo.sh.jinja2 -> target/mondo-ingest/src/scripts/update_repo.sh.jinja2
INFO:root: Copying: /tools/templates/src/scripts/validate_id_ranges.sc -> target/mondo-ingest/src/scripts/validate_id_ranges.sc
INFO:root: Copying: /tools/templates/src/scripts/run-command.sh -> target/mondo-ingest/src/scripts/run-command.sh
INFO:root:Applying templates
INFO:root: Compiling: /tools/templates/src/scripts/update_repo.sh.jinja2 -> target/mondo-ingest/src/scripts/update_repo.sh
INFO:root: Copying: /tools/templates/src/ontology/run.sh.jinja2 -> target/mondo-ingest/src/ontology/run.sh.jinja2
INFO:root: Copying: /tools/templates/src/ontology/README-editors.md.jinja2 -> target/mondo-ingest/src/ontology/README-editors.md.jinja2
INFO:root: Copying: /tools/templates/src/ontology/run.bat.jinja2 -> target/mondo-ingest/src/ontology/run.bat.jinja2
INFO:root: Copying: /tools/templates/src/ontology/catalog-v001.xml.jinja2 -> target/mondo-ingest/src/ontology/catalog-v001.xml.jinja2
INFO:root: Copying: /tools/templates/src/ontology/Makefile.jinja2 -> target/mondo-ingest/src/ontology/Makefile.jinja2
INFO:root:Applying templates
INFO:root: Compiling: /tools/templates/src/ontology/run.sh.jinja2 -> target/mondo-ingest/src/ontology/run.sh
INFO:root: Compiling: /tools/templates/src/ontology/README-editors.md.jinja2 -> target/mondo-ingest/src/ontology/README-editors.md
INFO:root: Compiling: /tools/templates/src/ontology/run.bat.jinja2 -> target/mondo-ingest/src/ontology/run.bat
INFO:root: Compiling: /tools/templates/src/ontology/catalog-v001.xml.jinja2 -> target/mondo-ingest/src/ontology/catalog-v001.xml
INFO:root: Compiling: /tools/templates/src/ontology/Makefile.jinja2 -> target/mondo-ingest/src/ontology/Makefile
INFO:root:Created files:
INFO:root: File: target/mondo-ingest/CODE_OF_CONDUCT.md
INFO:root: File: target/mondo-ingest/CONTRIBUTING.md
INFO:root: File: target/mondo-ingest/.gitignore
INFO:root: File: target/mondo-ingest/README.md
INFO:root: File: target/mondo-ingest/issue_template.md
INFO:root: File: target/mondo-ingest/src/ontology/mondo-ingest-edit.owl
INFO:root: File: target/mondo-ingest/src/ontology/mondo-ingest-idranges.owl
INFO:root: File: target/mondo-ingest/src/ontology/mondo-ingest.Makefile
INFO:root: File: target/mondo-ingest/src/ontology/imports/ro_import.owl
INFO:root: File: target/mondo-ingest/src/ontology/imports/omo_import.owl
INFO:root: File: target/mondo-ingest/src/ontology/imports/ro_terms.txt
INFO:root: File: target/mondo-ingest/src/ontology/imports/omo_terms.txt
INFO:root: File: target/mondo-ingest/src/sparql/mondo-ingest_terms.sparql
INFO:root: File: target/mondo-ingest/src/ontology/components/doid.owl
INFO:root: File: target/mondo-ingest/src/ontology/components/gard.owl
INFO:root: File: target/mondo-ingest/src/ontology/components/icd10cm.owl
INFO:root: File: target/mondo-ingest/src/ontology/components/icd10who.owl
INFO:root: File: target/mondo-ingest/src/ontology/components/icd11.owl
INFO:root: File: target/mondo-ingest/src/ontology/components/ncit.owl
INFO:root: File: target/mondo-ingest/src/ontology/components/omim.owl
INFO:root: File: target/mondo-ingest/src/ontology/components/ordo.owl
INFO:root: File: target/mondo-ingest/src/ontology/profile.txt
INFO:root: File: target/mondo-ingest/.github/workflows/qc.yml
INFO:root: File: target/mondo-ingest/docs/index.md
INFO:root: File: target/mondo-ingest/docs/cite.md
INFO:root: File: target/mondo-ingest/docs/contributing.md
INFO:root: File: target/mondo-ingest/docs/odk-workflows/index.md
INFO:root: File: target/mondo-ingest/docs/odk-workflows/ContinuousIntegration.md
INFO:root: File: target/mondo-ingest/docs/odk-workflows/EditorsWorkflow.md
INFO:root: File: target/mondo-ingest/docs/odk-workflows/ReleaseWorkflow.md
INFO:root: File: target/mondo-ingest/docs/odk-workflows/RepoManagement.md
INFO:root: File: target/mondo-ingest/docs/odk-workflows/RepositoryFileStructure.md
INFO:root: File: target/mondo-ingest/docs/odk-workflows/SettingUpDockerForODK.md
INFO:root: File: target/mondo-ingest/docs/odk-workflows/UpdateImports.md
INFO:root: File: target/mondo-ingest/docs/odk-workflows/components.md
INFO:root: File: target/mondo-ingest/docs/odk-workflows/ManageDocumentation.md
INFO:root: File: target/mondo-ingest/mkdocs.yaml
INFO:root: File: target/mondo-ingest/.github/workflows/docs.yml
INFO:root: File: target/mondo-ingest/src/sparql/xrefs.sparql
INFO:root: File: target/mondo-ingest/src/sparql/labels.sparql
INFO:root: File: target/mondo-ingest/src/sparql/subsets-labeled.sparql
INFO:root: File: target/mondo-ingest/src/sparql/edges.sparql
INFO:root: File: target/mondo-ingest/src/sparql/obsoletes.sparql
INFO:root: File: target/mondo-ingest/src/sparql/preprocess-module.ru
INFO:root: File: target/mondo-ingest/src/sparql/terms.sparql
INFO:root: File: target/mondo-ingest/src/sparql/basic-report.sparql
INFO:root: File: target/mondo-ingest/src/sparql/simple-seed.sparql
INFO:root: File: target/mondo-ingest/src/sparql/synonyms.sparql
INFO:root: File: target/mondo-ingest/src/sparql/postprocess-module.ru
INFO:root: File: target/mondo-ingest/src/sparql/inject-synonymtype-declaration.ru
INFO:root: File: target/mondo-ingest/src/sparql/README.md
INFO:root: File: target/mondo-ingest/src/sparql/inject-subset-declaration.ru
INFO:root: File: target/mondo-ingest/src/scripts/validate_id_ranges.sc
INFO:root: File: target/mondo-ingest/src/scripts/run-command.sh
INFO:root: File: target/mondo-ingest/src/scripts/update_repo.sh
INFO:root: File: target/mondo-ingest/src/ontology/run.sh
INFO:root: File: target/mondo-ingest/src/ontology/README-editors.md
INFO:root: File: target/mondo-ingest/src/ontology/run.bat
INFO:root: File: target/mondo-ingest/src/ontology/catalog-v001.xml
INFO:root: File: target/mondo-ingest/src/ontology/Makefile
INFO:root: File: target/mondo-ingest/src/ontology/mondo-ingest-odk.yaml

Repository files have been successfully copied, but no git commands have been run.

total 0
drwxr-xr-x 14 odkuser dialout 448 Feb 5 00:09 ontology
drwxr-xr-x 5 odkuser dialout 160 Feb 5 00:09 scripts
drwxr-xr-x 17 odkuser dialout 544 Feb 5 00:09 sparql
total 0
drwxr-xr-x 3 odkuser dialout 96 Oct 14 21:32 analysis
drwxr-xr-x 14 odkuser dialout 448 Feb 5 00:01 mappings
drwxr-xr-x 28 root root 896 Feb 5 00:09 ontology
drwxr-xr-x 24 odkuser dialout 768 Feb 5 00:01 scripts
drwxr-xr-x 72 odkuser dialout 2304 Feb 5 00:01 sparql

WARNING: These files should be manually migrated: mkdocs.yaml, .gitignore, src/ontology/catalog.xml (if you added a new import or component)
WARNING: Your QC workflows have not been updated automatically. Please update the ODK version number(s) in .github/workflows/qc.yml.

../scripts/update_repo.sh: 39: Syntax error: Unterminated quoted string
make: *** [Makefile:642: update_repo] Error 2
make: Leaving directory '/work/src/ontology'
Command exited with non-zero status 2
### DEBUG STATS ###
Elapsed time: 0:00.45
Peak memory: 33012 kb
run.sh: line 100: DEBUG: command not found
run.sh: line 101: syntax error near unexpected token fi' run.sh: line 101: fi'

This was referenced Feb 6, 2024
@joeflack4
Copy link
Contributor Author

joeflack4 commented Feb 6, 2024

Suggestion:
If we're supposed to run update_repo 2x everytime as a hack right now, we could just set up the make goal so that it automatically runs 2x. See: ignoring errors in make

@matentzn
Copy link
Member

matentzn commented Feb 7, 2024

If we're supposed to run update_repo 2x everytime as a hack right now, we could just set up the make goal so that it automatically runs 2x. See: ignoring errors in make

Hmm.. Not a bad idea actually. Can you make an ODK issue about this? I will see if I implement that!

@joeflack4
Copy link
Contributor Author

joeflack4 commented Feb 7, 2024

@matentzn Done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants