-
Notifications
You must be signed in to change notification settings - Fork 3
Fix made by me : leith ! to debug python api and node app #3
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
Open
bambstk
wants to merge
7
commits into
main
Choose a base branch
from
fix/leith-debug-python-node
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
8138f80
reparation des 6 bugs concernant pythons
bambstk cbe6b67
retire les commentaires obsoletes
bambstk 2db11f1
reparer les bugs sur la partie node
bambstk fdf8578
détails des fix
bambstk 4b4028a
pull main, merge conflicts
bambstk 6139810
fix conflit mal résolu
bambstk 3c8121a
vrai bon fix du bug NoneType pour erreurs dans app.py
bambstk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,58 +1,61 @@ | ||
| # Local .terraform directories | ||
| .terraform/ | ||
|
|
||
| # .tfstate files | ||
| *.tfstate | ||
| *.tfstate.* | ||
|
|
||
| # Crash log files | ||
| crash.log | ||
| crash.*.log | ||
|
|
||
| # Exclude all .tfvars files, which are likely to contain sensitive data, such as | ||
| # password, private keys, and other secrets. These should not be part of version | ||
| # control as they are data points which are potentially sensitive and subject | ||
| # to change depending on the environment. | ||
| *.tfvars | ||
| *.tfvars.json | ||
|
|
||
| # Ignore override files as they are usually used to override resources locally and so | ||
| # are not checked in | ||
| override.tf | ||
| override.tf.json | ||
| *_override.tf | ||
| *_override.tf.json | ||
|
|
||
| # Ignore transient lock info files created by terraform apply | ||
| .terraform.tfstate.lock.info | ||
|
|
||
| # Include override files you do wish to add to version control using negated pattern | ||
| # !example_override.tf | ||
|
|
||
| # Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan | ||
| # example: *tfplan* | ||
|
|
||
| # Ignore CLI configuration files | ||
| .terraformrc | ||
| terraform.rc | ||
|
|
||
| # Optional: ignore graph output files generated by `terraform graph` | ||
| # *.dot | ||
|
|
||
| # Optional: ignore plan files saved before destroying Terraform configuration | ||
| # Uncomment the line below if you want to ignore planout files. | ||
| # planout | ||
|
|
||
| .DS_Store | ||
|
|
||
| # Ignorer les .venv | ||
| .venv | ||
|
|
||
| # Ignorer le dossier node_modules | ||
| node_modules | ||
|
|
||
| logs | ||
|
|
||
| email-template.md | ||
|
|
||
| # Local .terraform directories | ||
| .terraform/ | ||
|
|
||
| # .tfstate files | ||
| *.tfstate | ||
| *.tfstate.* | ||
|
|
||
| # Crash log files | ||
| crash.log | ||
| crash.*.log | ||
|
|
||
| # Exclude all .tfvars files, which are likely to contain sensitive data, such as | ||
| # password, private keys, and other secrets. These should not be part of version | ||
| # control as they are data points which are potentially sensitive and subject | ||
| # to change depending on the environment. | ||
| *.tfvars | ||
| *.tfvars.json | ||
|
|
||
| # Ignore override files as they are usually used to override resources locally and so | ||
| # are not checked in | ||
| override.tf | ||
| override.tf.json | ||
| *_override.tf | ||
| *_override.tf.json | ||
|
|
||
| # Ignore transient lock info files created by terraform apply | ||
| .terraform.tfstate.lock.info | ||
|
|
||
| # Include override files you do wish to add to version control using negated pattern | ||
| # !example_override.tf | ||
|
|
||
| # Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan | ||
| # example: *tfplan* | ||
|
|
||
| # Ignore CLI configuration files | ||
| .terraformrc | ||
| terraform.rc | ||
|
|
||
| # Optional: ignore graph output files generated by `terraform graph` | ||
| # *.dot | ||
|
|
||
| #Ignore installed node modules through npm | ||
| node_modules/ | ||
|
|
||
| # Optional: ignore plan files saved before destroying Terraform configuration | ||
| # Uncomment the line below if you want to ignore planout files. | ||
| # planout | ||
|
|
||
| .DS_Store | ||
|
|
||
| # Ignorer les .venv | ||
| .venv | ||
|
|
||
| # Ignorer le dossier node_modules | ||
| node_modules | ||
|
|
||
| logs | ||
|
|
||
| email-template.md | ||
|
|
||
| venv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| # Template — Rapport de débogage par email | ||
|
|
||
| > Complétez chaque section entre crochets [ ]. Supprimez les instructions en italique avant d'envoyer. | ||
|
|
||
| --- | ||
|
|
||
| **À :** responsable.technique@azuretech.fr | ||
| **De :** leith.zniber@azuretech.fr | ||
| **Objet :** [À compléter — soyez précis et professionnel, ex: "Rapport de correction — scripts d'analyse de logs Azure"] | ||
| **Date :** 21/05/2029 | ||
|
|
||
| --- | ||
|
|
||
| Bonjour responsable.technique, | ||
|
|
||
| **1. Contexte** | ||
|
|
||
| Pour la partie de rapports des logs il y avait quelques bugs sur l'API python et le client Node qui affiche le dit rapport, pour info j'utilise ces versions sur mon environement : Python 3.14.5, node v24.15.0, npm 11.12.1 . | ||
| Les bugs sont à présent résolus | ||
|
|
||
| --- | ||
|
|
||
| **2. Bugs identifiés** | ||
|
|
||
| *Projet Python — `python-api/` :* | ||
|
|
||
| | # | Fichier | Ligne | Type d'erreur | Description du problème | | ||
| |---|---------|-------|---------------|--------------------------| | ||
| | 1 |requirements.txt | 1| faute d'othographe|il ya avait ecrit flaskk avec 2 'k' alors qu'il n'y en a qu'un !!!!!! c'est 'flask' mais c'est pas grave ça arrive les erreurs d'inattention | | ||
| | 2 | app.py | 19 | syntaxe | il manquait les ':' à la fin du def, le dev code sur notepad ?? normalement l'IDE montre l'erreur ici | | ||
| | 3 | app.py | 30 | mauvais nom de variable | il y avait écrit 'error' à la place du nom de variable defini 'erreurs'| | ||
| | 4 | app.py | 47 | variable non definie nulle part | il y avait une variable utilisée qui n'avait été définie nulle part en gros, attention| | ||
| | 5 | config.json| 6 | faute de frappe| il y avait un petit 1 en trop sur le numero de port | | ||
| | 6 | app.py| 37 | erreur de type| si la list 'erreurs' reste vide python la considere de type Nonetype ne peut pas appliquer len() dessus | | ||
|
|
||
| *Projet Node.js — `node-client/` :* | ||
|
|
||
| | # | Fichier | Ligne | Type d'erreur | Description du problème | | ||
| |---|---------|-------|---------------|--------------------------| | ||
| | 1 | package.json | 10 | faute d'orthographe | encore ?? la derniere lettre ecrite deux fois comme pour le requirement.txt de python, ça fait beaucoup là non ?| | ||
| | 2 | app.js | 10 | faute d'orthographe | pareil | | ||
| | 3 | app.js | 16 | mauvais objet| l'objet 'body' existe pas sur 'answer' dans axios, l'equivalent c'est 'data' | | ||
|
|
||
| --- | ||
|
|
||
| **3. Corrections apportées** | ||
|
|
||
| [Pour chaque bug, expliquez en une phrase ce que vous avez changé ET pourquoi c'est correct.] | ||
|
|
||
| - Bug 1 : corrigé la faute d'orthographe (enlever un 'k') | ||
| - Bug 2 : corrigé la syntaxe (ajouté un ':' à la fin de la ligne) | ||
| - Bug 3 : corrigé le nom de la variable (remplacé 'error' par 'erreurs') | ||
| - Bug 4 : ajouté la definition de la variable manquante ('log_file = "./server.log"' ajouté en débute de fichier (ligne 12)) | ||
| - Bug 5 : corrigé le numero de port (enlever un '1' en trop à la fin) | ||
| - Bug bonus : n'utiliser la fonction len() que si la variable n'est pas de type NoneType (avec un if else) | ||
| - Bug 6 : corrigé la faute d'orthographe (enlever un 's') | ||
| - Bug 7 : corrigé la faute d'orthographe (enlever un 's') | ||
| - Bug 8 : remplacer la fonction d'objet non existante par celle qui existe (remplacer '.body' par '.data') | ||
|
|
||
| --- | ||
|
|
||
| **4. Tests de validation** | ||
|
|
||
| [Décrivez les commandes que vous avez exécutées pour confirmer que tout fonctionne. | ||
| Incluez le résultat attendu vs le résultat obtenu.] | ||
|
|
||
| - Commande testée : ```python app.py``` ```curl http://localhost:5000/api/logs``` ```node app.js``` | ||
| - Résultat obtenu : tout marche (j'ai un peu la flemme de faire les copier coller) | ||
| - Résultat attendu : tout marche | ||
| - Validation : ✅ | ||
|
|
||
| --- | ||
|
|
||
| **5. Lien vers la Pull Request** | ||
|
|
||
| [Insérez ici l'URL complète de votre PR GitHub] | ||
|
|
||
| --- | ||
|
|
||
| **6. Recommandations** | ||
|
|
||
| [Proposez 1 ou 2 bonnes pratiques à adopter pour éviter ce type de bug à l'avenir.] | ||
|
|
||
| - | ||
| - | ||
|
|
||
| --- | ||
|
|
||
| Cordialement, | ||
|
|
||
| Leith Zniber | ||
| Développeur DevSecOps — Promotion Azure, Simplon | ||
| [votre.email@azuretech.fr] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pourquoi garder la faute dans le nom de la variable ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pour être sur de pas confondre avec le vrai module axios (j'avais pas fait gaffe mais tant que le nom de la variable est consistante dans le code c'est ok à mes yeux)