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

Cleanup FCA experiment flag and legacy code paths #3603

Merged

Conversation

justinchou-google
Copy link
Contributor

@justinchou-google justinchou-google commented Dec 17, 2024

Post launch, cleanup legacy code: b/385185319

Final step of post-launch cleanup:

  1. Let launch bake until January.
  2. Mark flags as launched in mendel UI.
  3. Submit this PR.

@justinchou-google justinchou-google self-assigned this Dec 17, 2024
@justinchou-google justinchou-google changed the title remove fca flag Cleanup FCA experiment flag and legacy code paths Dec 19, 2024
@justinchou-google justinchou-google marked this pull request as ready for review December 19, 2024 22:18
…into cleanup
@oyj9109
Copy link
Contributor

oyj9109 commented Dec 20, 2024

Clean up LGTM. Left a suggestion for fallback mechanism we can be followed up later.

…into cleanup
…into cleanup
…into cleanup
const nextOrchestration = await this.getInterventionOrchestration_(
clientConfig,
article
);

if (!!nextOrchestration) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Will this result in nothing being shown? Should this fallback aswell?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question, this is WAI because it is valid for getInterventionOrchestration_ to not return any orchestration after checking, for example, action state or frequency capping eligibility. The fallback implemented for actionOrchestration is a fallback for an invalid case where the actionOrchestration object is absent from the article response.

Copy link
Contributor

@mhkawano mhkawano Mar 19, 2025

Choose a reason for hiding this comment

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

Makes sense, I see line 345 now. Maybe splitting the block assigning potentialAction into a function could make it easier to read?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree it is slightly confusing, the reason why getting potentialAction is not its own function is because the overall function relies on setting dismissibility from the orchestration. I added a todo to clean this up in a future PR.

const nextOrchestration = await this.getInterventionOrchestration_(
clientConfig,
article
);

if (!!nextOrchestration) {
Copy link
Contributor

@mhkawano mhkawano Mar 19, 2025

Choose a reason for hiding this comment

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

Makes sense, I see line 345 now. Maybe splitting the block assigning potentialAction into a function could make it easier to read?

@justinchou-google justinchou-google enabled auto-merge (squash) March 19, 2025 19:11
@justinchou-google justinchou-google merged commit 80bb432 into subscriptions-project:main Mar 19, 2025
7 checks passed
@justinchou-google justinchou-google deleted the cleanup branch March 19, 2025 19:21
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.

None yet

3 participants