Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

fix deployment #576

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ install_dependency: &install_dependency
command: |
sed -i '/jessie-updates/d' /etc/apt/sources.list
apt update
apt install -y openssl ant git zip jq
apt install -y --force-yes openssl ant git zip jq
mkdir ~/awscli
cd ~/awscli
curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
#curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
curl https://s3.amazonaws.com/aws-cli/awscli-bundle-1.16.188.zip -o awscli-bundle.zip
unzip awscli-bundle.zip
./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
cd /usr/share/ant/lib
Expand All @@ -24,7 +25,7 @@ install_dependency: &install_dependency
install_deploysuite: &install_deploysuite
name: Installation of install_deploysuite.
command: |
git clone --branch v1.3 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
git clone --branch v1.4.14 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
cp ./../buildscript/master_deploy.sh .
cp ./../buildscript/buildenv.sh .
cp ./../buildscript/awsconfiguration.sh .
Expand Down
9 changes: 0 additions & 9 deletions conf/phase_templates/TCSTemplate_Studio.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,14 @@
<PhaseType id="screening" typeId="3" typeName="Screening"/>
<PhaseType id="review" typeId="4" typeName="Review"/>
<PhaseType id="approval" typeId="11" typeName="Approval"/>
<PhaseType id="specification_submission" typeId="13" typeName="Specification Submission"/>
<PhaseType id="specification_review" typeId="14" typeName="Specification Review"/>
<PhaseType id="checkpoint_submission" typeId="15" typeName="Checkpoint Submission"/>
<PhaseType id="checkpoint_screening" typeId="16" typeName="Checkpoint Screening"/>
<PhaseType id="checkpoint_review" typeId="17" typeName="Checkpoint Review"/>
</PhaseTypes>
<!-- A set of project phases defined in this template. -->
<Phases>
<!-- A definition of a single phase. -->
<Phase id="specificationSubmissionPhase" length="172800000" type="specification_submission" phaseId="13"/>

<Phase id="specificationReviewPhase" length="21600000" type="specification_review" phaseId="14">
<Dependency id="specificationSubmissionPhase" isDependencyStart="false" isDependentStart="true" lagTime="0"/>
</Phase>

<Phase id="registrationPhase" length="518400000" type="registration" phaseId="1">
<Dependency id="specificationReviewPhase" isDependencyStart="false" isDependentStart="true" lagTime="0"/>
</Phase>

<Phase id="checkpointSubmissionPhase" length="259200000" type="checkpoint_submission" phaseId="15">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.SocketException;
import java.nio.charset.Charset;
import java.nio.charset.IllegalCharsetNameException;
import java.util.zip.GZIPOutputStream;
Expand All @@ -24,6 +25,7 @@
import com.topcoder.direct.services.view.action.contest.launch.AggregateDataModel;
import com.topcoder.direct.services.view.ajax.processors.DefaultAJAXResultPreProcessor;
import com.topcoder.direct.services.view.ajax.serializers.JSONDataSerializer;
import org.apache.log4j.Logger;

