Wykres commitów

42 Commity (master)

Autor SHA1 Wiadomość Data
Tomas Pohanka b057d5941e
Update GitHub Actions. (#1635)
Bump GitHub Actions from v2 to v4.
2024-02-21 09:08:16 +01:00
Yuri Astrakhan 4eb8feb0ad
Use tools v6.1, improve .env docs (#1281)
* Add info about using MID_ZOOM to optimize tile generation
* Remove params for generation that are now automatically detected


Co-authored-by: Tomas Pohanka <TomPohys@gmail.com>
2021-11-26 11:31:01 +01:00
Brian Sperlongano be37f3a565
Framework for SQL-based unit tests for import and updates (#1249)
This PR adds the ability to create SQL tests that ensure that OSM data is properly imported and updated in the OpenMapTiles data schema. The tests work by injecting test OSM data and updates into the database and checking to ensure that the data is properly loaded into the database using standard SQL statements.  With this framework in place, developers can now write small tests to inject known data into the database and ensure that imports and updates are working correctly.

In addition to the framework, basic tests are provided for four layers.  These initial tests are in no way comprehensive, but they provide a structure and framework for developers to add their own tests or expand the existing ones to cover more cases.

Usage:

`make clean && make sql-test`

## How it works
The SQL tests consist of the following parts:

1. **Test import data**, located in `tests/import`.  This test data is in the [OSM XML](https://wiki.openstreetmap.org/wiki/OSM_XML) format and contains the data that should be initially injected into the database.  The files are numbered in order to ensure that each test data file contains OSM id numbers that are distinct from the other files.  For example, the file starting with `100` will use node ids from 100000-199999, way ids from 1000-1999, and relation ids from 100-199.
1. **Test update data**, located in `tests/update`.  This test data is in the [osmChange XML](https://wiki.openstreetmap.org/wiki/OsmChange) format, and contains the data that will be used to update the test import data (in order to verify that the update process is working correctly.  These files are also numbered using the same scheme as the test import data.
1. **Import SQL test script**, located at `tests/test-post-import.sql`.  This script is executed after the test import data has been injected, and runs SQL-based checks to ensure that the import data was properly imported.  If there are failures in the tests, an entry will be added to the table `omt_test_failures`, with one record per error that occurs during the import process.  A test failure will also fail the build.  To inspect the test failure messages, run `make psql` and issue the comment `SELECT * FROM omt_test_failures`.
1. **Update SQL test script**, located at `tests/test-post-update.sql`.  This script performs the same function as the import test script, except that it occurs after the test update data has been applied to the database.  Note that script will only run if the import script passes all tests.
2021-10-28 13:38:46 +02:00
zstadler 596f44aa26
Integrity check for DIFF mode (#1245)
This test applies 2-3 months of weekly updates on the `europe/monaco` extract from [Geofabrik](http://download.geofabrik.de/europe/).

It is worth noting that the contents of the updates may vary, and some SQL update flows may not be tested if the relevant changes did not occur during that period.

Resolves #1226
2021-09-29 15:55:19 +02:00
Brian Sperlongano b4b897999d
Replace osmborder with imposm/SQL (#1213)
Fixes #1156
Fixes #810
Fixes #1228

This PR replaces `osmborder`, which is no longer maintained, with `imposm` mappings and SQL code to generate borders.  Key features that were moved into the imposm/SQL layer:
1. Grouping by `osm_id` and aggregating by lowest `admin_level` value so that there's only one copy of ways that are members of multiple relations.
2. Filtering out of point features in boundary relations (typically `admin_centre` and `label` roles).
3. Move disputed boundary detection logic into SQL.

This will increase the database size slightly because of the limits of what imposm can do, as some of the filtering is done in the SQL layer after importing, rather than being done in `osmborder`.
2021-09-29 11:08:55 +02:00
zstadler 5b0c28929f
Integrity check to generate zoom 14 tiles (#1231)
Setting the MIN/MAX zoom levels in the `env` section had no effect since the values in the `.env` file have higher precedence.

See the currently effective `maxzoom = 7` value in [a typical integrity check log]( https://github.com/openmaptiles/openmaptiles/pull/1223/checks#step:3:3546).
2021-09-20 17:09:18 +02:00
Brian Sperlongano 1fb7841a6e
Fix name of PR comment donor (#1196) 2021-08-27 09:56:02 -04:00
Brian Sperlongano 4525ce6a84
Convert CI to use workflow triggers (#1189)
Fixes #948 

This PR does the following:
1. Changes the trigger for the PR comment updater from the cron method to workflow_run, triggered on completion of the test cases.  This should remove the delay between the completion of the performance tests and the updating of the corresponding comment in the PR.
2. Separates the integrity check and performance check into separate workflows and allows them to run in parallel.  This will allow the project to take advantage of multiple CI runners if they're available (which appears to be the case).

In addition, this fixes an issue with post-merge undeleted/updated branches on PRs.  The current "cron" method causes the CI to run the pr-update job over and over forever, unnecessarily.

As described in github/docs#799, and the [github docs](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_run), a `workflow_run` trigger will only fire when the workflow file is on the main branch.  Thus, this change will not fire the PR updater on this PR.  Thus there's no way to test this working properly without merging onto master and then testing on one of the other PRs.
2021-08-27 14:16:48 +02:00
Yuri Astrakhan ae9498547d
Workflow updates - bump vers, print perfcache info (#1111) 2021-04-30 11:43:04 -04:00
Tomas Pohanka 485eb6892c
Release 3.12 prerequisite (#1056) 2020-12-16 14:38:58 +02:00
zstadler 424c4ee8a3
Remove workaround for quickstart.sh (#998) 2020-09-28 22:28:34 +03:00
Yuri Astrakhan ad8bd41567
Do not wait for integrity test (#934)
It's ok if integrity test fails -- makes the whole testing process faster by 10 minutes at a cost of some extra CPU cycles.
2020-06-14 11:02:44 -04:00
Tomas Pohanka 8f31655564
Change GitHub Actions to dedicated server (#929)
* Change GitHub Action to the dedicated server Ralph

* bugfix - let quickstart generate-tiles up to zoom 14
2020-06-12 11:04:33 +02:00
Yuri Astrakhan 1a9f6132c3
New generate-dc-config target, rm QUICKSTART_MIN/MAX_ZOOM (#915)
* Set `MAX_ZOOM` to 7 by default.
* Remove `QUICKSTART_MIN/MAX_ZOOM` - unneeded complexity with two env vars. We can just use `MIN_ZOOM` and `MAX_ZOOM`. See also #261
* Generate dc-config yaml file with a new `make generate-dc-config` step. It will compute BBOX based on the downloaded data file. This step is not needed for planet generation.
* Generate Imposm replication file only when `DIFF_MODE` is `true`. Not needed otherwise. If the data source does not support it, it will throw an error.
2020-06-04 15:45:04 -04:00
Yuri Astrakhan 1486b7e0cb
Rework download area support (#908)
Closes #904
* Make all data-related targets like `download*`, `import-osm`, `import-borders`, and `generate-tiles` into `area`-aware -- making it possible for multiple data files to coexist inside the `./data` dir.
* Add `make download area=... [url=...]` command to automatically download any kind of area by checking Geofabrik, BBBike, and OSM.fr, optionally from a custom URL. Supports `area=planet` too.
* Do not re-download area with `make download-*` if it already exists.
* Automatically rename `<area>-latest.osm.pbf` into `<area>.osm.pbf`
* If `area=...` parameter is not given to `make`, see if there is exactly one `*.osm.pbf` file, and if so, use `*` as the `area`.
* Configure many variables in the .env file, overriding the defaults in tools
* If `<area>.osm.pbf` exists, but `<area>.dc-config.pbf` is missing, generate it using `download-osm make-dc` command.

Also:
* closes #614
* closes #647
* partially addresses #261
2020-06-03 15:37:45 -04:00
Yuri Astrakhan cec49b23ba
Save DB schema during test run (#891)
Places the output of `pg_dump --schema-only` into the saved build artifact as `schema.sql`

Closes #877
2020-05-26 14:30:27 -04:00
zstadler 12542eb687
Unified naming convention for make targets (#862)
Following https://github.com/openmaptiles/openmaptiles/pull/821#issuecomment-625773180
2020-05-09 13:30:57 -04:00
Yuri Astrakhan dd3cb077a2
Improve GH action update-pr log messages (#860) 2020-05-07 17:20:06 -04:00
Yuri Astrakhan 632a33ed05
attempt to reset hardware before each test (#859)
* Trims SSD drives, flushes cache before each performance test. Unfortunately these are still incomplete -- need to use real hardware machines for all these to take effect.
* A bit more output in PR updater
2020-05-07 15:33:28 -04:00
Yuri Astrakhan d9fb768af8
Github Actions: Debug bbox test params (#857)
Somehow test fails on options in github actions, add debugging output for that cmd
2020-05-06 13:51:38 -04:00
Yuri Astrakhan c35cc59bda
Profiling tests: Large test data and wikidata caching (#855)
* Adds a script to downloads multiple areas and compute their test parameters
* added a large test that uses a combined 76MB file with equatorial-guinea, liechtenstein, district-of-columbia, greater-london
* cache wikidata downloads
2020-05-06 11:36:15 -04:00
Yuri Astrakhan 36c63ab41b
auto-build master-tools branch (#842)
`master-tools` branch is the same as `master` branch, except that it uses `latest` from the tools repo. This allows us to quickly track if master is compiling correct.
2020-05-05 12:18:34 -04:00
Yuri Astrakhan e0f111c9ef
Disable TTY in test-perf (sets proper width) (#849)
No TTY forces test-perf to use the default screen width for the output
2020-05-05 12:08:08 -04:00
Yuri Astrakhan 785ec93799
Improve workflow PR updates (#847)
Include closed PRs in the update cycle, because there could be a case that PR got closed before the job had a chance to finish, and we should still update it.
2020-05-05 09:56:49 -04:00
Yuri Astrakhan 365a2349f2
Use --bbox for test-perf testing (#850)
This approach allows us to change test data at any moment, without changing test-perf code.
2020-05-04 23:38:28 -04:00
Yuri Astrakhan 68911900c9
More performance profiling details (#845)
Results now show a table of how long each step took, as well as the PG database size change.

* use `time` to compute profiling for each step
* call postgres to get database size
2020-05-04 12:18:39 -04:00
Yuri Astrakhan 5445a70c30
workflow improvements (#840)
* 20 min seems to be too short, it skips some PRs
* fixed to proper URL printing in logs
2020-04-30 11:50:45 -04:00
Yuri Astrakhan 5f277b5023
Workflow - use insecure curl when can (#838)
Turned out that some update jobs failed due to

```
{
  "message": "Bad credentials",
  "documentation_url": "https://developer.github.com/v3"
}
```

This is probably due to credentials expiring (long workflow startup?),
or some internal github issue.

For now, removing authenticated `curl` calls because most
of them can be done anonymously, and keeping them only when needed.
2020-04-28 23:38:06 -04:00
Yuri Astrakhan d5569fb679
display raw data on error in workflow (#837)
trying to figure out what strange data is returned
by github that is not returned when testing locally
2020-04-28 21:41:07 -04:00
Yuri Astrakhan e037b5a7f6
PR workflow - error reporting and cleanup (#836)
optimize a bit the CI workflow PR commenting logic
to avoid some errors and better debugging messages.
2020-04-28 15:37:07 -04:00
Yuri Astrakhan f030f7ace7
Improve PR comment updater, bug fixes (#835)
* use proper number parsing
* skip PRs that weren't recently updated
* Better reporting
2020-04-28 11:10:24 -04:00
Yuri Astrakhan 33b91cee90
minor CI fix to handle no PRs (#834)
* delete output escaping (forgot to remove it -- was used for the older system)
* stop early if there are no pull requests (e.g. in case this is a fork)
2020-04-27 03:42:37 -04:00
Yuri Astrakhan 75a47109ee
Implement PR performance auto-update (#833)
A cron-based approach to find pull requests, possibly from forks,
that finished profiling, and post their results as comments.

See in-depth explanation of how this works at
https://github.com/nyurik/auto_pr_comments_from_forks
2020-04-27 02:37:57 -04:00
Yuri Astrakhan 479b83c0f0
in a CI test, print less junk (#831) 2020-04-24 16:44:02 -04:00
Yuri Astrakhan d7873db0c0
Implement PR performance testing (#824)
* On pull request and on commit, run base test followed by the test of the change,
comparing the results, and publishing the results to the Pull Request.
If the pull request is updated, the resulting comment will be updated.

* also save quickstart.log as an artifact

Note that due to GitHub workflow security restrictions, it is not possible to post PR comments if the change originated from a fork.  I am still looking for workarounds.

To view what would have been posted, in the build results at the bottom, open `PR performance` details, and expand the ` Comment on Pull Request` (and its subitem).

Optimizations: the process keeps two caches -- one for the data test file, and one for the results of the performance run for the "base" revision.  If this or other PR has been executed for the same revision and the same test data, performance test will only run for the proposed changes, not for the base.

Co-authored-by: Tomas Pohanka <TomPohys@gmail.com>
2020-04-24 09:20:59 -04:00
Yuri Astrakhan 2ca55abb7d
Use new import-data image (#818)
This is a partial migration of https://github.com/openmaptiles/openmaptiles/pull/785

* Use `import-data` instead of `import-lakelines`, `import-water`, and `import-natural-earth`
* Upgrade docker-compose.yml to version 2.3 (allows some extra env var usage in yaml file itself)
* Remove `openmaptiles-tools:latest` usage -- no longer needed, can use current version 4.1
* `db-start` does not do a container recreation in case docker-compose.yml definition has changed.
* a few minor cleanups in quickstart.sh
2020-04-22 02:48:57 -04:00
Tomas Pohanka 94881752d5
run CI in GitHub Actions
Use GitHub Action instead of TravisCI.

Do the same as Travis, but with full integration in GitHub.

based on https://github.com/openmaptiles/openmaptiles/issues/790
2020-04-01 16:46:42 +02:00
Mike Scheurwater 630d07de49 Fix typo in pull_request_template (#682) 2019-10-21 22:31:24 -04:00
jirik 196d57f1cc Add pull request template 2018-01-31 17:13:25 +01:00
jirik a46c530c2c Update issue template 2018-01-31 16:59:49 +01:00
Jiri Kozel 2b2051c085 Update issue_template.md 2017-09-28 12:07:50 +02:00
Petr Pridal 24915f8a8c Create issue_template.md 2017-09-28 00:01:04 +02:00