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

(BSR) ci(env): check variables in env files #6318

Merged
merged 4 commits into from
Apr 24, 2024

Conversation

voisinhugo
Copy link

@voisinhugo voisinhugo commented Apr 17, 2024

Exemple de message de la CI :
image

@voisinhugo voisinhugo requested review from a team as code owners April 17, 2024 14:33
Copy link

github-actions bot commented Apr 17, 2024

Performance Comparison Report

Significant Changes To Render Duration

Name Render Duration Render Count
Performance test for Offer page 414.4 ms → 422.1 ms (+7.7 ms, +1.9%) 13 → 13.30 (+0.3000000000000007, +2.3%)
Show details
Name Render Duration Render Count
Performance test for Offer page Baseline
Mean: 414.4 ms
Stdev: 8.5 ms (2.0%)
Runs: 424 423 422 420 416 413 413 408 408 397

Current
Mean: 422.1 ms
Stdev: 10.1 ms (2.4%)
Runs: 441 436 428 421 420 420 417 416 414 408
Baseline
Mean: 13
Stdev: 0 (0.0%)
Runs: 13 13 13 13 13 13 13 13 13 13

Current
Mean: 13.30
Stdev: 0.95 (7.1%)
Runs: 16 13 13 13 13 13 13 13 13 13

Meaningless Changes To Render Duration

Show entries
Name Render Duration Render Count
Search Landing Page - Performance test for Search Landing page 121.2 ms → 124.5 ms (+3.3 ms, +2.7%) 9 → 9
Performance test for Profile page 92.2 ms → 92.8 ms (+0.6 ms, +0.7%) 8 → 8
Performance test for EndedBookings page 22.2 ms → 22.5 ms (+0.3 ms, +1.4%) 7 → 7
Search Results - Performance test for Search Results page 117.5 ms → 117.7 ms (+0.2 ms, ±0.0%) 12.90 → 12.90
Performance test for Venue page 104.3 ms → 103.9 ms (-0.4 ms, ±0.0%) 5 → 5
Performance test for Favorites page 57.9 ms → 57.3 ms (-0.6 ms, -1.0%) 6 → 6
Performance test for Bookings page 39.2 ms → 37.5 ms (-1.7 ms, -4.3%) 7 → 7
Show details
Name Render Duration Render Count
Search Landing Page - Performance test for Search Landing page Baseline
Mean: 121.2 ms
Stdev: 2.5 ms (2.1%)
Runs: 126 124 123 122 121 120 120 119 119 118

Current
Mean: 124.5 ms
Stdev: 5.0 ms (4.0%)
Runs: 131 131 127 127 127 123 122 121 121 115
Baseline
Mean: 9
Stdev: 0 (0.0%)
Runs: 9 9 9 9 9 9 9 9 9 9

Current
Mean: 9
Stdev: 0 (0.0%)
Runs: 9 9 9 9 9 9 9 9 9 9
Performance test for Profile page Baseline
Mean: 92.2 ms
Stdev: 2.9 ms (3.2%)
Runs: 96 95 95 94 94 91 91 89 89 88

Current
Mean: 92.8 ms
Stdev: 3.0 ms (3.3%)
Runs: 98 96 93 93 93 93 93 93 88 88
Baseline
Mean: 8
Stdev: 0 (0.0%)
Runs: 8 8 8 8 8 8 8 8 8 8

Current
Mean: 8
Stdev: 0 (0.0%)
Runs: 8 8 8 8 8 8 8 8 8 8
Performance test for EndedBookings page Baseline
Mean: 22.2 ms
Stdev: 1.9 ms (8.7%)
Runs: 25 25 24 23 22 21 21 21 20 20

Current
Mean: 22.5 ms
Stdev: 1.3 ms (5.6%)
Runs: 24 24 23 23 23 23 22 22 21 20
Baseline
Mean: 7
Stdev: 0 (0.0%)
Runs: 7 7 7 7 7 7 7 7 7 7

Current
Mean: 7
Stdev: 0 (0.0%)
Runs: 7 7 7 7 7 7 7 7 7 7
Search Results - Performance test for Search Results page Baseline
Mean: 117.5 ms
Stdev: 6.3 ms (5.4%)
Runs: 124 124 122 121 119 118 116 115 113 103

