Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal main #17

Merged
merged 55 commits into from
Mar 21, 2025
Merged
Changes from 1 commit
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
4ebc5b6
Patch code from internal to public main
actions-user Feb 19, 2025
346699f
Patch code from internal to public main
actions-user Feb 20, 2025
4fcfa79
Patch code from internal to public main
actions-user Feb 21, 2025
1ff113a
Patch code from internal to public main
actions-user Feb 25, 2025
c8ce919
Patch code from internal to public main
actions-user Feb 25, 2025
236cc2c
Patch code from internal to public main
actions-user Feb 26, 2025
0cf866b
Patch code from internal to public main
actions-user Feb 27, 2025
e7d1699
Patch code from internal to public main
actions-user Feb 27, 2025
9991d46
Patch code from internal to public main
actions-user Feb 27, 2025
a01e6f4
Patch code up to 19b83fc
actions-user Mar 4, 2025
b460972
Patch code up to 86a5603
actions-user Mar 4, 2025
e496398
Patch code up to 7989ff5
actions-user Mar 4, 2025
a9ecf35
Patch code up to 9b4e006
actions-user Mar 5, 2025
5473c38
Patch code up to fd63499
actions-user Mar 5, 2025
a7ce39e
Patch code up to de4dc67
actions-user Mar 5, 2025
22bc294
Fix some typos in the documentation (#35) (#51)
kkurzacz-intel Mar 5, 2025
aea49e8
Merge branch 'main' into internal_main
kkurzacz-intel Mar 5, 2025
70e0b01
Patch code up to b9591d0
actions-user Mar 5, 2025
b6a974c
Patch code up to d72db6f
actions-user Mar 5, 2025
caf6710
Patch code up to 699358f
actions-user Mar 5, 2025
f5ea345
Merge branch 'main' into internal_main
aalbersk Mar 6, 2025
61af02d
Patch code up to 41be526
actions-user Mar 6, 2025
9f56d33
Patch code up to 035f8fe
actions-user Mar 6, 2025
b346c07
Patch code up to 0729dd9
actions-user Mar 6, 2025
ba86828
Patch code up to 142e3f4
actions-user Mar 7, 2025
565dddd
Patch code up to 1e196cb
actions-user Mar 7, 2025
a11b5f6
Patch code up to bd146a8
actions-user Mar 7, 2025
4740679
Patch code up to 7966326
actions-user Mar 10, 2025
f3c549e
Patch code up to 9afcd4b
actions-user Mar 10, 2025
fda2277
Patch code up to 895906d
actions-user Mar 11, 2025
e759213
Patch code up to f983bc9
actions-user Mar 11, 2025
caec8af
Patch code up to 3f11c13
actions-user Mar 12, 2025
1d9daaa
Patch code up to b4d6695
actions-user Mar 14, 2025
72e0d30
Patch code up to d34aafd
actions-user Mar 14, 2025
eabb13f
Patch code up to 1c1ce41
actions-user Mar 17, 2025
2a26f1b
Patch code up to f66cd7d
actions-user Mar 17, 2025
ad16241
Patch code up to 7d8e343
actions-user Mar 17, 2025
e0a7743
Patch code up to 1bf3321
actions-user Mar 17, 2025
fe4edbd
Patch code up to 69a9fcf
actions-user Mar 17, 2025
6bd263c
Patch code up to 131b5bf
actions-user Mar 17, 2025
5aba8fa
Patch code up to 0d89558
actions-user Mar 17, 2025
8304962
Patch code up to fec4e48
actions-user Mar 17, 2025
6165acb
Patch code up to 720ce39
actions-user Mar 17, 2025
956252b
Patch code up to 5270ca1
actions-user Mar 18, 2025
b35becc
Patch code up to b9a447b
actions-user Mar 18, 2025
99f53bb
Patch code up to 2c2560f
actions-user Mar 18, 2025
d8fba06
Patch code up to 4c6a0f5
actions-user Mar 18, 2025
76deffc
Patch code up to e0ed3aa
actions-user Mar 18, 2025
9b98bc9
Patch code up to fd9e0b7
actions-user Mar 19, 2025
372a322
Patch code up to 89af502
actions-user Mar 19, 2025
7d0d7b8
Patch code up to a0b37ba
actions-user Mar 20, 2025
3ab8f28
Patch code up to 98f148d
actions-user Mar 21, 2025
3fcd5f1
Patch code up to ee0760f
actions-user Mar 21, 2025
57ce898
Patch code up to 5fe9fcd
actions-user Mar 21, 2025
30b3e5b
Patch code up to 84959f9
actions-user Mar 21, 2025
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
Prev Previous commit
Next Next commit
Patch code up to fd9e0b7
Signed-off-by: Github Actions <[email protected]>
actions-user committed Mar 19, 2025
commit 9b98bc93f21d8035209c52553ed86ea08a0367dd
2 changes: 2 additions & 0 deletions deployment/istio/authz/authz-chatqa.yaml
Original file line number Diff line number Diff line change
@@ -88,6 +88,7 @@ spec:
- source:
notPrincipals:
- cluster.local/ns/chatqa/sa/reranking-usvc
- cluster.local/ns/edp/sa/edp-chart
- cluster.local/ns/monitoring/sa/telemetry-kube-prometheus-prometheus
---
apiVersion: security.istio.io/v1
@@ -281,6 +282,7 @@ spec:
- source:
notPrincipals:
- cluster.local/ns/chatqa/sa/default
- cluster.local/ns/edp/sa/edp-chart
- cluster.local/ns/monitoring/sa/telemetry-kube-prometheus-prometheus
---
# llm-svc
1 change: 1 addition & 0 deletions deployment/istio/authz/authz-edp.yaml
Original file line number Diff line number Diff line change
@@ -61,6 +61,7 @@ spec:
- from:
- source:
notPrincipals:
- cluster.local/ns/edp/sa/edp-chart
- cluster.local/ns/edp/sa/edp-minio
- cluster.local/ns/auth-apisix/sa/auth-apisix
- cluster.local/ns/monitoring/sa/telemetry-kube-prometheus-prometheus
2,050 changes: 1,294 additions & 756 deletions deployment/telemetry/helm/files/dashboards/service-edp.json

Large diffs are not rendered by default.

13 changes: 9 additions & 4 deletions src/edp/app/tasks.py
Original file line number Diff line number Diff line change
@@ -99,9 +99,11 @@ def process_file_task(self, file_id: Any, *args, **kwargs):
file_db.job_message = 'Data preparation in progress.'
self.db.commit()

minio_response = None
file_base64= None
try:
response = self.minio.get_object(bucket_name=file_db.bucket_name, object_name=file_db.object_name)
file_data = response.read()
minio_response = self.minio.get_object(bucket_name=file_db.bucket_name, object_name=file_db.object_name)
file_data = minio_response.read()
file_base64 = base64.b64encode(file_data).decode('ascii')
logger.debug(f"[{file_db.id}] Retrievied file from S3 storage.")
except S3Error as e:
@@ -111,8 +113,9 @@ def process_file_task(self, file_id: Any, *args, **kwargs):
self.db.commit()
raise Exception(f"Error downloading file. {e}")
finally:
response.close()
response.release_conn()
if minio_response is not None:
minio_response.close()
minio_response.release_conn()

# Step 2 - Call the data preparation service
filename = file_db.object_name.split('/')[-1]
@@ -244,6 +247,7 @@ def delete_file_task(self, file_id: Any, *args, **kwargs):
# Step 2 - Delete the file from database
id = file_db.id
self.db.delete(file_db)
self.db.commit()
logger.debug(f"[{id}] File deleted successfully from database.")
return True

@@ -401,5 +405,6 @@ def delete_link_task(self, link_id: Any, *args, **kwargs):
# Step 2 - Delete the file from database
id = link_db.id
self.db.delete(link_db)
self.db.commit()
logger.debug(f"[{id}] File deleted successfully from database.")
return True
2 changes: 1 addition & 1 deletion src/edp/terraform/README.md
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ export edp_storage_type="s3"
export s3_access_key=$(terraform output -raw access_key)
export s3_secret_key=$(terraform output -raw secret_key)
export s3_sqs_queue=$(terraform output -raw queue_url)
export s3_region="us-east-1" # optional
export s3_region=$(terraform output -raw region)
cd deployment
./install_chatqna.sh --auth --deploy xeon_torch --ui --upgrade --kind
45 changes: 45 additions & 0 deletions src/edp/terraform/main.tf
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@ resource "aws_s3_bucket" "edp_buckets" {

resource "aws_sqs_queue" "edp_queue_1" {
name = var.queue_name
sqs_managed_sse_enabled = true
}

resource "aws_iam_user" "edp_user" {
@@ -28,6 +29,16 @@ resource "aws_iam_policy" "list_all_buckets" {
Action = ["s3:ListAllMyBuckets"]
Effect = "Allow"
Resource = "*"
},
{
Action = ["s3:*"],
Effect = "Deny",
Resource = "*",
Condition = {
Bool = {
"aws:SecureTransport" = "false"
}
}
}
]
})
@@ -68,6 +79,16 @@ resource "aws_iam_policy" "read_only_bucket" {
Action = ["s3:GetObject"]
Effect = "Allow"
Resource = "${aws_s3_bucket.edp_buckets[0].arn}/*"
},
{
Action = ["s3:*"],
Effect = "Deny",
Resource = ["${aws_s3_bucket.edp_buckets[0].arn}/*"],
Condition = {
Bool = {
"aws:SecureTransport" = "false"
}
}
}
]
})
@@ -83,6 +104,16 @@ resource "aws_iam_policy" "read_write_bucket_1" {
Action = ["s3:GetObject", "s3:PutObject", "s3:DeleteObject"]
Effect = "Allow"
Resource = "${aws_s3_bucket.edp_buckets[1].arn}/*"
},
{
Action = ["s3:*"],
Effect = "Deny",
Resource = ["${aws_s3_bucket.edp_buckets[1].arn}/*"],
Condition = {
Bool = {
"aws:SecureTransport" = "false"
}
}
}
]
})
@@ -98,6 +129,16 @@ resource "aws_iam_policy" "read_write_bucket_2" {
Action = ["s3:GetObject", "s3:PutObject", "s3:DeleteObject"]
Effect = "Allow"
Resource = "${aws_s3_bucket.edp_buckets[2].arn}/*"
},
{
Action = ["s3:*"],
Effect = "Deny",
Resource = ["${aws_s3_bucket.edp_buckets[1].arn}/*"],
Condition = {
Bool = {
"aws:SecureTransport" = "false"
}
}
}
]
})
@@ -178,3 +219,7 @@ output "secret_key" {
value = aws_iam_access_key.edp_access_key.secret
sensitive = true
}

output "region" {
value = var.region
}