This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 186800 - Disallow apparently numeric ${buildnumber}
Summary: Disallow apparently numeric ${buildnumber}
Status: RESOLVED WONTFIX
Alias: None
Product: www
Classification: Unclassified
Component: Builds & Repositories (show other bugs)
Version: 6.x
Hardware: All All
: P2 normal (vote)
Assignee: Jiri Rechtacek
URL:
Keywords:
: 222677 (view as bug list)
Depends on:
Blocks: 186755
  Show dependency tree
 
Reported: 2010-05-27 12:06 UTC by Jesse Glick
Modified: 2013-06-26 13:41 UTC (History)
7 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Proposed patch (1.46 KB, patch)
2010-05-27 12:06 UTC, Jesse Glick
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2010-05-27 12:06:07 UTC
Created attachment 99537 [details]
Proposed patch

Setting -Dbuildnumber=... to something that could be interpreted as a number, such as 20100527, is a bad idea; this was the root cause of bug #186755. While the module system does not care, some parts of the build harness treat an integral OpenIDE-Module-Implementation-Version specially: implementation deps are advised to be on numbers, whereas build versions should be opaque strings.

If a module specifies an explicit -I-V then that is used in the JAR (and ${buildnumber} is used for OpenIDE-Module-Build-Version), but otherwise (the usual case) ${buildnumber} is used for -I-V. In this case it is undesirable for the -I-V to look numeric.

The attached patch prevents you from accidentally passing -Dbuildnumber=20100527190000 or whatever. It cannot be applied yet because RE production builds continue to do this. (The string seems to be passed in from some external script via the environment variable $BUILDNUMBER, so I cannot identify the real source.)
Comment 1 Jesse Glick 2011-02-08 15:22:39 UTC
Intentionally assigned to RE - reread last para.
Comment 2 Jaroslav Tulach 2012-08-22 11:53:15 UTC
Hello Petr,
can you start using 2012-08-22-0300 as build number and then apply the Jesse's patch?
Comment 3 pgebauer 2012-11-09 16:20:34 UTC
The change of build number will affect installers, QA automatic tests etc. The change have to be discussed with those teams. We will address it a next release.
Comment 4 Marian Mirilovic 2012-11-09 16:56:32 UTC
Speaking for QE : we can start discussion and keep that on radar for 7.3 . Let's move on and tell us what exactly will change and how, we will modify our scripts and start to use new approach in a days.
Comment 5 pgebauer 2012-11-10 09:45:56 UTC
OK, let's discussion and experiments start.

My part is available in the separate branch "new_build_number" in the repository core-main.

http://hg.netbeans.org/core-main/rev/90028d5ceccd

A new build has been setup for that branch and it currently fails in the installer build section.
Comment 6 Petr Jiricka 2012-11-26 14:08:54 UTC
So what are the next steps needed on this?
Comment 7 pgebauer 2012-11-26 14:16:53 UTC
(In reply to comment #6)
> So what are the next steps needed on this?

jrechtacek should accommodate the installers built at the branch.
Comment 8 Jiri Rechtacek 2012-11-28 08:46:26 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > So what are the next steps needed on this?
> 
> jrechtacek should accommodate the installers built at the branch.

I'm looking on it.
Comment 9 Jiri Rechtacek 2012-11-30 20:29:11 UTC
http://hg.netbeans.org/core-main/rev/d75dacf8fd60
http://hg.netbeans.org/core-main/rev/d75dacf8fd60

Done on the branch. I'm going to do the merge in the next week.
Comment 10 Jiri Rechtacek 2012-12-03 16:33:55 UTC
On account of the change in buildnumber requires changes in setup of some (QE jobs, nbbundles) and because of possible risk with handling impl.dependencies of NetBeans module I propose to do the merge after branching release73.
Comment 11 Marian Mirilovic 2012-12-06 07:58:51 UTC
agreed on waiver
Comment 12 pgebauer 2013-05-28 12:14:59 UTC
(In reply to comment #11)
> agreed on waiver

After discussions, it seems QA doesn't want to change the build number format. The issue should be closed as "wontfix".
Comment 13 Marian Mirilovic 2013-05-28 13:14:44 UTC
(In reply to comment #12)
> (In reply to comment #11)
> > agreed on waiver
> 
> After discussions, it seems QA doesn't want to change the build number format.
> The issue should be closed as "wontfix".

Petr, we do support this change .. .please postpone decision to 'after 7.3.1' and we can talk about it on next installer i-team.
Comment 14 Marian Mirilovic 2013-05-31 10:08:12 UTC
So, I would prefer to add version into build number, get rid of seconds and change format to something readable by human bodies as well, e.g. :
7.3_2013-05-30_00-55
7.3.1_2013-05-30_00-55
Dev_2013-05-30_00-55

[version]_YYYY-MM-DD_HH-MM
Comment 15 Marian Mirilovic 2013-05-31 10:08:22 UTC
*** Bug 222677 has been marked as a duplicate of this bug. ***
Comment 16 _ gtzabari 2013-05-31 15:45:19 UTC
Gentlemen,

Why do you need the build time as part of the version number? Why can't you publish a mapping between a version number and the time to the server for internal use? I assume this mapping is used by computers (not humans) and they are more than capable to parse this mapping off the server.

The version number should be geared towards human beings, not computers :) I personally prefer: major.minor.build such as 7.3.1, 7.3.2, etc. But this works as well: major.minor.patch.build such as 7.3.1.32, 7.3.1.33, etc.

Point being, the version number should be short enough for humans to parse quickly and easy to remember. Once you go beyond four numbers it becomes difficult to parse and remember.
Comment 17 Marian Mirilovic 2013-06-13 06:48:14 UTC
(In reply to comment #16)
> Why do you need the build time as part of the version number? Why can't you
> publish a mapping between a version number and the time to the server for
> internal use? I assume this mapping is used by computers (not humans) and they
> are more than capable to parse this mapping off the server.

no mappings, keep it self-explanatory
Comment 18 _ gtzabari 2013-06-13 13:28:22 UTC
(In reply to comment #17)
> (In reply to comment #16)
> > Why do you need the build time as part of the version number? Why can't you
> > publish a mapping between a version number and the time to the server for
> > internal use? I assume this mapping is used by computers (not humans) and they
> > are more than capable to parse this mapping off the server.
> 
> no mappings, keep it self-explanatory

So why do you need the build time as part of the version number? Why isn't major.minor.patch.build enough?
Comment 19 Marian Mirilovic 2013-06-13 14:05:31 UTC
(In reply to comment #18)
> (In reply to comment #17)
> > (In reply to comment #16)
> > no mappings, keep it self-explanatory
> 
> So why do you need the build time as part of the version number? Why isn't
> major.minor.patch.build enough?

Because with time it will be clear when exactly it was build.
Comment 20 _ gtzabari 2013-06-13 14:14:33 UTC
(In reply to comment #19)
> (In reply to comment #18)
> > (In reply to comment #17)
> > > (In reply to comment #16)
> > > no mappings, keep it self-explanatory
> > 
> > So why do you need the build time as part of the version number? Why isn't
> > major.minor.patch.build enough?
> 
> Because with time it will be clear when exactly it was build.

So if I understand you correctly, you're implying that users prefer a build time to a build number. Meaning: 

7.4.0.2013-06-13_10-12 vs
7.4.0.5

I personally prefer the latter because it's easier to read and remember. I don't really care when the build was created, but that's just me. I would point out that the majority of projects in the wild use the latter syntax, and have been doing so for decades now. Lastly, if I wanted to look up when a build was created, it would be sufficient for me to go to netbeans.org and look it up.

I personally don't see the need to embed a date into the version number (which is not to say that this information couldn't be available externally).
Comment 21 Jiri Rechtacek 2013-06-26 12:53:58 UTC
After the next round of discussions we reached to conclusion, we will not change the format of ${buildnumber}. Rather IZ notification will be improved to show branch name in the notification.
Comment 22 _ gtzabari 2013-06-26 13:41:32 UTC
(In reply to comment #21)
> After the next round of discussions we reached to conclusion, we will not
> change the format of ${buildnumber}. Rather IZ notification will be improved to
> show branch name in the notification.

How will that help?