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

fix(connection): upsert return full connection, logs #2219

Merged
merged 2 commits into from
May 29, 2024

Conversation

bodinsamuel
Copy link
Collaborator

@bodinsamuel bodinsamuel commented May 29, 2024

Describe your changes

Fixes NAN-1041

  • Upserting connection now returns full row
    Some part of the code still query connection again after that, ideally we would reuse the object but I tried to limit the number of changes

  • Add missing context for logs where needed

@bodinsamuel bodinsamuel self-assigned this May 29, 2024
Copy link

linear bot commented May 29, 2024

@bodinsamuel bodinsamuel marked this pull request as ready for review May 29, 2024 11:48
@@ -124,7 +130,7 @@ class ConnectionService {
accountId: number
): Promise<ConnectionUpsertResponse[]> {
const storedConnection = await this.checkIfConnectionExists(connectionId, providerConfigKey, environment_id);
const config_id = await configService.getIdByProviderConfigKey(environment_id, providerConfigKey);
const config_id = await configService.getIdByProviderConfigKey(environment_id, providerConfigKey); // TODO remove that
Copy link
Collaborator

Choose a reason for hiding this comment

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

why does it need to be removed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we are already fetching the config earlier in most cases

@bodinsamuel bodinsamuel enabled auto-merge (squash) May 29, 2024 12:59
@bodinsamuel bodinsamuel merged commit a00e30d into master May 29, 2024
21 checks passed
@bodinsamuel bodinsamuel deleted the fix/upsert-connection branch May 29, 2024 13:04
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.

3 participants