-
Notifications
You must be signed in to change notification settings - Fork 13
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
feat(3636): track reasons for choosing cloud provider #3857
Conversation
golebu2020
commented
Sep 26, 2024
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.
Looks great! I just left one comment.
Quick question: Have you tested the feature with old data, such as from your local environment or live environments?
@@ -193,7 +193,14 @@ export default publicCloudProductRequest(({ pathParams, queryParams, session, ro | |||
|
|||
return ( | |||
<div> | |||
<PublicCloudBillingInfo product={publicSnap.currentRequest.decisionData} className="mb-2" /> | |||
<PublicCloudBillingInfo |
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.
It seems you're adding these two fields to align with the type configuration. Instead of adding data, let's omit these two fields from the Product
type in PublicCloudBillingInfo
.
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.
I've tested the feature from my local environment and it works as expected.
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.
It seems you're adding these two fields to align with the type configuration. Instead of adding data, let's omit these two fields from the
Product
type inPublicCloudBillingInfo
.
okay
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.
I've tested the feature from my local environment and it works as expected.
Did your local environment had a old public cloud data?
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.
No I don't. The sign MoU
feature didn't allow me to go past the level of approving the product.
@@ -20,3 +21,12 @@ export const getRandomUser = () => { | |||
createdAt: new Date(), | |||
}; | |||
}; | |||
export const getRandomCloudProviderSelectionReasons = () => { |
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.
I see duplicate function getRandomCloudProviderSelectionReasons
from above.
const randomNumberOfReasons = getRandomNumberOptimally(1, reasonForSelectingCloudProviderArray.length); | ||
return faker.helpers.arrayElements(reasonForSelectingCloudProviderArray, randomNumberOfReasons); | ||
}; | ||
export const getRandomProviderReasonsNote = () => { |
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.
I see duplicate function getRandomProviderReasonsNote
from above.
I've tested the feature from my local environment and it works as expected. |
16c72ec
to
8b72df4
Compare
.bin/copy-db.sh
Outdated
@@ -28,4 +28,5 @@ echo "Most recent file: $recent_file" | |||
|
|||
# Copy the most recent back file to unarchive into the sandbox database | |||
oc cp "$pod_name:backup/$recent_file" "$tmp_dir/$recent_file" | |||
echo "pltsvc" |
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.
please revert this.
.tool-versions
Outdated
@@ -7,3 +7,4 @@ helm 3.16.1 | |||
shfmt 3.9.0 | |||
act 0.2.67 | |||
jq 1.7.1 | |||
database-tools 0.8.1 |
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.
please revert this.
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.
Did already
reviewMou: boolean; | ||
}; | ||
}, | ||
'providerSelectionReasons' | 'providerSelectionReasonsNote' |
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.
try revert this to see if you still have issues.
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.
okay
app/components/billing/types.ts
Outdated
@@ -12,5 +12,5 @@ export type Product = Omit< | |||
}; | |||
}; | |||
}>, | |||
'updatedAt' | |||
'updatedAt' | 'providerSelectionReasons' | 'providerSelectionReasonsNote' |
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.
try revert this to see if you still have issues.
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.
okay
export const up = async (db, client) => { | ||
await db | ||
.collection('PublicCloudRequestedProject') | ||
.updateMany({ providerSelectionReasonsNote: null }, { $set: { providerSelectionReasonsNote: ' ' } }); |
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.
- let's merge these two files with
Promise.all
. - in the
filter
clause, check if the field exists as well
- $exists: false OR null
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.
okay
5cca765
to
f9afa9b
Compare
f9afa9b
to
7bac5ac
Compare
Quality Gate failedFailed conditions |