Skip to content

Commit 295704c

Browse files
Use ReleaseVersion instead of no-longer-populated vcsTag (#7542)
1 parent 4dd5cac commit 295704c

4 files changed

Lines changed: 5 additions & 20 deletions

File tree

api/src/org/labkey/api/module/DefaultModule.java

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ public abstract class DefaultModule implements Module, ApplicationContextAware
137137
private String _vcsRevision = null;
138138
private String _vcsUrl = null;
139139
private String _vcsBranch = "Unknown";
140-
private String _vcsTag = "Unknown";
141140
private String _buildUser = null;
142141
private String _buildTime = null;
143142
private String _buildOS = null;
@@ -818,17 +817,10 @@ public void setVcsBranch(String vcsBranch)
818817
_vcsBranch = vcsBranch;
819818
}
820819

821-
@Nullable
822-
@Override
823-
public String getVcsTag()
824-
{
825-
return _vcsTag;
826-
}
827-
828820
@SuppressWarnings({"UnusedDeclaration"})
829821
public void setVcsTag(String vcsTag)
830822
{
831-
_vcsTag = vcsTag;
823+
// Ignored - present in module.xml but not used
832824
}
833825

834826
public final String getBuildUser()
@@ -974,7 +966,6 @@ public final Map<String, String> getProperties()
974966
props.put("VCS URL", getVcsUrl());
975967
props.put("VCS Revision", getVcsRevision());
976968
props.put("VCS Branch", getVcsBranch());
977-
props.put("VCS Tag", getVcsTag());
978969
props.put("Build OS", getBuildOS());
979970

980971
props.put("Build Time", getBuildTime());
@@ -1605,7 +1596,6 @@ public void copyPropertiesFrom(DefaultModule from)
16051596
this.setUrl(from.getUrl());
16061597
this.setVcsBranch(from.getVcsBranch());
16071598
this.setVcsRevision(from.getVcsRevision());
1608-
this.setVcsTag(from.getVcsTag());
16091599
this.setVcsUrl(from.getVcsUrl());
16101600
this.setZippedPath(from.getZippedPath());
16111601
}

api/src/org/labkey/api/module/MockModule.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -331,12 +331,6 @@ public String getVcsBranch()
331331
return null;
332332
}
333333

334-
@Override
335-
public String getVcsTag()
336-
{
337-
return null;
338-
}
339-
340334
@Override
341335
public boolean shouldManageVersion()
342336
{

api/src/org/labkey/api/module/Module.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,6 @@ default void startBackgroundThreads()
311311
String getVcsRevision();
312312
String getVcsUrl();
313313
String getVcsBranch();
314-
String getVcsTag();
315314
String getBuildNumber();
316315

317316
default String getBuildTime()

api/src/org/labkey/api/util/UsageReportingLevel.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,9 +327,11 @@ public static void putModulesBuildInfo(Map<String, Map<String, Object>> allModul
327327
moduleBuildInfo.put("vcsUrl", module.getVcsUrl());
328328
moduleBuildInfo.put("vcsBranch", module.getVcsBranch());
329329
moduleBuildInfo.put("vcsRevision", module.getVcsRevision());
330-
moduleBuildInfo.put("vcsTag", module.getVcsTag());
330+
// We stopped capturing the Git tag in module metadata. The release version property serves
331+
// the same purpose. Continue reporting as vcsTag for backwards compatibility with mothership reporting.
332+
moduleBuildInfo.put("vcsTag", module.getReleaseVersion());
331333
moduleBuildInfo.put("moduleClass", module.getClass().getName());
332-
moduleBuildInfo.put("version", module.getFormattedSchemaVersion()); // TODO: call this "schemaVersion"? Also send "releaseVersion"?
334+
moduleBuildInfo.put("version", module.getFormattedSchemaVersion()); // TODO: call this "schemaVersion"?
333335

334336
// Add to the module's info to be included in the submission
335337
moduleStats.put("buildInfo", moduleBuildInfo);

0 commit comments

Comments
 (0)