Kohsuke Kawaguchi edited a comment on Task JENKINS-24380

Copying the IRC conversation:

(11:39:48 AM) jglick: kohsuke: I know you are alive https://github.com/jenkinsci/jenkins/pull/1379 do not try to hide from me :-)
(11:40:17 AM) kohsuke: Yes, I'm alive
(11:41:34 AM) kohsuke: This is a scary change
(11:43:29 AM) kohsuke: jglick: you sure about automatically running the migration script? I assume it means it won't be downgradable
(11:44:16 AM) jglick: kohsuke: correct it is not downgradable (well, without losing build records I mean). But that is necessary to get the benefits of code simplification.
(11:46:12 AM) jglick: And yes it is a scary change, but then again the current situation is to me scarier.
(11:46:35 AM) kohsuke: does it try to create symlink from build ID to the number dir?
(11:47:01 AM) jglick: kohsuke: no. Why?
(11:47:02 AM) kohsuke: Looks like not. The ID as timestamp is completely gone
(11:47:21 AM) jglick: The timestamp becomes a regular field in build.xml.
(11:47:54 AM) kohsuke: I thought perhaps the way to go is to start switching around timestamp=dir & number=symlink
(11:48:17 AM) kohsuke: presumably that would still allow you for lazy loading to try to find a match deterministically in one go
(11:48:18 AM) jglick: What is the advantage to having symlinks for the timestamp?
(11:48:29 AM) kohsuke: for compatibility
(11:48:34 AM) jglick: The five mentioned plugins need to be updated anyway.
(11:48:42 AM) jglick: So there is no compatibility concern for them.
(11:49:26 AM) jglick: (Once they are fixed to expect the new layout, I mean.)
(11:51:21 AM) kohsuke: I'm trying to think of ways to avoid doing large irreversible edits to $JENKINS_HOME
(11:51:50 AM) kohsuke: Leaving the timestamp as symlink and not renaming existing directories would let you do that
(11:52:51 AM) jglick: How does that help anything? Any tools relying on a specific build format will need to be updated anyway.
(11:53:24 AM) jglick: And note that the original impetus for this PR (https://github.com/jenkinsci/jenkins/issues/1376) pointed out several problems with the timestamp format on its own.
(11:54:45 AM) jglick: The worst that happens after downgrading is that historical build records are invisible, which is not exactly fatal.
(12:34:50 PM) danielbeck: jglick: It's pretty bad for workflows that rely on access to older builds (Copy Artifact, Promoted Builds, etc.)
(01:01:20 PM) kohsuke: jglick: symlinks behave like directories, so anyone looking for directories by timestamp will find them, including earlier versions of Jenkins
(01:03:50 PM) jglick: kohsuke: is your only point to lessen the impact of migration after downgrading?
(01:04:14 PM) kohsuke: Yes, that's my main concern with this PR
(01:04:15 PM) jglick: Do not want to create symlinks for *new* builds certainly.
(01:04:36 PM) kohsuke: Why not?
(01:04:41 PM) jglick: Adds noise forever/.
(01:04:44 PM) jglick: forever.
(01:04:58 PM) jglick: And given the problems we have had with symlinks, would be better to use them less.
(01:05:15 PM) kohsuke: It doesn't have to be forever but for a while I'd think it'd be a good thing to do
(01:05:58 PM) kohsuke: But anyway, that's a lesser point compared to not shuffling stuff in $JENKINS_HOME
(01:09:04 PM) jglick: So what is your suggestion? During migration, swap symlink vs. dir status for existing builds, adjusting build.xml as I already do; then for a while (say one LTS cycle) continue to create timestamp symlinks for new builds, provided of course that they do not clash with those of earlier builds (which is possible now that there is no enforced 1s delay), but do not read them? I kind of doubt this really works anyway, since older versions
(01:09:04 PM) jglick: of Jenkins will try to delete the number when a build is deleted, assuming it is a symlink, and fail because it is not a symlink.
(01:13:41 PM) jglick: kohsuke ^
jgeboski jglick jgornick 
(01:14:41 PM) kohsuke: jglick: Yeah, something like that.
(01:15:51 PM) jglick: Since I do not think earlier versions would actually be able to handle the new format even w/ the addition of a symlink, would rather just provide a script to reverse the migration if you really need to downgrade.
(01:15:57 PM) kohsuke: I don't think failing to delete build records is as big of a problem, if it fails --- its impact is limited too
(01:16:19 PM) kohsuke: I can do that experiment quickly
(01:17:06 PM) kohsuke: And one correction: I wasn't suggesting you swap symlink vs dir but I guess that's needed to keep the newer versions simpler?
(01:22:50 PM) jglick: kohsuke: yes I think you to swap symlink vs. dir for existing records
(01:23:25 PM) jglick: Either way, keeping a mixture of old and new layouts seems error-prone. Have not studied what impact this would have.
(01:23:57 PM) jglick: Still personally prefer a simple migration, with an advertised script to revert if desired (which would work for new builds too).
(01:25:14 PM) kohsuke: OK, perhaps you are right about mixing layout
jgeboski jglick jgornick 
(01:25:44 PM) kohsuke: jglick: let me see if the older version can read timestamp as symlink and build number as dir
(01:25:51 PM) kohsuke: I think it's a worthy experiment
(01:26:01 PM) jglick: Worth experimenting.
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to