Skip to content

Conversation

@labkey-susanh
Copy link
Contributor

@labkey-susanh labkey-susanh commented Jan 7, 2026

Rationale

Issue 774: When we removed the usage of the versioning plugin, we missed a dependency on that plugin that was used for determining the names of our distribution files.

The RestoreFromTrash task needed converting to be compatible with the configuration cache and to allow for a more robust restoration process.

The PurgeArtifacts task was not checking for empty versions, and if purge requests are sent with an empty version, that causes all versions to be deleted. Not something we want.

Related Pull Requests

Changes

  • Update BuildUtils.getDistributionVersion to get VCS properties from git commands instead of removed versioning plugin
  • Add some trimming and empty string checks for PurgeArtficats task
  • Modify RestoreFromTrash task to read modules and versions from files

Copy link
Member

@labkey-tchad labkey-tchad left a comment

Choose a reason for hiding this comment

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

BuildUtils.getVersionNumber also references the versioning plugin. Could you update that as well? If I remember correctly, it's used to include feature branch names in module.xml files for modules built from a feature branch.

Comment on lines 604 to 607
if (distributionProject.configurations.named(config) == null)
distributionProject.configurations {
config
}
Copy link
Member

Choose a reason for hiding this comment

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

I think this could use maybeCreate.

distributionProject.configurations.maybeCreate(config)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. Done.


distributionProject.evaluationDependsOn(depProject.getPath())
if (depProject.configurations.findByName("modules") != null) {
if (depProject.configurations.named("modules") != null) {
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this will work the same way. named throws an exception instead of returning null.
There's no advantage to using lazy resolution here since we're immediately digging in to the configuration's contents, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, you are so right. I forgot about that. (You would think I might remember since it's really annoying that this throws an exception).

@labkey-tchad
Copy link
Member

labkey-tchad commented Jan 7, 2026

After some investigation, it turns out BuildUtils.getVersionNumber was included in .module file names before removing the versioning plugin.

@labkey-susanh
Copy link
Contributor Author

After some investigation, it turns out BuildUtils.getVersionNumber was included in .module file names before removing the versioning plugin.

I've restored the functionality for now. I think it's still at least theoretically desirable, even if we are seldom using -PincludeVcs with feature branches.

@labkey-susanh labkey-susanh merged commit cdc2e97 into develop Jan 8, 2026
3 checks passed
@labkey-susanh labkey-susanh deleted the fb_versionFixes branch January 8, 2026 20:48
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