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

Commit bc338a6

Browse files
authored
config env vars must be set only on startup (#36)
* config env vars must be set only on startup, not on the fly
1 parent f72b895 commit bc338a6

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs: # a collection of steps
2222
- ~/.m2
2323
key: estuary-agent-{{ checksum "pom.xml" }}
2424
- run:
25-
command: wget https://estuary-agent-go.s3.eu-central-1.amazonaws.com/4.1.0/runcmd-linux
25+
command: wget https://github.com/estuaryoss/runcmd/releases/download/1.0.0/runcmd-linux
2626
name: "download runcmd-linux"
2727
- run:
2828
command: mv runcmd-linux runcmd
@@ -52,5 +52,5 @@ jobs: # a collection of steps
5252

5353
- store_artifacts: # store the jar as an artifact
5454
# Upload test summary for display in Artifacts: https://circleci.com/docs/2.0/artifacts/
55-
path: target/agent-4.2.0-SNAPSHOT-exec.jar
55+
path: target/agent-4.2.2-SNAPSHOT-exec.jar
5656
# See https://circleci.com/docs/2.0/deployment-integrations/ for deploy examples

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ENV COMMAND_TIMEOUT 1200
99
RUN mkdir $APP_DIR
1010
WORKDIR $APP_DIR
1111

12-
COPY target/agent-4.2.1-SNAPSHOT-exec.jar $APP_DIR/agent-exec.jar
12+
COPY target/agent-4.2.2-SNAPSHOT-exec.jar $APP_DIR/agent-exec.jar
1313
ADD https://estuary-agent-go.s3.eu-central-1.amazonaws.com/4.1.0/runcmd-linux $APP_DIR/runcmd
1414
COPY https $APP_DIR/https
1515

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.github.estuaryoss</groupId>
55
<artifactId>agent</artifactId>
6-
<version>4.2.1-SNAPSHOT</version>
6+
<version>4.2.2-SNAPSHOT</version>
77
<packaging>jar</packaging>
88

99
<name>Estuary Agent</name>

src/main/java/com/github/estuaryoss/agent/api/ApiOriginFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public void doFilter(ServletRequest request, ServletResponse response,
4848
log.debug(HeaderConstants.X_REQUEST_ID + " : " + xRequestId);
4949

5050
if (!(String.valueOf(tokenHeader)
51-
.equals(String.valueOf(environment.getEnvAndVirtualEnv().get(HTTP_AUTH_TOKEN))))) {
51+
.equals(String.valueOf(environment.getEnv().get(HTTP_AUTH_TOKEN))))) {
5252
httpResponse.sendError(HttpStatus.UNAUTHORIZED.value());
5353
return;
5454
}

src/main/java/com/github/estuaryoss/agent/configuration/SwaggerConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public class SwaggerConfig {
1919
ApiInfo apiInfo() {
2020
return new ApiInfoBuilder()
2121
.title("estuary-agent")
22-
.description("Estuary agent will run your shell commands via REST API")
22+
.description("Estuary Agent will run your shell commands via REST API")
2323
.license("Apache 2.0")
2424
.licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html")
2525
.termsOfServiceUrl("")

src/main/java/com/github/estuaryoss/agent/service/FluentdService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ private String emit(String loggingLevel, EnrichedMessage message) {
9999
enrichedMsgCopy.setMsg(parentMessage);
100100
}
101101

102-
if (virtualEnvironment.getEnvAndVirtualEnv().get(EnvConstants.FLUENTD_IP_PORT) == null) {
102+
if (virtualEnvironment.getEnv().get(EnvConstants.FLUENTD_IP_PORT) == null) {
103103
return String.format("Fluentd logging not enabled",
104104
EnvConstants.FLUENTD_IP_PORT);
105105
}

0 commit comments

Comments
 (0)