Closed Totktonada closed 3 years ago
The plan for discarding v2 is the following:
The latest tag of http v1 was set on commit da1407c. Main changes for http v2 were done in https://github.com/tarantool/http/pull/90.
Below is a list of commits between tag 1.1.0 and HEAD (git log --oneline da1407c..HEAD
) with resolution regarding each commit (keep or revert).
e7e00ea Merge pull request #79 from tarantool/51-html-escaping - keep, fix of issue #51, seems not related to http v2.
16c761a add a test - keep, fix of issue #51, seems not related to http v2.
05ad424 Check ptr to string before use it - keep, fix of issue #51, seems not related to http v2.
8909e39 Merge pull request #126 from tarantool/raw_setcookie - keep, fix of issue #114.
42e3002 Added ability to set and get cookie without escaping. - keep, fix of issue #114.
adf1a90 Merge pull request #120 from tarantool/update_doc
9c5882f Update README.md - revert, it's a part of http v2, see PR https://github.com/tarantool/http/pull/120. Method render
was introduced in 01004d7d63cd7253248fb4a9613229e08fa98fd6.
3ee593d Merge pull request #119 from tarantool/fio_instead_io
e0d8f82 Get rid of io module. - keep, replaces io module with fio, issue #112. Patch related to http v2 source code, but io module used in http v1 too.
6d22f94 Update README - revert, it's a part of http v2. Method json
was introduced in 01004d7d63cd7253248fb4a9613229e08fa98fd6.
fa999df Merge pull request #115 from tarantool/fix_example
b17e230 Merge pull request #118 from tarantool/fix_CI
ed29770 Merge pull request #109 from tarantool/publish_rock
c2ee5ce Fix CI. - revert, fix related to PackageCloud that is not used anymore.
f81c393 Fix middleware example - revert, seems a fix of example for new http api, issue #115.
cb79f90 Merge pull request #116 from tarantool/update_travis
a49c5a1 Don't build ubuntu cosmic package - revert, fix for packagecloud, we don't use it anymore.
3728483 Add rock publishing - keep, publishing rock on github actions.
7a57961 Merge pull request #108 from tarantool/release-2.1.0
6b1d227 release 2.1.0 - revert, changes in CHANGELOG.
fce39f3 Merge pull request #107 from tarantool/custom_loggers
1d35478 Return ability to use custom loggers and to set loggers for a specific route - revert, it is actually a fix of issue #106 introduced with http v2 support.
dfeb486 Merge pull request #105 from tarantool/fix_route_priority
904a8fc Fix routes overlapping by *any pattern in route's path - revert, it's a part of http v2.
593f8b3 Merge pull request #104 from tarantool/refactor_tests
0e5d4c0 Refactoring tests - revert, in fact it is a refactoring of tests added with http v2 support.
02217cf Merge pull request #101 from tarantool/update_readme
c4e0395 Update README - revert, is a part of http v2, see PR see https://github.com/tarantool/http/pull/101. Method json
was introduced in 01004d7d63cd7253248fb4a9613229e08fa98fd6.
35a265a Merge pull request #100 from tarantool/fix_redirect_to - revert, it's a part of http v2. Method redirect_to
was introduced in 01004d7d63cd7253248fb4a9613229e08fa98fd6.
dafd8cc Fix req:redirect_to method - revert, it's a part of http v2. Method redirect_to
was introduced in 01004d7d63cd7253248fb4a9613229e08fa98fd6.
20d969f Merge pull request #98 from k911mipt/readme-stash-sample-variable-fix
b7ae39b fix a variable name in "stash" and "cookies" code samples - revert, fixes for http v2 examples in a README.
def49fe Update travis badge - revert, updated badge in a README.
6b728f0 Merge pull request #95 from tarantool/update_luatest
1df0296 Update luatest to 0.3.0 - revert, update to luatest version with breaking changes, see https://github.com/tarantool/http/pull/95. In fact these changes added for tests added with http v2 support.
54d0fca Rewrite tap tests to luatest - keep.
b660d8e Run luacheck on CI, fix warnings - keep, would be nice to have.
1ee57f8 Merge pull request #91 from tarantool/fix-installation-paths
106f21b Fix installation paths to not contain extra directories - revert, part of http v2, see https://github.com/tarantool/http/pull/91.
8109d49 Update changelog according to newly released 2.0.0 - revert, part of http v2, changes in CHANGELOG.
bb6f6c0 Merge pull request #90 from tarantool/v2
df6ba7d Remove params to log_requests and log_errors from readme - revert, part of http v2.
b49f760 Remove runtime dependency on luatest - revert, commit is a part of https://github.com/tarantool/http/pull/90, but nothing specific here for http v2. However, it's a fix for extra runtime dependency added with http v2.
e79db20 Fix some linter warnings - revert, it's a prt of http v2. luacheck fixes for http v2 files and luacheck config.
c6bd906 Fix FindTarantool.cmake script - keep, it's actually a part of http v2 (see https://github.com/tarantool/http/pull/90), but nothing specific here for http v2.
e3d35f7 Run test before packpack on ci - revert, mostly indentation and fixes for PackageCloud in GH workflow.
19e3049 Add check dependency in debian build rules - keep, it's actually a part of http v2 (see https://github.com/tarantool/http/pull/90), but nothing specific here for http v2.
9b5ff23 Fix RPM spec - revert, it's actually a part of http v2 (see https://github.com/tarantool/http/pull/90), but nothing specific here for http v2. However, no sense to keep this commit as we need to bring luatest and rewrite tests from TAP to luatest in the beginning.
28f3afe Fix CMake build and add version information to release - keep, it's actually a part of http v2 (see https://github.com/tarantool/http/pull/90), but nothing specific here for http v2.
caffb0e Add changelog for v2 - revert, part of http v2.
886976a Add editorconfig to configure indents - keep, it's actually a part of http v2 (see https://github.com/tarantool/http/pull/90), but nothing specific here for http v2.
549058d Port from tap to luatest - keep, would be nice to have.
4ffd696 Update rockspecs according to new release - revert, it's a part of http v2. Added Lua checks dependence to Luarock spec.
c59e104 Fix cookies formatting (#82) - revert, it is a bugfix for cookies formatting, seems issue was introduced with http v2 support.
42a661f Update README - revert, it's a part of http v2.
6f398b6 Bless env with request metatable - revert, it's a part of http v2.
40850b0 router:use(): make handler option a positional argument - revert, it's a part of http v2.
3601aee Rename server :set_router -> :set_handler - revert, it's a prt of http v2.
da4cb2f router: route specificity by symbols known - revert, it's a part of http v2.
ed8107c router: remove duplicate code in matching.lua - revert, part of http v2.
5a483bf Update rockspec - revert, it's a part of http v2.
247138e Make socket hijacking work again - revert, part of http v2, see https://github.com/tarantool/http/pull/90.
3802b50 Implement Partial-Order Approach to Middleware - revert, part of http v2.
6313f88 Remove tsgi.errors - revert, TSGI is a part of http v2.
6e01b6a Remove httpd parameter from router init - revert, it's a prt of http v2.
01004d7 Add TSGI Layer Between Router and Server (#81) - revert, TSGI is a part of http v2.
So we need to save these commits (commits that added after revert of http v2 are marked strike through):
16c761a add a test. - need to reimplement.
05ad424 Check ptr to string before use it - not related to other patches.
42e3002 Added ability to set and get cookie without escaping. - need to reimplement.
e0d8f82 Get rid of io module. - need to reimplement.
3728483 Add rock publishing - need to reimplement.
54d0fca Rewrite tap tests to luatest - need to reimplement.
b660d8e Run luacheck on CI, fix warnings - need to reimplement.
c6bd906 Fix FindTarantool.cmake script - not related to other patches.
19e3049 Add check dependency in debian build rules - not related to other patches.
28f3afe Fix CMake build and add version information to release - need to reimplement.
886976a Add editorconfig to configure indents - not related to other patches.
549058d Port from tap to luatest - need to reimplement.
Branch with http-v2 changes - https://github.com/tarantool/http/tree/http-v2
And stick on v1.
The list of actions TBD.
NB: Don't forget to write a good explanation why we discard v2.
Supersedes #132.
Details in Russian
Обсудили совместимость между версиями http. Результат такой: Зачем был нужен http v2, и что получилось: - Использовать один роутер с разными серверами (встроенный http на Lua/C + nginx). В итоге для nginx (в связи с особенностями нашего nginx upstrem модуля) там предлагается кастомный pre/post-процессинг, что в значительной степени нивелирует идею. Надо было делать определенную часть на стороне nginx-модуля (произвольный формат запроса и ответа). - Поддержка middleware (например, авторизация). Утверждается, что сделана она в таком виде, что все равно приходится делать замыкания, как и в v1 (Ярик пробовал). - Было там что-то про умное разрешение коллизий роутов, но деталей я не помню, да и кейс кажется довольно специфичным. Что еще пошло не так: - Перф просел на 26% на синтетике (со слоем совместимости для v1 — 39%). - Сломали обратную совместимость. Так что, кажется, что мы все согласны признать http v2 неудачным экспериментом. В связи с этим предполагаются примерно такие действия: 1. Поддержку v1 в v2, пожалуй, катить нет смысла. Кажется, это особенно никому не упротит жизнь, поскольку подталкивать пользователей к переходу на v2 мы не будем. (BTW, в cartridge пользователи добавляют роуты в инстанс картриджа, так что прибить к инстансу версию api тоже не получится.) 2. Мы коммитились, что rpm/deb пакеты не удаляются, поэтому будем увеличивать epoch для http v1. 3. С luarocks-сервера удалим рокспеки для v2, но сделаем пакет http-v2. 4. Ветки. Сделать ветку v2 (как backup) с состоянием текущего мастера. Либо ревертнуть master до состояния 1.1.0 одним коммитом, либо зафорспушить master в 1.1.0. Ничего не забыл? Итого в httpng нам надо будет просто поддержать API v1.Benchmarks: https://gist.github.com/Totktonada/667b504bdad8cbc5777a0442d1181230