Skip to content

Commit cd118f1

Browse files
authored
Disable shadow traffic (#509)
* Disable shadow traffic * Update yanked version * Release v1.88.0
1 parent 9999da7 commit cd118f1

File tree

7 files changed

+21
-13
lines changed

7 files changed

+21
-13
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased]
99

10-
## [1.87.0] - 2025-10-27
10+
## [1.88.0] - 2025-10-27
11+
12+
### Changed
13+
14+
- Disable shadow traffic to prepare for Black Friday.
15+
16+
## [1.87.0] - 2025-10-27 [YANKED]
1117

1218
### Added
1319

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"vendor": "vtex",
33
"name": "search-resolver",
4-
"version": "1.87.0",
4+
"version": "1.88.0",
55
"title": "GraphQL resolver for the VTEX store APIs",
66
"description": "GraphQL resolvers for the VTEX API for the catalog and orders.",
77
"credentialType": "absolute",

node/services/autocomplete.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { compareApiResults } from '../utils/compareResults'
1+
import { compareApiResults, NO_TRAFFIC } from '../utils/compareResults'
22

33
export function fetchAutocompleteSuggestions(ctx: Context, query: string) {
44
const { intelligentSearchApi, intsch } = ctx.clients
@@ -12,7 +12,7 @@ export function fetchAutocompleteSuggestions(ctx: Context, query: string) {
1212
return compareApiResults(
1313
() => intelligentSearchApi.fetchAutocompleteSuggestions(args),
1414
() => intsch.fetchAutocompleteSuggestionsV1({ ...args, locale }),
15-
ctx.vtex.production ? 10 : 100,
15+
ctx.vtex.production ? NO_TRAFFIC : 100,
1616
ctx.vtex.logger,
1717
{
1818
logPrefix: 'Autocomplete Suggestions',
@@ -31,7 +31,7 @@ export function fetchTopSearches(ctx: Context) {
3131
return compareApiResults(
3232
() => intelligentSearchApi.fetchTopSearches(),
3333
() => intsch.fetchTopSearchesV1(locale),
34-
ctx.vtex.production ? 10 : 100,
34+
ctx.vtex.production ? NO_TRAFFIC : 100,
3535
ctx.vtex.logger,
3636
{
3737
logPrefix: 'Top Searches',
@@ -54,7 +54,7 @@ export function fetchSearchSuggestions(ctx: Context, query: string) {
5454
return compareApiResults(
5555
() => intelligentSearchApi.fetchSearchSuggestions(args),
5656
() => intsch.fetchSearchSuggestionsV1({ ...args, locale }),
57-
ctx.vtex.production ? 10 : 100,
57+
ctx.vtex.production ? NO_TRAFFIC : 100,
5858
ctx.vtex.logger,
5959
{
6060
logPrefix: 'Search Suggestions',
@@ -75,7 +75,7 @@ export function fetchCorrection(ctx: Context, query: string) {
7575
return compareApiResults(
7676
() => intelligentSearchApi.fetchCorrection(args),
7777
() => intsch.fetchCorrectionV1({ ...args, locale }),
78-
ctx.vtex.production ? 10 : 100,
78+
ctx.vtex.production ? NO_TRAFFIC : 100,
7979
ctx.vtex.logger,
8080
{
8181
logPrefix: 'Correction',

node/services/banners.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { compareApiResults } from '../utils/compareResults'
1+
import { compareApiResults, NO_TRAFFIC } from '../utils/compareResults'
22
import { buildAttributePath } from '../commons/compatibility-layer'
33

44
export async function fetchBanners(
@@ -19,7 +19,7 @@ export async function fetchBanners(
1919
return compareApiResults(
2020
() => intelligentSearchApi.fetchBanners(argumentsToFetchBanners),
2121
() => intsch.fetchBannersV1({ ...argumentsToFetchBanners, locale }),
22-
ctx.vtex.production ? 10 : 100,
22+
ctx.vtex.production ? NO_TRAFFIC : 100,
2323
ctx.vtex.logger,
2424
{
2525
logPrefix: 'Banners',

node/services/facets.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { buildAttributePath } from '../commons/compatibility-layer'
2-
import { compareApiResults } from '../utils/compareResults'
2+
import { compareApiResults, NO_TRAFFIC } from '../utils/compareResults'
33
import { fetchAppSettings } from './settings'
44
import type { FacetsInput } from '../typings/Search'
55

@@ -89,7 +89,7 @@ export async function fetchFacets(
8989
return compareApiResults(
9090
() => fetchFacetsFromBiggy(ctx, args, selectedFacets, shippingOptions),
9191
() => fetchFacetsFromIntsch(ctx, args, selectedFacets, shippingOptions),
92-
ctx.vtex.production ? 10 : 100,
92+
ctx.vtex.production ? NO_TRAFFIC : 100,
9393
ctx.vtex.logger,
9494
{
9595
logPrefix: 'Facets',

node/services/productSearch.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
convertOrderBy,
44
} from '../commons/compatibility-layer'
55
import { getWorkspaceSearchParamsFromStorage } from '../routes/workspaceSearchParams'
6-
import { compareApiResults } from '../utils/compareResults'
6+
import { compareApiResults, NO_TRAFFIC } from '../utils/compareResults'
77
import { fetchAppSettings } from './settings'
88
import type { ProductSearchInput } from '../typings/Search'
99

@@ -125,7 +125,7 @@ export async function fetchProductSearch(
125125
fetchProductSearchFromBiggy(ctx, args, selectedFacets, shippingOptions),
126126
() =>
127127
fetchProductSearchFromIntsch(ctx, args, selectedFacets, shippingOptions),
128-
ctx.vtex.production ? 10 : 100,
128+
ctx.vtex.production ? NO_TRAFFIC : 100,
129129
ctx.vtex.logger,
130130
{
131131
logPrefix: 'ProductSearch',

node/utils/compareResults.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import type { Logger } from '@vtex/api'
22

3+
export const NO_TRAFFIC = 0
4+
35
/**
46
* Utility to compare the results of two functions in parallel
57
* Used primarily for comparing the results of two API implementations

0 commit comments

Comments
 (0)