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(maven): move importGPGKey function call from constructor to publish #553

Merged
merged 5 commits into from
Aug 8, 2024

Conversation

buenaflor
Copy link
Contributor

@buenaflor buenaflor commented Aug 6, 2024

Context

We have recently set up a multiple maven target setup in one of our repos: https://github.com/getsentry/sentry-kotlin-multiplatform/blob/main/.craft.yml

and noticed an error during publish that indicates an error within the importGPGKey function: https://github.com/getsentry/publish/actions/runs/10250810494/job/28357374501#step:11:166

Fix

The importGPGKey function returns a promise but is not being awaited in the constructor (which is problematic when multiple targets are instantiated) and it cannot be awaited in a constructor so we move it to the publish call site

## Context
We have recently set up a multiple target setup in one of our repos: https://github.com/getsentry/sentry-kotlin-multiplatform/blob/main/.craft.yml

and noticed an error during publish that indicates an error within the `importGPGKey` function: https://github.com/getsentry/publish/actions/runs/10250810494/job/28357374501#step:11:166

## Fix

The `importGPGKey` function returns a promise but is not being awaited

Side note: shouldn't this be caught by some static code analyzer or linter?
@buenaflor buenaflor requested a review from a team August 6, 2024 12:19
@buenaflor buenaflor marked this pull request as draft August 6, 2024 12:20
@buenaflor buenaflor changed the title fix: add missing await to importGPGKey function call fix(maven): move importGPGKey function call from constructor to publish Aug 6, 2024
@buenaflor buenaflor marked this pull request as ready for review August 6, 2024 12:53
@buenaflor buenaflor merged commit 78790e9 into master Aug 8, 2024
10 checks passed
@buenaflor buenaflor deleted the buenaflor-patch-1 branch August 8, 2024 09:25
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.

2 participants