You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Blocked by VWS-Python/vws-web-tools#1446, which has to expose the database ID before the credential can be generated here.
#3343 asked for verified fake tests covering a valid reco counts request, an out-of-range month and a malformed month. Those tests are currently mock-only, so that acceptance criterion is not met.
Why they are mock-only
POST /imagetargets/databases/{database_id}/reports/recoCounts names a database ID in its path. The test credentials contain no database ID, so tests/mock_vws/test_reco_counts_report.py sends a random one:
Against real Vuforia this returns 401, even though the request is correctly signed with the working database's server keys. Real Vuforia appears to require the path's database ID to belong to the credentials, and it rejects the request before it looks at the month, so the valid, out-of-range and malformed cases all fail identically. The tests were moved to mock_only_vuforia in #3357 to unblock CI, and differences-to-vws.rst records that nothing about the endpoint is verified.
This is the only Cloud Targets endpoint whose path identifies a database by ID rather than by target ID or not at all, which is why the gap has not come up before.
What is needed
The database ID has to reach the tests as a new credential, something like VUFORIA_DATABASE_ID:
vws-web-tools must expose it, tracked in Expose the database ID in get_database_details vws-web-tools#1446. get_database_details returns only database_name and the four access keys, and the ID is not scraped today. Where the target manager exposes it has not been confirmed; the likely candidates are the URL of the database page and the "Database Access Keys" tab. Everything below is blocked on that issue.
admin/create_secrets_files.py writes each secrets file from DatabaseDict, so _generate_secrets_file_content needs a VUFORIA_DATABASE_ID= line.
vuforia_secrets.env.example needs the new key, since the non-credentialed CI jobs copy it verbatim.
_CloudDatabaseSettings in tests/mock_vws/fixtures/credentials.py needs a database_id field, plumbed through to whatever the reco counts test helper reads.
The 100 encrypted secrets files must be regenerated. CI copies ci_secrets/vuforia_secrets_${JOB_INDEX}.env for each parallel job, and none of them have the key. Either make the field optional and skip the real-Vuforia tests when it is absent, or regenerate and re-encrypt secrets.tar.gpg in the same change — a required field against stale secrets would break every credentialed CI job, not just this test.
Switch TestRecoCountsReport back to verify_mock_vuforia and remove the mock-only note from differences-to-vws.rst.
What this would tell us
Beyond restoring the acceptance criterion, running these against real Vuforia is the only way to check the guesses made in #3357, all currently documented as unverified:
whether a malformed month and an out-of-range month both return Fail with a 400, which the documentation does not specify for this endpoint;
the response headers of the report request;
the shape of the presigned_url value: its host, path and query parameters. Real Vuforia returns a cloud storage URL, which normally carries X-Amz-* query parameters, where the mock returns a URL served by itself with none;
whether the 401 really is caused by the database ID mismatch, rather than something else about the request.
What comes back from that URL — the CSV, the download response headers and the 404-until-ready behaviour — cannot be verified here, because a real report takes up to an hour to generate. That is #3360.
It would also unblock #3362, which proposes giving mock_vws.database.CloudDatabase a database ID so that the mock can reject a mismatched one as real Vuforia does. That change is deliberately blocked on this issue: it should not be built on the assumption that the 401 came from the database ID until a real run has confirmed it.
Acceptance criteria
The database ID is available to the tests as a credential, and the secrets files and their example contain it.
TestRecoCountsReport runs under verify_mock_vuforia and passes against real Vuforia.
The behaviours listed above are either confirmed and the mock left as is, or corrected in the mock, with differences-to-vws.rst updated to drop the claims that are no longer unverified.
A decision is recorded on whether the mock should validate the database ID in the path.
Follow-up to #3343 and #3357.
Blocked by VWS-Python/vws-web-tools#1446, which has to expose the database ID before the credential can be generated here.
#3343 asked for verified fake tests covering a valid reco counts request, an out-of-range
monthand a malformedmonth. Those tests are currently mock-only, so that acceptance criterion is not met.Why they are mock-only
POST /imagetargets/databases/{database_id}/reports/recoCountsnames a database ID in its path. The test credentials contain no database ID, sotests/mock_vws/test_reco_counts_report.pysends a random one:Against real Vuforia this returns
401, even though the request is correctly signed with the working database's server keys. Real Vuforia appears to require the path's database ID to belong to the credentials, and it rejects the request before it looks at themonth, so the valid, out-of-range and malformed cases all fail identically. The tests were moved tomock_only_vuforiain #3357 to unblock CI, anddifferences-to-vws.rstrecords that nothing about the endpoint is verified.This is the only Cloud Targets endpoint whose path identifies a database by ID rather than by target ID or not at all, which is why the gap has not come up before.
What is needed
The database ID has to reach the tests as a new credential, something like
VUFORIA_DATABASE_ID:vws-web-toolsmust expose it, tracked in Expose the database ID in get_database_details vws-web-tools#1446.get_database_detailsreturns onlydatabase_nameand the four access keys, and the ID is not scraped today. Where the target manager exposes it has not been confirmed; the likely candidates are the URL of the database page and the "Database Access Keys" tab. Everything below is blocked on that issue.admin/create_secrets_files.pywrites each secrets file fromDatabaseDict, so_generate_secrets_file_contentneeds aVUFORIA_DATABASE_ID=line.vuforia_secrets.env.exampleneeds the new key, since the non-credentialed CI jobs copy it verbatim._CloudDatabaseSettingsintests/mock_vws/fixtures/credentials.pyneeds adatabase_idfield, plumbed through to whatever the reco counts test helper reads.ci_secrets/vuforia_secrets_${JOB_INDEX}.envfor each parallel job, and none of them have the key. Either make the field optional and skip the real-Vuforia tests when it is absent, or regenerate and re-encryptsecrets.tar.gpgin the same change — a required field against stale secrets would break every credentialed CI job, not just this test.TestRecoCountsReportback toverify_mock_vuforiaand remove the mock-only note fromdifferences-to-vws.rst.What this would tell us
Beyond restoring the acceptance criterion, running these against real Vuforia is the only way to check the guesses made in #3357, all currently documented as unverified:
monthand an out-of-rangemonthboth returnFailwith a 400, which the documentation does not specify for this endpoint;presigned_urlvalue: its host, path and query parameters. Real Vuforia returns a cloud storage URL, which normally carriesX-Amz-*query parameters, where the mock returns a URL served by itself with none;What comes back from that URL — the CSV, the download response headers and the
404-until-ready behaviour — cannot be verified here, because a real report takes up to an hour to generate. That is #3360.It would also unblock #3362, which proposes giving
mock_vws.database.CloudDatabasea database ID so that the mock can reject a mismatched one as real Vuforia does. That change is deliberately blocked on this issue: it should not be built on the assumption that the 401 came from the database ID until a real run has confirmed it.Acceptance criteria
TestRecoCountsReportruns underverify_mock_vuforiaand passes against real Vuforia.differences-to-vws.rstupdated to drop the claims that are no longer unverified.