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

Refactor controller to use uploadAssets from happo.io package #69

Merged
merged 1 commit into from
Feb 18, 2025

Conversation

lencioni
Copy link
Contributor

We have been making some improvments in the core happo.io package to how assets are uploaded. To ensure that happo-e2e consumers benefit from these improvments, I am refactoring the controller to use the uploadAssets function from that package. This also gives us a little less code to maintain here, which is nice.

We have been making some improvments in the core happo.io package to how
assets are uploaded. To ensure that happo-e2e consumers benefit from
these improvments, I am refactoring the controller to use the
uploadAssets function from that package. This also gives us a little
less code to maintain here, which is nice.
@lencioni lencioni requested a review from trotzig February 18, 2025 21:14
Comment on lines -137 to -141
if (this.happoDebug) {
console.log(
`[HAPPO] Reusing existing assets at ${assetsDataRes.path} (previously uploaded on ${assetsDataRes.uploadedAt})`,
);
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

One downside with this change is that we won't be dropping these logs as nicely as we currently do when this.happoDebug is truthy.

We should maybe look at how this works across packages and attempt to unify it a bit so it would just work.

apiKey: this.happoConfig.apiKey,
apiSecret: this.happoConfig.apiSecret,
logger: console,
project: this.happoConfig.project,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

project is currently only used for some logging in uploadAssets.

@lencioni lencioni merged commit a4c5a25 into main Feb 18, 2025
5 checks passed
@lencioni lencioni deleted the upload-assets-happo-io branch February 18, 2025 21:35
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.

1 participant