/**
* <p>
Expand Down Expand Up @@ -81,14 +83,21 @@
* </p>
*
* <p>
* Version 1.2
* <ul>
* <li>Fixed crash - java.net.SocketException: Broken pipe</li>
* </ul>
* </p>
*
* <p>
* Thread safety: Technically this class is NOT thread safe since it has mutable states, but the intended
* usage of the mutators is for IoC injection and thus we expect for these values not to be changed after
* initialization. Thus this class can be considered as thread-safe conditional in an IoC injection usage of
* the mutators.
* </p>
*
* @author AleaActaEst, TCSDEVELOPER, duxiaoyang
* @version 1.1
* @version 1.2
*/
@SuppressWarnings("serial")
public class CustomFormatAJAXResult implements Result {
Expand Down Expand Up @@ -177,6 +186,8 @@ public class CustomFormatAJAXResult implements Result {
*/
private boolean enabledGzip = false;

private Logger logger = Logger.getLogger(CustomFormatAJAXResult.class);

/**
* <p>
* Default constructor.
Expand Down Expand Up @@ -290,7 +301,7 @@ public void execute(ActionInvocation invocation) throws AJAXDataPreProcessingExc
* @throws IOException
* if any io error happens
*/
private static void writeDataAndClose(InputStream in, OutputStream out) throws IOException {
private void writeDataAndClose(InputStream in, OutputStream out) throws IOException {
try {
// Write input stream to output stream
byte[] buf = new byte[BUFFER_SIZE];
Expand All @@ -300,11 +311,14 @@ private static void writeDataAndClose(InputStream in, OutputStream out) throws I
}
// flush output stream
out.flush();
} catch (IOException e) {
// The client side has aborted or closed connection
logger.error("The client side has aborted or closed connection", e);
} finally {
// close the input stream
closeStream(in);
// close the output stream
out.close();
closeStream(out);
}
}

Expand Down
12 changes: 6 additions & 6 deletions src/web/scripts/launch/entity.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,16 +214,16 @@ var ESTIMATE_EFFORT_ONSITE = "Estimate Efforts Days Onsite";

var projectCategoryArray = [
{id:32, name:'Application Front-End Design', label:'Application Front-End Design', typeId:3, typeName:'Studio', hasMulti:true, hideInDropdown: false},
{id:STUDIO_CATEGORY_ID_DESIGN_F2F, name:'Design First2Finish', label:'Design First2Finish', typeId:3, typeName:'Studio', hasMulti:false, hideInDropdown: false},
{id:22, name:'Idea Generation', label:'Idea Generation', typeId:3, typeName:'Studio', hasMulti:true, hideInDropdown: false},
{id:STUDIO_CATEGORY_ID_DESIGN_F2F, name:'Design First2Finish', label:'Design First2Finish', typeId:3, typeName:'Studio', hasMulti:false, hideInDropdown: true},
{id:22, name:'Idea Generation', label:'Idea Generation', typeId:3, typeName:'Studio', hasMulti:true, hideInDropdown: true},
{id:21, name:'Print/Presentation', label:'Print/Presentation', typeId:3, typeName:'Studio', hasMulti:true, hideInDropdown: false},
{id:17, name:'Web Design', label:'Web Design', typeId:3, typeName:'Studio', hasMulti:true, hideInDropdown: false},
{id:30, name:'Widget or Mobile Screen Design', label:'Widget or Mobile Screen Design', typeId:3, typeName:'Studio', hasMulti:true, hideInDropdown: false},
{id:18, name:'Wireframes', label:'Wireframes', typeId:3, typeName:'Studio', hasMulti:true, hideInDropdown: false},
{id:SOFTWARE_CATEGORY_ID_BUG_HUNT, name:'Bug Hunt', label:'Bug Hunt', typeId:2, typeName:'Application', hasMulti:false, hideInDropdown: false},
{id:SOFTWARE_CATEGORY_ID_CODE, name:'Code', label:'Code', typeId:2, typeName:'Application', hasMulti:false, hideInDropdown: false},
{id:SOFTWARE_CATEGORY_ID_F2F, name:'First2Finish', label:'First2Finish', typeId:2, typeName:'Application', hasMulti:false, hideInDropdown: false},
{id:13, name:'TESTSUITES', label:'Test Suites', typeId:2, typeName:'Application', hasMulti:true, hideInDropdown: false},
{id:SOFTWARE_CATEGORY_ID_BUG_HUNT, name:'Bug Hunt', label:'Bug Hunt', typeId:2, typeName:'Application', hasMulti:false, hideInDropdown: true},
{id:SOFTWARE_CATEGORY_ID_CODE, name:'Code', label:'Code', typeId:2, typeName:'Application', hasMulti:false, hideInDropdown: true},
{id:SOFTWARE_CATEGORY_ID_F2F, name:'First2Finish', label:'First2Finish', typeId:2, typeName:'Application', hasMulti:false, hideInDropdown: true},
{id:13, name:'TESTSUITES', label:'Test Suites', typeId:2, typeName:'Application', hasMulti:true, hideInDropdown: true},
{id:SOFTWARE_CATEGORY_ID_CONCEPT, name:'CONCEPTUALIZATION', label:'Software Conceptualization', typeId:2, typeName:'Application', hasMulti:true, hideInDropdown: true},
{id:SOFTWARE_CATEGORY_ID_SPEC, name:'SPECIFICATION', label:'Software Specification', typeId:2, typeName:'Application', hasMulti:true, hideInDropdown: true},
{id:7, name:'ARCHITECTURE', label:'Architecture', typeId:2, typeName:'Application', hasMulti:true, hideInDropdown: true},
Expand Down
3 changes: 2 additions & 1 deletion src/web/scripts/launchcontest.js
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,8 @@ $(document).ready(function() {
// populate the select option for software group
$.each(projectCategoryArray, function(i, projectCategory) {
if (projectCategory.hideInDropdown) {
return;
//Commented out on Aug 11, 2021 to help hide challenge types from the create dropdown in entity.js
//return;
}
// not show copilot contest type
if (projectCategory.id != 29 && projectCategory.id != ALGORITHM_CATEGORY_ID_MARATHON && projectCategory.typeId != 3) {
Expand Down