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(ci/cd): 202401111 #2814

Merged
merged 1 commit into from
Jan 19, 2024
Merged

fix(ci/cd): 202401111 #2814

merged 1 commit into from
Jan 19, 2024

Conversation

Cosmin-Parvulescu
Copy link
Contributor

Description

Various fixes for the error / warnings in our ci/cd pipeline

Checklist

  • I have read the CONTRIBUTING guidelines
  • I have tested my code (manually and/or automated if applicable)
  • I have updated the documentation (if necessary)

@Cosmin-Parvulescu Cosmin-Parvulescu self-assigned this Jan 11, 2024
@Cosmin-Parvulescu Cosmin-Parvulescu added the bug Indicates an unexpected problem or unintended behavior label Jan 11, 2024
@Cosmin-Parvulescu Cosmin-Parvulescu marked this pull request as ready for review January 11, 2024 13:59
if (traceparent) {
const parsedTraceparent = traceparent.split('-')
console.assert(
parsedTraceparent.length === 4,
`traceparent value: ${traceparent}`
)
const [_, traceId, parentId] = parsedTraceparent
const traceId = parsedTraceparent[1]
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this a personal preference or a linter rule? The deconstructor syntax looks cleaner.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Linter warning

@@ -30,12 +31,14 @@ export const getAccountAvatarMethod: GetAccountAvatarMethod = async ({
throw new Error('missing address or type')
}

if (!ctx.hashedIdref) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This check is already done in the middleware. Shouldn't be repeated here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Linter warning for !

@@ -64,7 +63,11 @@ export const getAccountProfileMethod: GetAccountProfileMethod = async ({
if (!nodeClient)
throw new InternalServerError({ message: 'missing nodeClient' })

return getProfile(ctx, nodeClient, ctx.accountURN!)
if (!ctx.accountURN) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This check is already done in the middleware. Shouldn't be repeated here.

@@ -119,7 +122,12 @@ async function getProfile(
case OAuthAccountType.Google:
return new GoogleAccount(node, ctx.env)
case OAuthAccountType.Microsoft:
return new MicrosoftAccount(node, ctx.hashedIdref!, ctx.env)
if (!ctx.hashedIdref) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This check is already done in the middleware. Shouldn't be repeated here.

@@ -37,6 +37,11 @@ export const acceptIdentityGroupMemberInvitation = async ({
message: 'Identity group DO not found',
})
}
if (!ctx.identityURN) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This check is already done in the middleware. Shouldn't be repeated here.

@Cosmin-Parvulescu
Copy link
Contributor Author

Left only the error fix.

@betimshahini betimshahini merged commit de1fe0b into main Jan 19, 2024
14 checks passed
@betimshahini betimshahini deleted the fix/cicd/202401111 branch January 19, 2024 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants