-
Bug
-
Resolution: Won't Fix
-
Major
-
None
-
Powered by SuggestiMate
When creating a job using a cvs branch, and cvs plugin does the checkout and rlog, but finds nothing. Using the same parameters from the commandline, using linux cvs client, it does see the changes.
From the log:
cvs rlog -S -d07 Aug 2012 17:47:11 +0300<07 Aug 2012 18:12:20 +0300 base-iso
cvs rlog: Logging base-iso
cvs rlog: Logging base-iso/.disk
cvs rlog: Logging base-iso/boot
but from the commandline:
cvs rlog -S -d"07 Aug 2012 17:47:11 +0300<07 Aug 2012 18:12:20 +0300" base-iso
cvs rlog: Logging base-iso
RCS file: /opt/cvsroot/base-iso/create_iso.sh,v
head: 1.6
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 6; selected revisions: 1
description:
----------------------------
revision 1.6
date: 2012/08/07 14:47:55; author: urim; state: Exp; lines: +1 -1
Changelog
=============================================================================
cvs rlog: Logging base-iso/.disk
cvs rlog: Logging base-iso/boot
cvs rlog: Logging base-iso/boot/grub
After downgrading to CVS plugin 1.6, the changes list is working, so it seems to be a problem with the cvs library.
[JENKINS-14711] Polling and Changelog do not pick up changes on CVS Tags
I have one installation with version 2.5 of plugin (Jenkins 1.477) and it is not possible to downgrade to 2.4 but only to 1.6 from the jenkins manager console. Is there any workarround to get it working before we have the issue solved?
I have found the error and created a patch at https://github.com/mgraciano/cvs-plugin/commit/acda8d6d6cc9053f770ae765c497a6396b860b9f
It was a parsing pattern issue, so i fixed to revert to the original parsing and created a workaround to parse the current date. The problem is just for visualization, the changelog is created successfully. How can I send the patch to you? Should I create a pull request?
BTW, the workaround is to fix the changelog.xml files manually. Just change de <changeDate> to use - instead / as date fields separator. Maybe a shell script could help.
I have updated my patch and create tests to avoid this kind of regression again as well to verify the patch.
https://github.com/mgraciano/cvs-plugin/commits/master
Should I start a pull request for this?
Pull request created https://github.com/jenkinsci/cvs-plugin/pull/14
Code changed in jenkins
User: mgraciano
Path:
src/main/java/hudson/scm/CVSChangeLogSet.java
http://jenkins-ci.org/commit/cvs-plugin/acda8d6d6cc9053f770ae765c497a6396b860b9f
Log:
JENKINS-14711 - No changelist in CVS plugin 2.5 using rlog, but "cli rlog" works fine
Code changed in jenkins
User: mgraciano
Path:
src/main/java/hudson/scm/CVSChangeLogSet.java
src/test/java/hudson/scm/CVSChangeLogParserTest.java
src/test/resources/hudson/scm/changelogCurrentFormat.xml
src/test/resources/hudson/scm/changelogRegression14711.xml
http://jenkins-ci.org/commit/cvs-plugin/c990be067a84f6dda9a127dada65e47e0b91ec84
Log:
Created tests to verify changelog parsing retrocompatibility for JENKINS-14711
Code changed in jenkins
User: mgraciano
Path:
src/test/java/hudson/scm/CVSChangeLogSetTest.java
http://jenkins-ci.org/commit/cvs-plugin/e50ef5e9abf9f196a4c7e487481c5dcfcac094e9
Log:
Created tests to avoid regressions as JENKINS-14711
Code changed in jenkins
User: mc1arke
Path:
src/main/java/hudson/scm/CVSChangeLogSet.java
src/test/java/hudson/scm/CVSChangeLogParserTest.java
src/test/java/hudson/scm/CVSChangeLogSetTest.java
src/test/resources/hudson/scm/changelogCurrentFormat.xml
src/test/resources/hudson/scm/changelogRegression14711.xml
http://jenkins-ci.org/commit/cvs-plugin/7b2322db8d83efbef17a4dc1bf1f67931d83f0e2
Log:
Merge pull request #14 from mgraciano/master
Fix for issue JENKINS-14711
Compare: https://github.com/jenkinsci/cvs-plugin/compare/dd3cbc6479a4...7b2322db8d83
Hi,
I am still getting this issue where I am seeing no changes in change log it updated my workspace though & rlog command works fine on Solaris CLI as.
My set up is
Jenkins ver. 1.488
CVS plugin I tried both latest 2.7 & 2.4 no luck
My Project job configuration for SCM is
location: Tag
Tag name: DEV
Use Update is checked (yes)
Basically I want Jenkins to kick of build job if there are any updates to a particular tag in this case DEV, which works fine with this scheme for my workspace but the change is not reflected in change log.
Console output
cvs checkout -r DEV -d temp srcmgr
cvs checkout: Updating temp
cvs checkout: Updating temp/adhoc
cvs checkout: Updating temp/cm
cvs checkout: Updating temp/cm/bin
cvs checkout: Updating temp/logs
cvs checkout: Updating temp/test
U temp/test/someotheFile
cvs checkout: Updating temp/test/createSomeLongPathDirAveryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVerylongpathDirectory
cvs checkout: Updating temp/test/someDir
U temp/test/someDir/foo.bar
Using locally configured password for connection to :pserver:amittal@melcvs01:/cvs
cvs rlog -S -d15 Nov 2012 15:24:35 +1100<15 Nov 2012 15:39:59 +1100 srcmgr
cvs rlog: Logging srcmgr
cvs rlog: Logging srcmgr/adhoc
cvs rlog: Logging srcmgr/cm
cvs rlog: Logging srcmgr/cm/bin
cvs rlog: Logging srcmgr/logs
cvs rlog: Logging srcmgr/test
cvs rlog: Logging srcmgr/test/createSomeLongPathDirAveryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVerylongpathDirectory
cvs rlog: Logging srcmgr/test/someDir
It updates my workspace however there is nothing in the change log or changes in Jenkins, whereas I can run rlog on Solaris CLI
>cvs rlog -S -d'15 Nov 2012 15:24:35 +1100<15 Nov 2012 15:39:59 +1100' srcmgr
cvs rlog: Logging srcmgr
cvs rlog: Logging srcmgr/adhoc
cvs rlog: Logging srcmgr/cm
cvs rlog: Logging srcmgr/cm/bin
cvs rlog: Logging srcmgr/logs
cvs rlog: Logging srcmgr/test
RCS file: /cvs/srcmgr/test/someotheFile,v
head: 1.3
branch:
locks: strict
access list:
symbolic names:
TAGINFO: 1.1
SOURCE_CONTROL: 1.1
QA: 1.1
PRODSTAGE: 1.1
PRODBUILD: 1.1
PRODFIX: 1.1
SITPR1: 1.1
UATPR1: 1.1
TESTGAP: 1.1
TESTMIG: 1.1
TRNG: 1.1
HUGO: 1.1
DEVGAP: 1.1
DEVMIG2: 1.1
DEVMIG: 1.1
DEV: 1.3
keyword substitution: kv
total revisions: 3; selected revisions: 1
description:
----------------------------
revision 1.2
date: 2012/11/15 04:39:21; author: amittal; state: Exp; lines: +1 -0
-
-
- empty log message ***
=============================================================================
cvs rlog: Logging srcmgr/test/createSomeLongPathDirAveryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVerylongpathDirectory
cvs rlog: Logging srcmgr/test/someDir
- empty log message ***
-
Change log is empty
/export/home/amittal/.jenkins/jobs/Akhil/builds/17 >cat changelog.xml
<?xml version="1.0" encoding="UTF-8"?>
<changelog>
</changelog>
TIA
Akhil
I have found the cause of this behaviour - change log disappears if in SCM config of job "Show all CVS output" is checked to yes. As soon as I uncheck "Show all CVS output" I cant see any changes in the change log.
I reckon what’s happening CVS update stdout is redirected to log if the box is checked otherwise CVS update stdout is getting parsed and chages are stripped off from cvs update log and put in the changelog. This is not the right behaviour as one expects verbose CVS update command with stdout & stderr as is in the log without being doctored to reflect the true picture as well as the changes in the change log if you are checking show all cvs output box.
I am building a build pipeline for CI & deployment from dev -> test -> uat -> staging -> prod for a legacy app COBOL where each component is compiled to its own binary (i.e. for every foo.cbl there is foo.so) unlike Java where entire workspace is compiled & package to a monolithic binary (.ear or .war etc). It's a component driven migration where there is need to compile only the programs updated by cvs and packaging only the updated components their corresponding binaries. For this I need to pass list of CVS updated components which I can get from CVS update log and pass it to the build script. I was hoping to see them as args passed to Shell in '$*' in post build but nothing there, as I think Jenkins concept is compile the entire workspace not a component driven migration.
Also noticed that the warnings of warnings of cvs command are not displayed in the log regardless of box checked or not. Warnings of CVS update are important for situations where lot of components of repository becomes obsolete and you remove tag e.g PROD from them in cvs, next update will remove the obsoleted sources from the filesystem but you still need to know what sources are removed from the filesystem to delete components dependencies and binaries from the filesystem as they are not checked in CVS generally.
eg. cvs update: warning: srcmgr/logs/blah.log is not (any longer) pertinent
Long story short we should be able to see cvs update stdout/stderr as is returned by Shell in the log in verbose mode and needless to say changes in the change log.
Unticking the 'Show all CVS Output' box sets the '-Q' flag on the CVS command; e.g. "cvs -Q up ..." but doesn't hide anything that is returned by CVS (i.e the filtering is done by the CVS server based on the presence of this flag, not be Jenkins). The messages you see during CVS actions are also generated by the CVS Server so you should see the same output in Jenkins as you do in a command line client if all the options are the same.
I'll do a bit more investigation as to why -Q on rlog is preventing changelog generation (and presumably polling).
Is running 'rlog' after 'cvs up -r TAG' ok? Don't think so
If you are selecting 'Location' as Tag e.g.
Location : Tag
Tag Name : DEV
cvs commands run by Jenkins will be something like
cvs update -d -r DEV blah_module
cvs rlog -S -d'19 Nov 2012 11:43:30 +1100<19 Nov 2012 11:47:37 +1100' blah_module
What if the tag DEV on component/module has not moved but several versions are committed to cvs?
In this case what's happening is your workspace is not changed & still has got the old components with 'DEV' tag revisions however change log will show the committed changes 'cos of rlog.
I'll try to explain
1. Notice foo.bar 'DEV' tag is not at head
cvs log srcmgr/test/someDir/foo.bar | egrep 'head:|DEV:'
head: 1.15
DEV: 1.5
2. I committed a change
cvs commit -m 'test' srcmgr/test/someDir/foo.bar
Checking in srcmgr/test/someDir/foo.bar;
/cvs/srcmgr/test/someDir/foo.bar,v <-- foo.bar
new revision: 1.16; previous revision: 1.15
3. Notice that even though I have committed a change but my tag 'DEV' is not moved at all
cvs log srcmgr/test/someDir/foo.bar | egrep 'head:|DEV:'
head: 1.16
DEV: 1.5
4. Now my Jenkins settings is 'Location: tag', 'tag: DEV' & 'Update: ticked'
Run Jenkins
Building in workspace /export/home/amittal/temp
cvs update -d -P -r DEV srcmgr
cvs update: Updating srcmgr
cvs update: Updating srcmgr/adhoc
cvs update: Updating srcmgr/cm
cvs update: Updating srcmgr/cm/bin
cvs update: Updating srcmgr/logs
cvs update: Updating srcmgr/test
cvs update: Updating srcmgr/test/createSomeLongPathDirAveryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVerylongpathDirectory
cvs update: Updating srcmgr/test/someDir
cvs rlog -S -d19 Nov 2012 15:42:34 +1100<19 Nov 2012 15:51:08 +1100 srcmgr
cvs rlog: Logging srcmgr
cvs rlog: Logging srcmgr/adhoc
cvs rlog: Logging srcmgr/cm
cvs rlog: Logging srcmgr/cm/bin
cvs rlog: Logging srcmgr/logs
cvs rlog: Logging srcmgr/test
cvs rlog: Logging srcmgr/test/createSomeLongPathDirAveryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVerylongpathDirectory
cvs rlog: Logging srcmgr/test/someDir
[temp] $ /bin/sh -xe /var/tmp/hudson5023473001197182858.sh
+ pwd
/export/home/amittal/temp
Notifying upstream projects of job completion
Finished: SUCCESS
5. Jenkins displayed the committed change in the change log
Changes
Summary
test
amittal:
test
1.16 srcmgr/test/someDir/foo.bar
cat changelog.xml
<?xml version="1.0" encoding="UTF-8"?>
<changelog>
<entry>
<changeDate>2012-11-19 04:49:26</changeDate>
<author><![CDATA[amittal]]></author>
<file>
<name><![CDATA[srcmgr/test/someDir/foo.bar]]></name>
<fullName><![CDATA[/cvs/srcmgr/test/someDir/foo.bar]]></fullName>
<revision>1.16</revision>
</file>
<msg><![CDATA[test]]></msg>
</entry>
</changelog>
6. Now this is the problem what's happening here is since we are running 'cvs up -r DEV' and the tag DEV is not moved my workspace is still at old revision, no update (in this case 1.5)
cvs log srcmgr/test/someDir/foo.bar | egrep 'head:|DEV:'
head: 1.16
DEV: 1.5
However since we are running 'rlog' and a commit happened it shows that in change log whereas in my workspace there is no change to build. Therefore I think if we are running 'cvs up/co' with '-r TAG' option, running 'rlog' after that to determine change log for workspace is superfluous/not correct. As change log in this case should be determined by the TAG move not by commits.
Sorry, but that last comment isn't relevant to this issue. If you're having a problem with additional items appearing in your changelist then open another issue for it so I can make sure your case gets reviewed properly.
Yep I have raised JENKINS-15872 for that now, any update on this one.
Just letting you know that even with 'Show all CVS Output' ticked on CVS plugin 2.7 no change log is displayed, however with 2.4 it displays the change log if 'Show all CVS Output' is ticked.
I haven't checked 2.5 & 2.6
Reducing priority given there is a workaround (tick the 'Show all CVS Output' box) and that this does not seem to be impacting a lot of users
There's a workaround, but it doesn't appear to work in the latest version. Adding my vote for this.
Using version 2.7 we see the same issue, no matter if Show all CVS Output is checked or not. We also often see an exception (JENKINS-16044)
Still appears to be happening in 2.8. "Show all CVS Output" has no effect.
Jon: can you confirm what you're not seeing a changelist for; is your module on HEAD, BRANCH or TAG?
Michael: My module is on a TAG. The project polls hourly for changes on a tag named RTB_13_4. I can probably provide a config or log if needed. I also looked at the code a little, but wasn't sure where to start.
Searching for changes on a tag in a multi-module setup is not as easy at it sounds. Consider the following:
1. A user checks in changes on a branch/head (we may or may not be monitoring this location, it doesn't really matter). At the same time they check in changes on a branch/head we are monitoring.
2. Polling picks up these changes and a build is scheduled
3. The build completes so the last checked timestamp is rolled forward to the build's start time.
4. The user changes the existing tag to point to a new version of the file. Since tagging doesn't create any commit messages and the commit messages for the changed files have already been seen in the last build, no message appears in rlog for the files changed in the tag. Polling therefore doesn't see a change so doesn't schedule a build.
It would be possible to pick-up changes on a tag if the changes and re-tag happen in the same polling cycle, but there's no way to guarantee this especially if polling is scheduled to happen frequently. I can apply such a change before the next release, although this could result in users who change tag contents seeing inconsistent polling behaviour depending on how their commits compare to the polling cycle.
To try and pick-up all situations where a tag would change, polling would have to be done using the full repository history - not just changes between the last build and current poll. This isn't particularly practical as frequently changed repositories are going to have a large change-log so require a lot of time, memory and processing cycles to retrieve and parse.
Code changed in jenkins
User: Michael Clarke
Path:
src/main/java/hudson/scm/CvsLog.java
src/test/java/hudson/scm/CvsChangeLogHelperTest.java
src/test/java/hudson/scm/CvsLogTest.java
http://jenkins-ci.org/commit/cvs-plugin/1900841791d1fbafc1839f0adea99452718f65a8
Log:
JENKINS-14711 Pick up changes on a tag since last polling cycle
–
You received this message because you are subscribed to the Google Groups "Jenkins Commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Snapshot build of changes at https://buildhive.cloudbees.com/job/jenkinsci/job/cvs-plugin/80/org.jenkins-ci.plugins$cvs/artifact/org.jenkins-ci.plugins/cvs/2.9-SNAPSHOT/cvs-2.9-SNAPSHOT.hpi
These changes are not currently on head so will not be on the next release until I've had more of a think about this and someone has convinced me that we should poll for tag changes
Given my previous comment about the risks in trying to pick changes in a tag, I have decided that this issue will not be fixed. Moving a tag is regarded as bad practice and trying to introduce a method of finding these changes would significantly increase CPU and Memory usage of the CVS plugin which such a fix doesn't warrant.
It looks to be a regression from 2.4. I have just downgraded from 2.5 to 2.4 and it is working again.