Skip to content

Commit 6b6509d

Browse files
authored
Merge branch 'master' into brig/changelog-2.17.0
2 parents b0e2a32 + 0bae1c5 commit 6b6509d

File tree

48 files changed

+2192
-966
lines changed

Some content is hidden

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

48 files changed

+2192
-966
lines changed

.mvn/wrapper/MavenWrapperDownloader.java

Lines changed: 0 additions & 117 deletions
This file was deleted.

.mvn/wrapper/maven-wrapper.jar

-49.5 KB
Binary file not shown.

.mvn/wrapper/maven-wrapper.properties

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,19 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
wrapperVersion=3.3.2
18+
distributionType=only-script
119
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
2-
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar

NOTES.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,31 @@
55
Prefer explicit binding using `com.google.inject.Module` over `@Named` annotations.
66
Use `@Named` for top-level modules and server plugins.
77

8-
Some classes require explicit bindings using `Multibinder.newSetBinder`:
9-
- com.walmartlabs.concord.server.sdk.ScheduledTask
8+
Some classes require explicit binding using `Multibinder.newSetBinder`:
9+
- ApiDescriptor
10+
- AuditLogListener
11+
- AuthenticationHandler
12+
- BackgroundTask
13+
- Component
14+
- ContextHandlerConfigurator
15+
- CustomEnqueueProcessor
16+
- ExceptionMapper
17+
- Filter
18+
- FilterChainConfigurator
19+
- FilterHolder
20+
- GaugeProvider
21+
- HttpServlet
22+
- ModeProcessor
23+
- PolicyApplier
24+
- ProcessEventListener
25+
- ProcessLogListener
26+
- ProcessStatusListener
27+
- ProcessWaitHandler
28+
- Realm
29+
- RepositoryRefreshListener
30+
- RequestErrorHandler
31+
- ScheduledTask
32+
- SecretStore
33+
- ServletContextListener
34+
- ServletHolder
35+
- UserInfoProvider

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,15 @@ See the [examples](examples) directory.
103103

104104
## How To Release New Versions
105105

