Bug 1022271 - [deploy] Check for hot_deploy/force_clean_build is potentially using the previous activation's value
Summary: [deploy] Check for hot_deploy/force_clean_build is potentially using the prev...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Andy Goldstein
QA Contact: libra bugs
URL:
Whiteboard:
: 1023902 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-22 21:34 UTC by Andy Goldstein
Modified: 2015-05-14 23:31 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-30 00:49:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Andy Goldstein 2013-10-22 21:34:43 UTC
The bash/ruby SDK code that checks if hot_deploy and force_clean_build are enabled uses the latest deployment's metadata.json to determine these values. During a build, when pre-repo-archive is invoked, we haven't created a new deployment directory yet, nor have we written the metadata for the new build. As a result, the methods in the bash/ruby SDK are looking at the previous deployment's values.

We might want to consider creating the new deployment directory before we call pre-repo-archive, write the metadata, and then call pre-repo-archive. If we do this, we should also probably keep the code in build() that is writing the metadata, as jenkins uses this as its initial entry point for building and doesn't use the same post_receive/pre-repo-archive flow.

Comment 1 Andy Goldstein 2013-10-28 13:20:26 UTC
*** Bug 1023902 has been marked as a duplicate of this bug. ***

Comment 3 Dan McPherson 2013-10-28 17:45:17 UTC
The above github-bot comment was supposed to be for 1022271.  Sorry for any confusion.

Comment 4 Dan McPherson 2013-10-28 17:46:12 UTC
Wow can't get that right.  I meant it was for 1022272.

Comment 5 Andy Goldstein 2013-10-28 19:07:07 UTC
https://github.com/openshift/origin-server/pull/4014

Comment 6 openshift-github-bot 2013-10-28 23:59:39 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/85d23839c182246d32abcbf428ed97d112189e40
Bug 1022271

Write hot_deploy, force_clean_build, git_ref, git_sha1 to deployment
metadata file as part of prereceive and use metadata file's values
afterwards in postreceive, build, prepare, distribute, activate.

Comment 7 Qiushui Zhang 2013-10-29 06:31:16 UTC
Tested on devenv_3959.
The code is checked in. 
The option "hot-deploy" and "force-clean-build" works.
The dup bug 1023902 does not occur.

Mark the bug as verified.


Note You need to log in before you can comment on or make changes to this bug.