Skip to content

Commit

Permalink
fix: transliteration metrics not being published (#1592)
Browse files Browse the repository at this point in the history
I forgot to start publishing the metrics.

----

*By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache-2.0 license*

---------

Signed-off-by: github-actions <[email protected]>
Co-authored-by: github-actions <[email protected]>
  • Loading branch information
otaviomacedo and github-actions authored Jan 29, 2025
1 parent a2e7133 commit 2de034f
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 15 deletions.
10 changes: 5 additions & 5 deletions src/__tests__/__snapshots__/construct-hub.test.ts.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 29 additions & 9 deletions src/__tests__/backend/inventory/canary.lambda.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,12 @@ test('simulate canary on actual keys', async () => {

expect(host.metrics).toMatchInlineSnapshot(`
{
"MissingAssemblyCount": 0,
"MissingPackageMetadataCount": 1,
"MissingPackageTarballCount": 1,
"PackageCount": 19,
"PackageMajorVersionCount": 20,
"PackageVersionCount": 953,
"MissingAssemblyCount": 1,
"MissingPackageMetadataCount": 2,
"MissingPackageTarballCount": 2,
"PackageCount": 20,
"PackageMajorVersionCount": 21,
"PackageVersionCount": 954,
"SubmoduleCount": 2215,
"UninstallablePackageCount": 3,
"UnknownObjectCount": 0,
Expand All @@ -129,6 +129,10 @@ test('simulate canary on actual keys', async () => {
"{Language=csharp}SupportedPackageCount": 3,
"{Language=csharp}SupportedPackageVersionCount": 497,
"{Language=csharp}SupportedSubmoduleCount": 2200,
"{Language=csharp}TransliterationErrorMajorVersionCount": 0,
"{Language=csharp}TransliterationErrorPackageCount": 0,
"{Language=csharp}TransliterationErrorPackageVersionCount": 0,
"{Language=csharp}TransliterationErrorSubmoduleCount": 0,
"{Language=csharp}UnsupportedMajorVersionCount": 20,
"{Language=csharp}UnsupportedPackageCount": 19,
"{Language=csharp}UnsupportedPackageVersionCount": 667,
Expand All @@ -145,6 +149,10 @@ test('simulate canary on actual keys', async () => {
"{Language=go}SupportedPackageCount": 6,
"{Language=go}SupportedPackageVersionCount": 61,
"{Language=go}SupportedSubmoduleCount": 5,
"{Language=go}TransliterationErrorMajorVersionCount": 0,
"{Language=go}TransliterationErrorPackageCount": 0,
"{Language=go}TransliterationErrorPackageVersionCount": 0,
"{Language=go}TransliterationErrorSubmoduleCount": 0,
"{Language=go}UnsupportedMajorVersionCount": 20,
"{Language=go}UnsupportedPackageCount": 19,
"{Language=go}UnsupportedPackageVersionCount": 948,
Expand All @@ -161,6 +169,10 @@ test('simulate canary on actual keys', async () => {
"{Language=java}SupportedPackageCount": 1,
"{Language=java}SupportedPackageVersionCount": 32,
"{Language=java}SupportedSubmoduleCount": 5,
"{Language=java}TransliterationErrorMajorVersionCount": 0,
"{Language=java}TransliterationErrorPackageCount": 0,
"{Language=java}TransliterationErrorPackageVersionCount": 0,
"{Language=java}TransliterationErrorSubmoduleCount": 0,
"{Language=java}UnsupportedMajorVersionCount": 20,
"{Language=java}UnsupportedPackageCount": 19,
"{Language=java}UnsupportedPackageVersionCount": 948,
Expand All @@ -177,6 +189,10 @@ test('simulate canary on actual keys', async () => {
"{Language=python}SupportedPackageCount": 10,
"{Language=python}SupportedPackageVersionCount": 579,
"{Language=python}SupportedSubmoduleCount": 2204,
"{Language=python}TransliterationErrorMajorVersionCount": 1,
"{Language=python}TransliterationErrorPackageCount": 1,
"{Language=python}TransliterationErrorPackageVersionCount": 1,
"{Language=python}TransliterationErrorSubmoduleCount": 0,
"{Language=python}UnsupportedMajorVersionCount": 20,
"{Language=python}UnsupportedPackageCount": 19,
"{Language=python}UnsupportedPackageVersionCount": 667,
Expand All @@ -185,14 +201,18 @@ test('simulate canary on actual keys', async () => {
"{Language=typescript}CorruptAssemblyPackageCount": 0,
"{Language=typescript}CorruptAssemblyPackageVersionCount": 0,
"{Language=typescript}CorruptAssemblySubmoduleCount": 0,
"{Language=typescript}MissingMajorVersionCount": 0,
"{Language=typescript}MissingPackageCount": 0,
"{Language=typescript}MissingPackageVersionCount": 5,
"{Language=typescript}MissingMajorVersionCount": 1,
"{Language=typescript}MissingPackageCount": 1,
"{Language=typescript}MissingPackageVersionCount": 6,
"{Language=typescript}MissingSubmoduleCount": 1,
"{Language=typescript}SupportedMajorVersionCount": 20,
"{Language=typescript}SupportedPackageCount": 19,
"{Language=typescript}SupportedPackageVersionCount": 948,
"{Language=typescript}SupportedSubmoduleCount": 2214,
"{Language=typescript}TransliterationErrorMajorVersionCount": 0,
"{Language=typescript}TransliterationErrorPackageCount": 0,
"{Language=typescript}TransliterationErrorPackageVersionCount": 0,
"{Language=typescript}TransliterationErrorSubmoduleCount": 0,
"{Language=typescript}UnsupportedMajorVersionCount": 0,
"{Language=typescript}UnsupportedPackageCount": 0,
"{Language=typescript}UnsupportedPackageVersionCount": 0,
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/devapp/__snapshots__/snapshot.test.ts.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/__tests__/testdata/keyslist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41954,3 +41954,4 @@ data/@awlsring/cdktf-proxmox/v0.0.164/docs-dataProxmoxNodeStorageLvmThinpools-go
data/@awlsring/cdktf-proxmox/v0.0.164/docs-dataProxmoxNodeStorageLvmThinpools-go.md.not-supported
data/@awlsring/cdktf-proxmox/v0.0.164/docs-dataProxmoxNodeStorageLvmThinpools-java.json.not-supported
data/@awlsring/cdktf-proxmox/v0.0.164/docs-dataProxmoxNodeStorageLvmThinpools-java.md.not-supported
data/@bluedynamics/cdk8s-plone/v0.0.49/docs-python.*.transliteration-failed
1 change: 1 addition & 0 deletions src/backend/inventory/canary.lambda.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ export async function realHandler(
DocumentationStatus.SUPPORTED,
DocumentationStatus.UNSUPPORTED,
DocumentationStatus.CORRUPT_ASSEMBLY,
DocumentationStatus.TRANSLITERATION_ERROR,
]) {
const countEstimate = Math.floor(
statuses.get(forStatus)?.count() ?? 0
Expand Down

0 comments on commit 2de034f

Please sign in to comment.