Current
Mean: 117.7 ms
Stdev: 8.0 ms (6.8%)
Runs: 124 124 123 121 120 120 118 117 113 97
Baseline
Mean: 12.90
Stdev: 0.32 (2.5%)
Runs: 13 13 13 13 13 13 13 13 13 12

Current
Mean: 12.90
Stdev: 0.32 (2.5%)
Runs: 13 13 13 13 13 13 13 13 13 12
Performance test for Venue page Baseline
Mean: 104.3 ms
Stdev: 3.4 ms (3.3%)
Runs: 113 105 105 105 104 104 102 102 102 101

Current
Mean: 103.9 ms
Stdev: 2.7 ms (2.6%)
Runs: 108 107 107 105 103 103 102 102 102 100
Baseline
Mean: 5
Stdev: 0 (0.0%)
Runs: 5 5 5 5 5 5 5 5 5 5

Current
Mean: 5
Stdev: 0 (0.0%)
Runs: 5 5 5 5 5 5 5 5 5 5
Performance test for Favorites page Baseline
Mean: 57.9 ms
Stdev: 2.9 ms (5.0%)
Runs: 62 61 60 59 58 58 57 57 55 52

Current
Mean: 57.3 ms
Stdev: 1.8 ms (3.2%)
Runs: 61 59 59 57 57 57 56 56 56 55
Baseline
Mean: 6
Stdev: 0 (0.0%)
Runs: 6 6 6 6 6 6 6 6 6 6

Current
Mean: 6
Stdev: 0 (0.0%)
Runs: 6 6 6 6 6 6 6 6 6 6
Performance test for Bookings page Baseline
Mean: 39.2 ms
Stdev: 1.4 ms (3.6%)
Runs: 41 41 40 40 40 39 38 38 38 37

Current
Mean: 37.5 ms
Stdev: 3.1 ms (8.3%)
Runs: 43 40 40 39 38 37 36 35 34 33
Baseline
Mean: 7
Stdev: 0 (0.0%)
Runs: 7 7 7 7 7 7 7 7 7 7

Current
Mean: 7
Stdev: 0 (0.0%)
Runs: 7 7 7 7 7 7 7 7 7 7

Changes To Render Count

There are no entries

Added Scenarios

There are no entries

Removed Scenarios

There are no entries

Generated by 🚫 dangerJS against 61380ed

@voisinhugo voisinhugo force-pushed the bsr-check-variables-in-env-files branch 3 times, most recently from 4ae40d9 to 4e36579 Compare April 17, 2024 14:54
Copy link
Contributor

@bebstein-pass bebstein-pass left a comment

Choose a reason for hiding this comment

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

des commentaires non obligatoires mais qui pourraient améliorer

.env.integration Outdated Show resolved Hide resolved
src/noMissingVariablesInEnvFiles.native.test.ts Outdated Show resolved Hide resolved
Comment on lines +35 to +31
const missing: Record<string, string[]> = {}
for (const [file, data] of Object.entries(envData)) {
missing[file] = Array.from(allKeys).filter((x) => !data.includes(x))
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Les Set ont des méthodes pour les comparer https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set#set_composition

j'ai l'impression que A.symmetricDifference(B) répondrait au besoin

Copy link
Author

Choose a reason for hiding this comment

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

Ça risque d'être compliqué : c'est pas dispo en Node !
image

}

function compareEnvFiles(envFiles: string[]) {
const envData: Record<string, string[]> = {}
Copy link
Contributor

Choose a reason for hiding this comment

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

j'ai l'impression qu'il pourrait etre intéressant d'avoir un Set en valeur

Suggested change
const envData: Record<string, string[]> = {}
const envData: Record<string, Set<string>> = {}

Copy link
Author

Choose a reason for hiding this comment

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

Si on avait la méthode Set.union et Set.symetricDifference, carrément, mais ce n'est pas le cas en NodeJS, donc c'est + simple avec un array :/

@voisinhugo voisinhugo force-pushed the bsr-check-variables-in-env-files branch from d33f120 to 61380ed Compare April 24, 2024 10:04
Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@voisinhugo voisinhugo merged commit 7498dbf into master Apr 24, 2024
51 checks passed
@voisinhugo voisinhugo deleted the bsr-check-variables-in-env-files branch April 24, 2024 10:17
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.

4 participants