Mike
06/20/2023, 1:51 PMSteven Trimboli
06/20/2023, 3:23 PMMike
06/20/2023, 3:46 PMidriss
06/20/2023, 4:34 PMECSTask
inside prefect-aws
, is there a way to configure AWS CloudWatch log retention?Robert Banick
06/20/2023, 5:31 PMtask_definition_arn
corresponding to the desired infrastructure.
Occasionally our flows fail with the “too many concurrent attempts” ClientException
mentioned in this thread. https://discourse.prefect.io/t/i-am-using-ecsagent-and-sometimes-i-get-an-error-that-sa[…]empts-to-create-a-new-revision-of-the-specified-family/100.
I have two questions:
1. Is it really necessary to register and de-register a task definition for every flow run? Can Prefect not just use the stable task definition?
2. If yes, is this agent-based solution for Prefect 1 still the recommended solution for Prefect 2? https://docs-v1.prefect.io/orchestration/agents/ecs.html#throttling-errors-on-flow-submission. That is, will the Prefect Agent recognize and use the AWS_RETRY_MODD
and AWS_MAX_ATTEMPTS
environment parameters?kasteph
06/20/2023, 5:53 PMJehan Abduljabbar
06/20/2023, 7:12 PMMike Safruk
06/20/2023, 7:33 PMGene Yang
06/21/2023, 12:06 AM"job_configuration": {
"env": "{{ env }}",
"name": "{{ name }}",
"labels": "{{ labels }}",
"command": "{{ command }}",
"namespace": "{{ namespace }}",
"job_manifest": {
"kind": "Job",
"spec": {
"template": {
"spec": {
"containers": [
{
"env": "{{ env }}",
"args": "{{ command }}",
"name": "prefect-job",
"image": "{{ image }}",
"imagePullPolicy": "{{ image_pull_policy }}"
}
],
"completions": 1,
"parallelism": 1,
"restartPolicy": "Never",
"imagePullSecrets": [
{
"name": "git-registry-token"
}
],
"serviceAccountName": "{{ service_account_name }}"
}
},
"ttlSecondsAfterFinished": "{{ finished_job_ttl }}"
},
"metadata": {
"labels": "{{ labels }}",
"namespace": "{{ namespace }}",
"generateName": "{{ name }}-"
},
"apiVersion": "batch/v1"
},
"stream_output": "{{ stream_output }}",
"cluster_config": "{{ cluster_config }}",
"job_watch_timeout_seconds": "{{ job_watch_timeout_seconds }}",
"pod_watch_timeout_seconds": "{{ pod_watch_timeout_seconds }}"
}
Here I am adding the imagePullSecrets attribute so that the kubernetes job can pull the custom built runner image; however, I have to go into the UI and add this through the advanced config. Is there any clean way to do this via the CLI, or by editing the deployment.yaml/prefect.yaml? I thought about creating my own worker with its own base job template by subclassing the default kubenetes worker, but I would rather not add unnecessary complexity to my project!
Thanks so much!Sander
06/21/2023, 7:08 AMStefan
06/21/2023, 7:57 AMMike
06/21/2023, 7:57 AMOuail Bendidi
06/21/2023, 12:53 PMtask.map
keep order ? (Will the list of generated futures have the same order as the mapped over argument ?)Joao Moniz
06/21/2023, 2:32 PMprefect.deployments.run_deployment
from a flow, it shows the new flows that are being triggered by this function as subflows in the UI?
Shouldn't they be regular
flows instead of subflows
? That's what I understood from the docs.Ton Steijvers
06/21/2023, 2:38 PMadduser
command in Debian 12 works slightly different than the one in Debian 11, in the fact that on Debian 12 a home folder is not implicitly created any more for system users.
Because of this upgrade, we have seen our Prefect jobs that use persist_result=True
crash with this error:
12:07:48.020 | ERROR | Flow run 'caped-dingo' - Crash detected! Execution was interrupted by an unexpected exception: Traceback (most recent call last):
File "/usr/local/lib/python3.9/pathlib.py", line 1323, in mkdir
self._accessor.mkdir(self, mode)
FileNotFoundError: [Errno 2] No such file or directory: '/nonexistent/.prefect/storage'
We fixed by adding --home=/home/<my-user>
option to the adduser
command in our Dockerfile.Sander
06/21/2023, 2:49 PMBradley McLaughlin
06/21/2023, 2:55 PMNate
06/21/2023, 4:54 PMDaniel Lomartra
06/21/2023, 5:13 PMCharles Leung
06/21/2023, 6:00 PMScript at './Script/ibes_pykx.py' encountered an exception: ValueError('signal only works in main thread')
. The code is trying to establish a connection and then run these processes on the connection itself. Any advice would be a HUGE help. Source code is below:
def setup():
token = subprocess.Popen('\\\\ccl\\data\\extlib\\KDBSecToken.exe', stdout=subprocess.PIPE).communicate()[0].decode('utf-8')
masterConn = kx.SyncQConnection( host='v-kdbr-01', port=5000, username='cleung', password=token, timeout=3.0 )
user = masterConn('.z.u')
print('User = ' + user.py())
port = masterConn('getProcessClient[`prefect_testing_base;`pykx_test]')
print('Port = ' + str(port.py()))
masterConn.close()
global conn
conn = kx.SyncQConnection( host='v-kdbr-01', port=port.py(), username='cleung', password=token)
user = conn('.z.u')
print('User = ' + user.py())
@flow()
def ibes_pykx():
setup()
logger = get_run_logger()
<http://logger.info|logger.info>("Initializing initial arguments")
dailyDates = conn('dailyDates: .dt.drb[.dt.shiftdateb[exec max date from QModelD;-3]; exec max date from QModelD];')
logFile = conn('inLogFile:`')
return finishIBES_result
if __name__ == "__main__":
ibes_pykx()
idriss
06/21/2023, 6:01 PMTony G
06/21/2023, 7:03 PMdammy arinde
06/21/2023, 7:36 PMLuke Dolan
06/21/2023, 8:03 PMArjun Krishnamurthy
06/22/2023, 5:32 AMRoman Burov
06/22/2023, 6:14 AMMuddassir Shaikh
06/22/2023, 6:28 AMbrodul
06/22/2023, 7:36 AMKees
06/22/2023, 7:39 AMCristian Federiconi
06/22/2023, 8:09 AM