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

Mises à jour techniques (Elixir, Erlang, NVM, NodeJS) #33

Merged
merged 18 commits into from
Feb 9, 2022
Merged

Conversation

thbar
Copy link
Contributor

@thbar thbar commented Jan 4, 2022

Dans cette PR, de nombreuses mises à jour, et aussi des améliorations sur la build, le test, et un peu la sécurité.

L'acceptation de cette PR ne modifiera pas la version utilisée dans l'application, elle permettra simplement que je prépare une release de l'image de départ, que je pousserai par ailleurs sur Docker après avoir créé une release.

Ca veut dire qu'on contrôle le timing sans souci.

Améliorations de la build

  • Incorporation d'un apt-get upgrade pour mettre à jour ce qui peut l'être dans la partie Ubuntu. C'é'tait utile en pratique. Voir https://github.com/etalab/transport_deploy/issues/46 pour plus de contexte.
  • Modification du test de la version OTP, car le précédent ne permettait que de distinguer sur la version majeure. On a à présent un test sur la version complète.

Mises à jour

@thbar thbar self-assigned this Jan 4, 2022
@thbar thbar changed the title [WIP] Mises à jour techniques (Elixir, Erlang, NVM, NodeJS) Mises à jour techniques (Elixir, Erlang, NVM, NodeJS) Jan 6, 2022
@thbar thbar changed the title Mises à jour techniques (Elixir, Erlang, NVM, NodeJS) [DO NOT MERGE] Mises à jour techniques (Elixir, Erlang, NVM, NodeJS) Jan 6, 2022
@thbar
Copy link
Contributor Author

thbar commented Jan 6, 2022

Je temporise au profit de etalab/transport-site#2033 car je ne veux pas bloquer le travail de migration Netex parce qu'on veut mettre à jour Elixir etc.

@thbar
Copy link
Contributor Author

thbar commented Jan 13, 2022

Je passe en brouillon, il faudra revoir la copie et faire plusieurs petites PR.

@thbar thbar closed this Jan 13, 2022
@thbar thbar deleted the elixir-upgrade branch January 13, 2022 15:36
@thbar
Copy link
Contributor Author

thbar commented Jan 13, 2022

(je ré-ouvre)

@thbar thbar restored the elixir-upgrade branch January 13, 2022 15:36
@thbar thbar reopened this Jan 13, 2022
@thbar thbar marked this pull request as draft January 13, 2022 15:37
@thbar thbar changed the title [DO NOT MERGE] Mises à jour techniques (Elixir, Erlang, NVM, NodeJS) Mises à jour techniques (Elixir, Erlang, NVM, NodeJS) Feb 9, 2022
@thbar
Copy link
Contributor Author

thbar commented Feb 9, 2022

#2033 étant finalisé et déployé, j'ai repris en main cette PR, et je remets quelques versions à jour pour finaliser.

@thbar thbar marked this pull request as ready for review February 9, 2022 13:28
@thbar thbar requested a review from a team February 9, 2022 13:29
TEST_EXPECTED_NODE_OUTPUT: "v14.16.1"
TEST_EXPECTED_ELIXIR_OUTPUT: "Elixir 1.12.2 (compiled with Erlang/OTP 24)"
TEST_EXPECTED_ERLANG_OUTPUT: "Erlang/OTP 24"
TEST_EXPECTED_NODE_OUTPUT: "v16.14.0"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Il faudra vérifier la compatibilité du côté site.

TEST_EXPECTED_ERLANG_OUTPUT: "Erlang/OTP 24"
TEST_EXPECTED_NODE_OUTPUT: "v16.14.0"
TEST_EXPECTED_ELIXIR_OUTPUT: "Elixir 1.13.2 (compiled with Erlang/OTP 24)"
TEST_EXPECTED_ERLANG_OUTPUT: "24.2.1"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Attention on fait un "gros saut" sur OTP, il faudra être vigilant (aspects HTTP etc).

- name: Test that Erlang can start and has (major) expected version
run: docker run --rm ${{ env.TEST_TAG }} /bin/bash -c "erl -noshell -eval 'erlang:display(erlang:system_info(system_version))' -eval 'init:stop()'" | grep '${{ env.TEST_EXPECTED_ERLANG_OUTPUT }}'
- name: Test that Erlang can start and has expected version (major + minor + optional revision number)
run: docker run --rm ${{ env.TEST_TAG }} /bin/bash -c "erl -eval '{ok, Version} = file:read_file(filename:join([code:root_dir(), \"releases\", erlang:system_info(otp_release), \"OTP_VERSION\"])), io:fwrite(Version), halt().' -noshell" | grep '${{ env.TEST_EXPECTED_ERLANG_OUTPUT }}'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Le test ci-dessus est amélioré et vérifie la totalité de la version (24.2.1 plutôt que juste 24).

Copy link
Contributor

@fchabouis fchabouis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super, plein de mises à jour !
Merci @thbar d'avoir fait tout ça.
J'ai pas de remarques, il va falloir comme tu dis faire un test pour voir comment ça se comporte en vrai.

@thbar thbar merged commit 99844f7 into master Feb 9, 2022
@thbar thbar deleted the elixir-upgrade branch February 9, 2022 15:09
thbar added a commit that referenced this pull request Feb 24, 2022
* Mises à jour techniques (Elixir, Erlang, NVM, NodeJS) (#33)

* Make sure the docker hub link is closer from the image

* Update to most recent elixir/erlang couple

* Bump NVM to latest

https://github.com/nvm-sh/nvm/releases

* Bump NodeJS to latest LTS available

https://nodejs.org

* Try to fix the build

* Update test for NodeJS

* Update test for Elixir version

* Modify script to make it work with newer format

* Add readme test to verify OTP version in full (improved)

* Update GitHub action to assert on full version

* Now use full version specifier

* Add explanation about how the hex images are built

* Add very useful help to see output of commands locally

The CI already does that by default.

* Upgrade packages (except kernel) for security

See etalab/transport-deploy#46 for context

* Bump to latest

* Bump Node to latest LTS

* Bump tests

* Elixir 1.12.2 et transport-tools 1.0.3

* Update rakefile

Co-authored-by: Thibaut Barrère <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants