Skip to content

Conversation

@oarbusi
Copy link
Collaborator

@oarbusi oarbusi commented Mar 28, 2025

Proposed changes

Fixes the release of NuGet (issue)
The error was

jsign: The file ./dist/dotnet/MongoDB.AWSCDKResourcesMongoDBAtlas.3.10.0.nupkg couldn't be found

when trying to sign the nuget package.

After investigataion, I realized that the NuGet package was being generated but with the wrong name, MongoDB.AWSCDKResourcesMongoDBAtlas.0.0.0.nupkg (not the expected version number).
To fix this the npx projen bump command is needed to bump the version in the package.json file. The projen bump command needs to:

  • Find the latest version tag in the repository
  • Determine the next version based on commit history
  • Generate a changelog

To do this, it needs access to:

  • All git tags (which contain version information)
  • The full commit history (to determine what changed since the last release)

That is why I added fetch-depth: 0 so that the full git history is fetched, instead of just doing a shallow copy (default fetch-depth: 1`)

Tested this change running a modified version of the Action defined here: #422
And with those changes the resulting dotnet package is MongoDB.AWSCDKResourcesMongoDBAtlas.3.10.0.nupkg

Link to any related issue(s): CLOUDP-309125

Type of change:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as
    expected)
  • This change requires a documentation update

Required Checklist:

  • I have signed the MongoDB CLA
  • I have added tests that prove my fix is effective or that my feature works
  • I have added any necessary documentation (if appropriate)
  • I have run make fmt and formatted my code
  • I have tested the CDK constructor in a CFN stack. See TESTING.md
  • If changes include removal or addition of 3rd party GitHub actions, I updated our internal document. Reach out to the APIx Integration slack channel to get access to the internal document.

Further comments

@oarbusi oarbusi marked this pull request as ready for review March 28, 2025 09:24
@oarbusi oarbusi requested a review from a team as a code owner March 28, 2025 09:24
run: cd .repo && yarn install --check-files --frozen-lockfile
- name: Create dotnet artifact
run: cd .repo && npx projen compile && npx projen package:dotnet
run: |
Copy link
Collaborator

@EspenAlbert EspenAlbert Mar 28, 2025

Choose a reason for hiding this comment

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

As this job depends on release job, ideally we would get all the info from the dist artifact (in previous step).
Did you try to do that?
If you run npx projen release -i you can see that build, compile, package:dotnet are all part of the release.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

All other packaging run cd .repo && npx projen compile && npx projen package:python/go/etc so I think the easier and most consistent solution is to just add the npx projen bump.

Copy link
Collaborator

@EspenAlbert EspenAlbert Mar 28, 2025

Choose a reason for hiding this comment

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

Checked the dist artifact and it looks like the dotnet is not built and uploaded (guess it would require installing dependencies in the first job)
Could be an improvement for later, but understand it is out-of-scope for this PR
image

with:
path: .repo
fetch-depth: 0
- name: Install Dependencies
Copy link
Member

Choose a reason for hiding this comment

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

do you know why it has started to fail now?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Only relevant changes that have happened to the repo since last release are mostly dependency updates. I think some dependency got updated here (maybe jsii from 1.X to 5.6 😅), but I am not 100% sure

Copy link
Collaborator

@EspenAlbert EspenAlbert left a comment

Choose a reason for hiding this comment

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

Thank you

@oarbusi oarbusi merged commit d1e523e into main Mar 28, 2025
24 checks passed
@oarbusi oarbusi deleted the CLOUDP-309125-fix branch March 28, 2025 10:34
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.

4 participants