106-
- perform the regular Maven release:
106+
- perform a regular Maven release:
107107
```
108108
$ ./mvnw release:prepare release:perform
109109
```
110-
- push the tags:
110+
- push the new tag:
111111
```
112-
$ git push --tags
112+
$ git push origin RELEASE_TAG
113113
```
114-
- sync to Central;
114+
- sync to [Central](https://central.sonatype.com/);
115115
- build and push the Docker images:
116116
```
117117
$ git checkout RELEASE_TAG

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

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
* Licensed under the Apache License, Version 2.0 (the "License");
1010
* you may not use this file except in compliance with the License.
1111
* You may obtain a copy of the License at
12-
*
12+
*
1313
* http://www.apache.org/licenses/LICENSE-2.0
14-
*
14+
*
1515
* Unless required by applicable law or agreed to in writing, software
1616
* distributed under the License is distributed on an "AS IS" BASIS,
1717
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -48,10 +48,18 @@ public AgentClientFactory(boolean useMaintenanceMode) {
4848
}
4949

5050
public AgentClient create(Pod pod) {
51-
if (useMaintenanceMode && pod.getStatus() != null && pod.getStatus().getPodIP() != null) {
51+
if (useMaintenanceMode && isRunning(pod) && hasIP(pod)) {
5252
return new DefaultAgentClient(httpClient, pod.getStatus().getPodIP());
5353
} else {
5454
return new NopAgentClient();
5555
}
5656
}
57+
58+
private static boolean isRunning(Pod pod) {
59+
return pod.getStatus() != null && "Running".equals(pod.getStatus().getPhase());
60+
}
61+
62+
private static boolean hasIP(Pod pod) {
63+
return pod.getStatus() != null && pod.getStatus().getPodIP() != null;
64+
}
5765
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*-
2+
* *****
3+
* Concord
4+
* -----
5+
* Copyright (C) 2017 - 2024 Walmart Inc.
6+
* -----
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
* =====
19+
*/
20+
21+
import { fetchJson } from '../../common';
22+
import {TeamRole} from "../../org/team";
23+
24+
export interface UserInfoTeam {
25+
orgName: string;
26+
teamName: string;
27+
role: TeamRole;
28+
}
29+
30+
export interface UserInfoEntry {
31+
displayName: string;
32+
teams?: UserInfoTeam[];
33+
roles?: string[];
34+
ldapGroups?: string[];
35+
}
36+
37+
export const get = (): Promise<UserInfoEntry> => fetchJson(`/api/service/console/userInfo`);
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
/*-
2+
* *****
3+
* Concord
4+
* -----
5+
* Copyright (C) 2017 - 2024 Wal-Mart Store, Inc.
6+
* -----
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
* =====
19+
*/
20+
import * as React from 'react';
21+
import {
22+
List,
23+
ListContent,
24+
ListDescription,
25+
ListItem,
26+
Loader
27+
} from 'semantic-ui-react';
28+
29+
import { get as apiGet, UserInfoEntry } from '../../../api/profile/user';
30+
import { RequestErrorMessage } from '../../molecules';
31+
import { useApi } from '../../../hooks/useApi';
32+
import {Link} from "react-router-dom";
33+
34+
export default () => {
35+
const { data, error, isLoading } = useApi<UserInfoEntry>(apiGet, {
36+
fetchOnMount: true
37+
});
38+
39+
if (error) {
40+
return <RequestErrorMessage error={error} />;
41+
}
42+
43+
if (isLoading) {
44+
return <Loader active={true} />;
45+
}
46+
47+
if (!data) {
48+
return <p>There are no User info available</p>;
49+
}
50+
51+
return (
52+
<div style={{padding: '.85714286em 1.14285714em'}}>
53+
<h5>Name</h5>
54+
<List divided={true} relaxed={true}>
55+
<ListItem>
56+
<ListContent>
57+
<ListDescription>{data.displayName}</ListDescription>
58+
</ListContent>
59+
</ListItem>
60+
</List>
61+
62+
63+
<h5>Roles</h5>
64+
<List divided={true} relaxed={true}>
65+
{data.roles && data.roles
66+
.sort((a, b) => a.localeCompare(b))
67+
.map((role, index) => (
68+
<ListItem key={index}>
69+
<ListContent>
70+
<ListDescription>{role}</ListDescription>
71+
</ListContent>
72+
</ListItem>
73+
))}
74+
</List>
75+
76+
<h5>Teams</h5>
77+
<List divided={true} relaxed={true}>
78+
{data.teams && data.teams
79+
.sort((a, b) => {
80+
const aConcat = `${a.orgName}/${a.teamName}`;
81+
const bConcat = `${b.orgName}/${b.teamName}`;
82+
return aConcat.localeCompare(bConcat);
83+
})
84+
.map((team, index) => (
85+
<ListItem key={index}>
86+
<ListContent>
87+
<ListDescription>
88+
<Link to={`/org/${team.orgName}/team/${team.teamName}`}>{team.orgName} / {team.teamName} ({team.role})</Link>
89+
</ListDescription>
90+
</ListContent>
91+
</ListItem>
92+
))}
93+
</List>
94+
95+
{data.ldapGroups && data.ldapGroups.length > 0 && (
96+
<>
97+
<h5>LDAP Groups</h5>
98+
<List divided={true} relaxed={true}>
99+
{data.ldapGroups.map((group, index) => (
100+
<ListItem key={index}>
101+
<ListContent>
102+
<ListDescription>{group}</ListDescription>
103+
</ListContent>
104+
</ListItem>
105+
))}
106+
</List>
107+
</>
108+
)}
109+
</div>
110+
);
111+
};

console2/src/components/organisms/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,5 +98,6 @@ export { default as TeamMemberList2 } from './TeamMemberList2';
9898
export { default as TeamRenameActivity } from './TeamRenameActivity';
9999
export { default as TopBar } from './TopBar';
100100
export { default as TriggeredByPopup } from './TriggeredByPopup';
101+
export { default as UserInfo } from './UserInfo';
101102
export { default as UserProcessActivity } from './UserProcessActivity';
102103
export { default as ValidateRepositoryPopup } from './ValidateRepositoryPopup';

0 commit comments

Comments
 (0)