itpp-labs / dinar Goto Github PK
View Code? Open in Web Editor NEWGithub Actions based runbot alternative for odoo addons
License: Apache License 2.0
Github Actions based runbot alternative for odoo addons
License: Apache License 2.0
The artifact may absent at the moment of execution script: either because it's not ready yet or because it's not created in specific build
Currently it uses master. It should be static and updated in DINAR2fork.yml workflow
Content of /opt/odoo/auto/test-artifacts/
should be available to download on github action page, e.g.
https://github.com/itpp-labs/misc-addons/pull/1017/checks?check_run_id=1432137285
odoo_1 | 2020-11-20 16:45:02,787 1 INFO DINAR odoo.addons.project_task_subtask.tests.test_subtask_sort_button.TestUi:
Screenshot in: /opt/odoo/auto/test-artifacts/DINAR/screenshots/sc_20201120_164502_786724_TestUi.png
The posible workaround could be making a push event to any file of .DINAR/
folder. It can be done directly in specific branch of a repo OR it can be done in forked DINAR and propagated by fork2repos script
Not sure it should be automated. I'd prefer just document this workaround
https://github.com/yelizariev/addons-yelizariev/runs/471594426
Error response from daemon: Error processing tar file(exit status 1): failed to mknod("/var/lib/postgresql/data-novolume/pg_wal/000000010000000000000001", S_IFCHR, 0): file exists
https://github.com/itpp-labs/sync-addons/actions/runs/3219926194/jobs/5265950297
Traceback (most recent call last):
File "/home/runner/.cache/pre-commit/repoazk14xe_/py_env-python3/bin/flake8", line 8, in <module>
sys.exit(main())
File "/home/runner/.cache/pre-commit/repoazk14xe_/py_env-python3/lib/python3.7/site-packages/flake8/main/cli.py", line 22, in main
app.run(argv)
File "/home/runner/.cache/pre-commit/repoazk14xe_/py_env-python3/lib/python3.7/site-packages/flake8/main/application.py", line 363, in run
self._run(argv)
File "/home/runner/.cache/pre-commit/repoazk14xe_/py_env-python3/lib/python3.7/site-packages/flake8/main/application.py", line 350, in _run
self.initialize(argv)
File "/home/runner/.cache/pre-commit/repoazk14xe_/py_env-python3/lib/python3.7/site-packages/flake8/main/application.py", line 330, in initialize
self.find_plugins(config_finder)
File "/home/runner/.cache/pre-commit/repoazk14xe_/py_env-python3/lib/python3.7/site-packages/flake8/main/application.py", line 153, in find_plugins
self.check_plugins = plugin_manager.Checkers(local_plugins.extension)
File "/home/runner/.cache/pre-commit/repoazk14xe_/py_env-python3/lib/python3.7/site-packages/flake8/plugins/manager.py", line 357, in __init__
self.namespace, local_plugins=local_plugins
File "/home/runner/.cache/pre-commit/repoazk14xe_/py_env-python3/lib/python3.7/site-packages/flake8/plugins/manager.py", line 238, in __init__
self._load_entrypoint_plugins()
File "/home/runner/.cache/pre-commit/repoazk14xe_/py_env-python3/lib/python3.7/site-packages/flake8/plugins/manager.py", line 254, in _load_entrypoint_plugins
eps = importlib_metadata.entry_points().get(self.namespace, ())
AttributeError: 'EntryPoints' object has no attribute 'get'
In private repositories pull requests should not be forked. That is a developer creates a temporary branch for this. Such a branch doesn't need own docker images. So, we need to disable the workflow for such cases.
On the other hand, there is a case when new temporary branch is created to send PRs there. In that case we need the docker images.
So, the specification could be as following:
make images only for main branches (10.0
, 11.0
, etc.) and development branches (10.0-dev-<some-name>
, 11.0-dev-<another-name>
Print some information about updates:
Should be used: https://github.blog/2020-08-03-github-actions-improvements-for-fork-and-pull-request-workflows/
https://github.com/itpp-labs/sync-addons/runs/1305131540?check_suite_focus=true
odoo_1 | doodba INFO: Executing odoo --limit-memory-soft=0 --limit-time-real-cron=9999999 --limit-time-real=9999999 --workers=0 --init=report,base_action_rule,crm,contacts,web_settings_dashboard,web_tour --stop-after-init
We should add support for comma-separated list of module to port
pre-commit работает неккорректно, Похоже пайлинт даёт ложно позитивный результат
в манифесте есть требования, но пишет что не может найти
************* Module sync_telegram.models.sync_project
sync_telegram/models/sync_project.py:11: [W7936(missing-manifest-dependency), ] Missing external dependency "telegram" from manifest. More info: https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#external-dependencies
GITHUB_TOKEN already has required permissions:
https://docs.github.com/en/free-pro-team@latest/actions/reference/authentication-in-a-workflow#permissions-for-the-github_token
It's basically adding the following header to every file
# Copyright 2020 IT-Projects Labs
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
Similar to odoo's bot: https://github.com/odoo/odoo/wiki/Mergebot#forward-port
But without any command: just always make forward port PR if module is available (and installable) in next version)
It takes about 4 minutes to execute "docker save" and unpack with pipe.
We need to try using "docker export" before and after modules installation. Then diff can be extracted from two snapshots
pre-commit run --show-diff-on-failure --color=always --show-diff-on-failure --files $(git diff --name-only --no-ext-diff -z 14.0..HEAD)
From https://github.com/itpp-labs/pos-addons
* branch 14.0 -> FETCH_HEAD
* [new branch] 14.0 -> origin/14.0
fatal: ambiguous argument '14.0..HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
autoflake..........................................
We need deleting old/unused packages
Probably a cron + https://github.com/marketplace/actions/delete-package-versions#delete-oldest-x-number-of-versions-of-a-package-hosted-in-the-same-repo-as-the-workflow
Workaround for now: update dependencies in upstream first and then make\update the Pull Request
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.