- Fix race condition related to browser commit time - The profile commit request waits for browser to actual finish, and profile saved. This can cause request to time out, resulting in a retry, in which the browser has already been closed. - With these changes, the commit is now 'idempotent' and returns a waiting_for_browser until the profile is actually committed. - On frontend, keep pinging commit endpoint with a timeout while 'waiting_for_browser' is returned, actual committed when endpoint returns profile id. --------- Co-authored-by: sua yoo <sua@suayoo.com>
38 lines
795 B
YAML
38 lines
795 B
YAML
apiVersion: btrix.cloud/v1
|
|
kind: ProfileJob
|
|
metadata:
|
|
name: profilejob-{{ id }}
|
|
labels:
|
|
browser: "{{ id }}"
|
|
role: "job"
|
|
btrix.org: {{ oid }}
|
|
btrix.user: {{ userid }}
|
|
{%- if base_profile %}
|
|
btrix.baseprofile: "{{ base_profile }}"
|
|
{%- endif %}
|
|
btrix.storage: "{{ storage_name }}"
|
|
profileid: {{ profileid }}
|
|
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
browser: "{{ id }}"
|
|
|
|
id: "{{ id }}"
|
|
userid: "{{ userid }}"
|
|
oid: "{{ oid }}"
|
|
|
|
storageName: "{{ storage_name }}"
|
|
crawlerImage: "{{ crawler_image }}"
|
|
imagePullPolicy: "{{ image_pull_policy }}"
|
|
|
|
startUrl: "{{ url }}"
|
|
profileFilename: "{{ profile_filename }}"
|
|
vncPassword: "{{ vnc_password }}"
|
|
|
|
proxyId: "{{ proxy_id }}"
|
|
|
|
{% if expire_time %}
|
|
expireTime: "{{ expire_time }}"
|
|
{% endif %}
|