Skip to content

Commit b5ff389

Browse files
- Experiment with docker user again.
1 parent f587666 commit b5ff389

File tree

7 files changed

+10
-8
lines changed

7 files changed

+10
-8
lines changed

.vscode/launch.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,8 @@
154154
"set global \"$.auth.google.sub\"='[email protected]';",
155155
"select JSON_EXTRACT(saml.samlIdentity, '$.username') as saml_username from github.scim.saml_ids saml where saml.org = 'dummyorg';",
156156
"select kind, name, maximumCardsPerInstance from google.compute.acceleratorTypes where project = 'defective-response-content-project' and zone = 'australia-southeast1-a' order by name desc;",
157-
"registry pull google;"
157+
"registry pull google;",
158+
"create materialized view nv as select BackupId, BackupState from aws.cloudhsm.backups where region = 'ap-southeast-2' order by BackupId;"
158159
],
159160
"default": "show providers;"
160161
},

cicd/requirements.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,3 @@ PyYaml>=6.0.1
55
requests==2.32.3
66
robotframework==6.1.1
77
sqlalchemy==1.4.44
8-
9-
mistune==3.0.2

docker-compose-persist-postgres.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ version: "3.9"
33
services:
44
stackqlsrv:
55
image: "${STACKQL_IMAGE_NAME:-stackql/stackql}"
6+
user: "${UID}:${GID}"
67
build:
7-
user: "${UID}:${GID}"
88
context: .
99
cache_from:
1010
- "${STACKQL_IMAGE_NAME:-stackql/stackql}"

docker-compose.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ version: "3.9"
22

33
services:
44
stackqlsrv:
5-
user: "${UID}:${GID}"
65
image: "${STACKQL_IMAGE_NAME:-stackql/stackql}"
76
build:
87
context: .
@@ -14,6 +13,8 @@ services:
1413
- BUILDMAJORVERSION=${BUILDMAJORVERSION:-1}
1514
- BUILDMINORVERSION=${BUILDMINORVERSION:-1}
1615
- BUILDPATCHVERSION=${BUILDPATCHVERSION:-1}
16+
- UID=${UID}
17+
- GID=${GID}
1718
command:
1819
- bash
1920
- -c

test/python/flask/aws/app.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import re
55
import json
66
import base64
7+
import datetime
78

89
app = Flask(__name__)
910
app.template_folder = os.path.join(os.path.dirname(__file__), "templates")
@@ -226,7 +227,8 @@ def generic_handler(request: Request):
226227
logger.error(f"Missing template for route: {request}")
227228
return jsonify({'error': f'Missing template for route: {request}'}), 500
228229
logger.info(f"routing to template: {route_cfg['template']}")
229-
response = make_response(render_template(route_cfg["template"], request=request))
230+
twelve_days_ago = (datetime.datetime.now() - datetime.timedelta(days=12)).strftime("%Y-%m-%d")
231+
response = make_response(render_template(route_cfg["template"], request=request, twelve_days_ago=twelve_days_ago))
230232
response.headers.update(route_cfg.get("response_headers", {}))
231233
response.status_code = route_cfg.get("status", 200)
232234
return response
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<ListUsersResponse xmlns="https://iam.amazonaws.com/doc/2010-05-08/"> <ListUsersResult> <Users> <member> <UserId>AID2MAB8DPLSRHEXAMPLE</UserId> <Path>/division_abc/subdivision_xyz/engineering/</Path> <UserName>Andrew</UserName> <Arn>arn:aws:iam::123456789012:user/division_abc/subdivision_xyz/engineering/Andrew</Arn> <CreateDate>2012-09-05T19:38:48Z</CreateDate> <PasswordLastUsed>2014-09-08T21:47:36Z</PasswordLastUsed> </member> <member> <UserId>AIDIODR4TAW7CSEXAMPLE</UserId> <Path>/division_abc/subdivision_xyz/engineering/</Path> <UserName>Jackie</UserName> <Arn>arn:aws:iam::123456789012:user/division_abc/subdivision_xyz/engineering/Jackie</Arn> <CreateDate>2014-04-09T15:43:45Z</CreateDate> <PasswordLastUsed>2024-12-15T03:02:52Z</PasswordLastUsed> </member> </Users> <IsTruncated>false</IsTruncated> </ListUsersResult> <ResponseMetadata> <RequestId>7a62c49f-347e-4fc4-9331-6e8eEXAMPLE</RequestId> </ResponseMetadata> </ListUsersResponse>
2+
<ListUsersResponse xmlns="https://iam.amazonaws.com/doc/2010-05-08/"> <ListUsersResult> <Users> <member> <UserId>AID2MAB8DPLSRHEXAMPLE</UserId> <Path>/division_abc/subdivision_xyz/engineering/</Path> <UserName>Andrew</UserName> <Arn>arn:aws:iam::123456789012:user/division_abc/subdivision_xyz/engineering/Andrew</Arn> <CreateDate>2012-09-05T19:38:48Z</CreateDate> <PasswordLastUsed>2014-09-08T21:47:36Z</PasswordLastUsed> </member> <member> <UserId>AIDIODR4TAW7CSEXAMPLE</UserId> <Path>/division_abc/subdivision_xyz/engineering/</Path> <UserName>Jackie</UserName> <Arn>arn:aws:iam::123456789012:user/division_abc/subdivision_xyz/engineering/Jackie</Arn> <CreateDate>2014-04-09T15:43:45Z</CreateDate> <PasswordLastUsed>{{ twelve_days_ago }}T03:02:52Z</PasswordLastUsed> </member> </Users> <IsTruncated>false</IsTruncated> </ListUsersResult> <ResponseMetadata> <RequestId>7a62c49f-347e-4fc4-9331-6e8eEXAMPLE</RequestId> </ResponseMetadata> </ListUsersResponse>

test/robot/functional/stackql_mocked_from_cmd_line.robot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2148,7 +2148,7 @@ Recently Active Logic Multi Backend
21482148
... UserName,
21492149
... CASE WHEN (
21502150
... TO_TIMESTAMP(PasswordLastUsed, 'YYYY-MM-DDTHH:MI:SSZ')
2151-
... > (now() - interval '7 days' ) )
2151+
... > (now() - interval '20 days' ) )
21522152
... then 'true' else 'false' end as active
21532153
... from aws.iam.users
21542154
... WHERE region = 'us-east-1' and PasswordLastUsed is not null

0 commit comments

Comments
 (0)