Skip to content

Commit 6b1026c

Browse files
authored
Merge branch 'master' into ib/misc-security
2 parents 0c4a116 + 8415c70 commit 6b1026c

File tree

320 files changed

+1835
-18453
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

320 files changed

+1835
-18453
lines changed

CHANGELOG.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,62 @@
11
# Change Log
22

3+
## [2.25.1] - 2025-04-26
4+
5+
### Changed
6+
7+
- runtime-v2: set lowercase loop mode value in schema
8+
([#1122](https://github.com/walmartlabs/concord/pull/1122));
9+
- http-tasks: refactor tests, support for parallel tests
10+
([#1123](https://github.com/walmartlabs/concord/pull/1123));
11+
- project: update bouncycastle dependency versions
12+
([#1127](https://github.com/walmartlabs/concord/pull/1127));
13+
- concord-server: handle invalid regex in dispatcher
14+
requirements
15+
([#1128](https://github.com/walmartlabs/concord/pull/1128));
16+
- project: downgrade nimbus-jose-jwt
17+
([#1129](https://github.com/walmartlabs/concord/pull/1129)).
18+
19+
20+
21+
## [2.25.0] - 2025-03-23
22+
23+
### Changed
24+
25+
- concord-agent: replace simple immutables with records
26+
([#1091](https://github.com/walmartlabs/concord/pull/1091));
27+
- concord-server, concord-server-db: generate UUIDs on
28+
the server, use UUID v7
29+
([#1106](https://github.com/walmartlabs/concord/pull/1106));
30+
- concord-server: upgrade Shiro to 2.x
31+
([#1107](https://github.com/walmartlabs/concord/pull/1107));
32+
- concord-server, concord-client2: uncomment valid code
33+
([#1108](https://github.com/walmartlabs/concord/pull/1108));
34+
- concord-server: remove more @Named usage
35+
([#1110](https://github.com/walmartlabs/concord/pull/1110));
36+
- concord-server: remove deprecated SecretEntry
37+
([#1111](https://github.com/walmartlabs/concord/pull/1111));
38+
- concord-server: remove deprecated /logs/* endpoint
39+
([#1113](https://github.com/walmartlabs/concord/pull/1113));
40+
- project: update dependencies
41+
([#1114](https://github.com/walmartlabs/concord/pull/1114));
42+
- project: update README
43+
([#1115](https://github.com/walmartlabs/concord/pull/1115));
44+
- docker-images: update JDK versions
45+
([#1116](https://github.com/walmartlabs/concord/pull/1116));
46+
- project: update dependencies
47+
([#1118](https://github.com/walmartlabs/concord/pull/1118));
48+
- project: remove unused dependencies
49+
([#1119](https://github.com/walmartlabs/concord/pull/1119)).
50+
51+
### Breaking
52+
53+
- project: remove client1
54+
([#1013](https://github.com/walmartlabs/concord/pull/1013));
55+
- concord-server: remove deprecated features
56+
([#1112](https://github.com/walmartlabs/concord/pull/1112)).
57+
58+
59+
360
## [2.24.0] - 2025-03-15
461

562
### Added
@@ -63,6 +120,7 @@ array
63120
([#1090](https://github.com/walmartlabs/concord/pull/1090)).
64121

65122

123+
66124
## [2.22.0] - 2025-02-14
67125

68126
### Added

NOTES.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,17 @@ Some classes require explicit binding using `Multibinder.newSetBinder`:
1212
- BackgroundTask
1313
- Component
1414
- ContextHandlerConfigurator
15+
- CustomBeanMethodResolver
1516
- CustomEnqueueProcessor
17+
- CustomTaskMethodResolver
1618
- ExceptionMapper
19+
- ExecutionListener
1720
- Filter
1821
- FilterChainConfigurator
1922
- FilterHolder
2023
- GaugeProvider
2124
- HttpServlet
25+
- LogAppender
2226
- ModeProcessor
2327
- PolicyApplier
2428
- ProcessEventListener
@@ -32,4 +36,6 @@ Some classes require explicit binding using `Multibinder.newSetBinder`:
3236
- SecretStore
3337
- ServletContextListener
3438
- ServletHolder
35-
- UserInfoProvider
39+
- TaskCallListener
40+
- TaskProvider
41+
- UserInfoProvider

README.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ npm run start
6767

6868
Prerequisites:
6969

70-
- Git 2.3+
70+
- Git 2.18+
7171
- Docker, listening on `tcp://127.0.0.1:2375`;
7272
- Ansible 2.6.0+ must be installed and available in `$PATH`.
7373
See [the official documentation](http://docs.ansible.com/ansible/intro_installation.html);
@@ -107,17 +107,31 @@ See the [examples](examples) directory.
107107
```
108108
$ ./mvnw release:prepare release:perform
109109
```
110-
- push the new tag:
110+
- update and commit the CHANGELOG.md file
111+
```
112+
$ git add CHANGELOG.md
113+
$ git commit -m 'update changelog'
114+
```
115+
- push the new tag and the master branch:
111116
```
112117
$ git push origin RELEASE_TAG
118+
$ git push origin master
113119
```
114-
- sync to [Central](https://central.sonatype.com/);
115120
- build and push the Docker images:
116121
```
117122
$ git checkout RELEASE_TAG
118123
$ ./mvnw -f docker-images clean package -Pdocker
119124
$ ./docker-images/push.sh RELEASE_TAG
120125
```
126+
- sync to [Sonatype](https://oss.sonatype.org/);
127+
- check the Central repository if the sync is complete:
128+
```
129+
https://repo.maven.apache.org/maven2/com/walmartlabs/concord/parent/RELEASE_TAG
130+
```
131+
- once the sync is complete, push the `latest` Docker images:
132+
```
133+
$ ./docker-images/push.sh latest
134+
```
121135

122136
## Development Notes
123137

agent-operator/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ present in your minikube instance):
4949
5. Create the custom resource:
5050
```
5151
$ minikube kubectl -- create -f deploy/crds/crd.yml -n default
52-
$ minikube kubectl -- create -f deploy/crds/cr.yml -n default
52+
$ minikube kubectl -- create -f deploy/crds/example.agentpool.yml -n default
5353
```
5454
6. Start the operator:
5555
```
@@ -103,7 +103,7 @@ minikube kubectl -- logs -f <pod_name> -c <container_name> -n default
103103
$ minikube kubectl -- create -f deploy/operator.yml
104104
```
105105
4. Check the operator's pod logs;
106-
5. Deploy one or more CRs using `deploy/crds/cr.yml` as a template.
106+
5. Deploy one or more CRs using `deploy/crds/example.agentpool.yml` as a template.
107107

108108
## How To Release New Versions
109109

agent-operator/deploy/crds/cr.yml renamed to agent-operator/deploy/crds/example.agentpool.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
apiVersion: concord.walmartlabs.com/v1alpha1
1313
kind: AgentPool
1414
metadata:
15-
name: example-agentpool
15+
name: example
1616
spec:
1717
queueSelector:
1818
agent:
@@ -116,10 +116,10 @@ spec:
116116
name: process-tmp
117117
resources:
118118
requests:
119-
cpu: "1"
119+
cpu: 1
120120
memory: "1G"
121121
limits:
122-
cpu: "2"
122+
cpu: 2
123123
memory: "2G"
124124
env:
125125
- name: CONCORD_TMP_DIR
@@ -150,7 +150,7 @@ spec:
150150
preStop:
151151
exec:
152152
command:
153-
- "sh"
153+
- "/bin/bash"
154154
- "/opt/concord/hooks/preStopHook.sh"
155155
volumes:
156156
- name: cfg

agent-operator/pom.xml

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>com.walmartlabs.concord</groupId>
88
<artifactId>parent</artifactId>
9-
<version>2.24.1-SNAPSHOT</version>
9+
<version>2.25.2-SNAPSHOT</version>
1010
<relativePath>../pom.xml</relativePath>
1111
</parent>
1212

@@ -21,14 +21,6 @@
2121
</dependency>
2222

2323
<!-- k8s stuff -->
24-
<dependency>
25-
<groupId>io.fabric8</groupId>
26-
<artifactId>crd-generator-api</artifactId>
27-
</dependency>
28-
<dependency>
29-
<groupId>io.fabric8</groupId>
30-
<artifactId>crd-generator-apt</artifactId>
31-
</dependency>
3224
<dependency>
3325
<groupId>io.fabric8</groupId>
3426
<artifactId>kubernetes-client</artifactId>
@@ -47,13 +39,16 @@
4739
</dependency>
4840
<dependency>
4941
<groupId>org.bouncycastle</groupId>
50-
<artifactId>bcprov-ext-jdk15on</artifactId>
42+
<artifactId>bcprov-jdk18on</artifactId>
5143
</dependency>
5244
<dependency>
5345
<groupId>org.bouncycastle</groupId>
54-
<artifactId>bcpkix-jdk15on</artifactId>
46+
<artifactId>bcpkix-jdk18on</artifactId>
47+
</dependency>
48+
<dependency>
49+
<groupId>org.bouncycastle</groupId>
50+
<artifactId>bcutil-jdk18on</artifactId>
5551
</dependency>
56-
5752
<dependency>
5853
<groupId>com.fasterxml.jackson.core</groupId>
5954
<artifactId>jackson-core</artifactId>
@@ -89,12 +84,6 @@
8984
<artifactId>jaxb-impl</artifactId>
9085
</dependency>
9186

92-
<!-- required at runtime by the fabric8 client, but not included automatically for some reason -->
93-
<dependency>
94-
<groupId>commons-collections</groupId>
95-
<artifactId>commons-collections</artifactId>
96-
</dependency>
97-
9887
<dependency>
9988
<groupId>org.immutables</groupId>
10089
<artifactId>value</artifactId>
@@ -107,11 +96,6 @@
10796
<artifactId>junit-jupiter-api</artifactId>
10897
<scope>test</scope>
10998
</dependency>
110-
<dependency>
111-
<groupId>org.junit.jupiter</groupId>
112-
<artifactId>junit-jupiter-engine</artifactId>
113-
<scope>test</scope>
114-
</dependency>
11599
</dependencies>
116100

117101
<build>

agent-operator/src/main/java/com/walmartlabs/concord/agentoperator/Operator.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
* =====
2121
*/
2222

23-
24-
import com.walmartlabs.concord.agentoperator.agent.AgentClientFactory;
2523
import com.walmartlabs.concord.agentoperator.crd.AgentPool;
2624
import com.walmartlabs.concord.agentoperator.crd.AgentPoolList;
2725
import com.walmartlabs.concord.agentoperator.scheduler.AutoScalerFactory;

agent-operator/src/main/java/com/walmartlabs/concord/agentoperator/scheduler/DefaultAutoScaler.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
import java.io.IOException;
3131
import java.util.List;
3232
import java.util.Map;
33-
import java.util.Objects;
3433
import java.util.function.Function;
3534

3635
public class DefaultAutoScaler implements AutoScaler {
@@ -93,7 +92,8 @@ public AgentPoolInstance apply(AgentPoolInstance i) throws IOException {
9392

9493
AgentPoolConfiguration cfg = i.getResource().getSpec();
9594

96-
if (!canBeScaledUp.apply(i) && !canBeScaledDown.apply(i)) {
95+
boolean canBeScaled = canBeScaledUp.apply(i) || canBeScaledDown.apply(i);
96+
if (!canBeScaled) {
9797
// was updated recently, skipping
9898
return i;
9999
}
@@ -222,7 +222,6 @@ private int tryScaleDown(AgentPoolConfiguration cfg, AgentPoolInstance i, int po
222222
private static int getProcessCount(AgentPoolConfiguration cfg, List<ProcessQueueEntry> processQueueEntries) {
223223
return (int) processQueueEntries.stream()
224224
.map(ProcessQueueEntry::getRequirements)
225-
.filter(Objects::nonNull)
226225
.filter(a -> isEmpty(cfg.getQueueSelector()) || Matcher.matches(a, cfg.getQueueSelector()))
227226
.count();
228227
}
Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,40 @@
1-
workers="1"
2-
num_retries=0
1+
#!/usr/bin/env bash
2+
3+
echo "PreStop hook started at $(date)"
4+
35
MAX_RETRIES=5
6+
RETRY_DELAY=1
7+
8+
current_workers="1"
9+
num_retries=0
410

5-
while [ "$workers" != "0" ] && [ "$num_retries" -lt "$MAX_RETRIES" ]
11+
while [ "$current_workers" != "0" ] && [ "$num_retries" -lt "$MAX_RETRIES" ]
612
do
7-
echo "[$HOSTNAME]: Agent is still executing a process.. enabling maintenance mode and checking the number of workers"
8-
mmode_response=`wget -qO - --post-data="" http://127.0.0.1:8010/maintenance-mode`
13+
echo "[$HOSTNAME]: Agent is still executing a process.. enabling maintenance mode and checking the number of current_workers"
914

10-
mmode_enabled=`echo $mmode_response | sed -n 's/^.*\"maintenanceMode\":\([a-z]*\).*$/\1/p'`
11-
if [ "$mmode_enabled" == "true" ]; then
12-
echo "[$HOSTNAME]: Maintenance mode enabled: $mmode_enabled"
15+
response=$(exec 3<>/dev/tcp/127.0.0.1/8010;
16+
echo -e "POST /maintenance-mode HTTP/1.1\r\nHost: 127.0.0.1:8010\r\nContent-Length: 0\r\nConnection: close\r\n\r\n" >&3;
17+
cat <&3;
18+
exec 3>&-)
1319

14-
workers=`echo $mmode_response | sed -n 's/^.*\"workersAlive\":\([0-9]*\).*$/\1/p'`
15-
echo "[$HOSTNAME]: Number of workers: $workers"
20+
mmode_response=$(echo "$response" | sed -n '/^\r*$/,$p' | tail -n +2)
21+
mmode_enabled=$(echo "$mmode_response" | sed -n 's/^.*\"maintenanceMode\":\([a-z]*\).*$/\1/p')
1622

23+
if [ "$mmode_enabled" == "true" ]; then
24+
echo "[$HOSTNAME]: Maintenance mode enabled: $mmode_enabled"
25+
current_workers=$(echo "$mmode_response" | sed -n 's/^.*\"workersAlive\":\([0-9]*\).*$/\1/p')
26+
echo "[$HOSTNAME]: Number of current_workers: $current_workers"
1727
else
1828
echo "[$HOSTNAME]: trouble enabling maintenance mode"
19-
num_retries=`expr $num_retries + 1`
29+
num_retries=$(("$num_retries" + 1))
2030
fi
2131

22-
sleep 5
32+
sleep ${RETRY_DELAY}
2333
done
2434

2535
if [ "$num_retries" -ge "$MAX_RETRIES" ]; then
2636
echo "[$HOSTNAME]: Number of retries to enable exceeded $MAX_RETRIES times. Exiting ..."
2737
exit 1
2838
fi
2939

30-
echo "[$HOSTNAME]: There are no processes running on this agent. Terminating..."
40+
echo "[$HOSTNAME]: There are no processes running on this agent. Terminating..."

agent/pom.xml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>com.walmartlabs.concord</groupId>
88
<artifactId>parent</artifactId>
9-
<version>2.24.1-SNAPSHOT</version>
9+
<version>2.25.2-SNAPSHOT</version>
1010
<relativePath>../pom.xml</relativePath>
1111
</parent>
1212

@@ -85,10 +85,6 @@
8585
<groupId>com.fasterxml.jackson.datatype</groupId>
8686
<artifactId>jackson-datatype-jdk8</artifactId>
8787
</dependency>
88-
<dependency>
89-
<groupId>com.fasterxml.jackson.datatype</groupId>
90-
<artifactId>jackson-datatype-jsr310</artifactId>
91-
</dependency>
9288
<dependency>
9389
<groupId>com.fasterxml.jackson.core</groupId>
9490
<artifactId>jackson-annotations</artifactId>
@@ -105,10 +101,6 @@
105101
<groupId>org.apache.commons</groupId>
106102
<artifactId>commons-compress</artifactId>
107103
</dependency>
108-
<dependency>
109-
<groupId>org.jboss.spec.javax.ws.rs</groupId>
110-
<artifactId>jboss-jaxrs-api_2.1_spec</artifactId>
111-
</dependency>
112104
<dependency>
113105
<groupId>com.typesafe</groupId>
114106
<artifactId>config</artifactId>
@@ -144,11 +136,6 @@
144136
<artifactId>junit-jupiter-api</artifactId>
145137
<scope>test</scope>
146138
</dependency>
147-
<dependency>
148-
<groupId>org.junit.jupiter</groupId>
149-
<artifactId>junit-jupiter-engine</artifactId>
150-
<scope>test</scope>
151-
</dependency>
152139
<dependency>
153140
<groupId>org.mockito</groupId>
154141
<artifactId>mockito-core</artifactId>

0 commit comments

Comments
 (0)