AIP-44 Migrate Dagbag.sync_to_db to internal API. - #29188

Merged
potiuk merged 2 commits into
apache:mainfrom
snjypl:28615-aip-44-mirgate-dagbag.sync_to_db
Mar 12, 2023
Merged

AIP-44 Migrate Dagbag.sync_to_db to internal API.#29188
potiuk merged 2 commits into
apache:mainfrom
snjypl:28615-aip-44-mirgate-dagbag.sync_to_db

Conversation

@snjypl

Copy link
Copy Markdown
Contributor

Fixes: #28615


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@boring-cyborgboring-cyborgBot added the area:Scheduler including HA (high availability) scheduler label Jan 26, 2023
@snjypl

snjypl commented Jan 26, 2023

Copy link
Copy Markdown
ContributorAuthor

Hi Team @potiuk@mhenc@vincbeck

this task appears to be more complex than i expected. i went through the AIP 44, , and the PRs for the other tasks to get a better understanding.

in AIP-44, i found a reference to the save_dag_to_db method.

This is a new, “heaviest” method that should be exposed by the internal API to the DAG processor. We should be able to serialize all the information stored currently in the DagBag and send it to the Internal API server. The method should be roughly equivalent to: sync_to_db and pickling dags if set. This should be done in a single transaction as a single API call.

based on my understanding so far, i have done a rough refactoring to see if i am in the right direction. it will be really helpful if anyone could take a look at the changes.

From the AIP, i got the impression that we would be sending the serialized dag to the internal api. Will BaseSerialization.serialize in the internal_api_call decorator take care about the serialization?

@snjypl

Copy link
Copy Markdown
ContributorAuthor

i tried the below code to check the serialization/deserialization:

from airflow.models.dagbag import DagBag
from airflow.serialization.serialized_objects import BaseSerialization,SerializedDAG
dagbag = DagBag('/opt/airflow/dags')
BaseSerialization.deserialize(BaseSerialization.serialize(dagbag.dags))

but i got this error:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/airflow/.local/lib/python3.7/site-packages/airflow/serialization/serialized_objects.py", line 475, in deserialize
return {k: cls.deserialize(v) for k, v in var.items()}
File "/home/airflow/.local/lib/python3.7/site-packages/airflow/serialization/serialized_objects.py", line 475, in <dictcomp>
return {k: cls.deserialize(v) for k, v in var.items()}
File "/home/airflow/.local/lib/python3.7/site-packages/airflow/serialization/serialized_objects.py", line 471, in deserialize
var = encoded_var[Encoding.VAR]
KeyError: <Encoding.VAR: '__var'>

@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from 8ec3f0d to 94a1999CompareJanuary 27, 2023 11:49
Comment threadairflow/dag_processing/processor.py Outdated
@mhenc

mhenc commented Feb 1, 2023

Copy link
Copy Markdown
Contributor

From the AIP, i got the impression that we would be sending the serialized dag to the internal api. Will BaseSerialization.serialize in the internal_api_call decorator take care about the serialization?

Yes, the InternalApi decorator/server serializes/deserializes the objects using BaseSerialization.

https://github.com/apache/airflow/blob/main/airflow/api_internal/internal_api_call.py#L107

I see that you have problems serializing dags, which is dict[String,DAG]. We may need to extend the BaseSerialization to support it. Let me take a look.

@mhenc

mhenc commented Feb 1, 2023

Copy link
Copy Markdown
Contributor

Regarding dags: dict[String, Dag] serialization/deserialization:
I found that there is a code for it:
https://github.com/apache/airflow/blob/main/airflow/serialization/serialized_objects.py#L415
and
https://github.com/apache/airflow/blob/main/airflow/serialization/serialized_objects.py#L476

But for some reason the serialized object doesn't contain "__type"="dag" so the deserialization doesn't work as expected.
This can be easily fixed by changing line

return SerializedDAG.serialize_dag(var)

https://github.com/apache/airflow/blob/main/airflow/serialization/serialized_objects.py#L415
to

return cls._encode(SerializedDAG.serialize_dag(var), type_=DAT.DAG)

at least it worked for me.

But I am not sure if it won't break something.

@potiuk@ashb do you have any idea why it is like that? is this code used anywhere?
Note that there are similar cases (like return SerializedBaseOperator.serialize_mapped_operator(var) few lines below).

@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch 2 times, most recently from 8ef6e37 to 2804486CompareFebruary 2, 2023 13:41
@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch 2 times, most recently from 8d64734 to 126eac3CompareFebruary 2, 2023 20:16
@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from 126eac3 to cb467e6CompareFebruary 14, 2023 18:08
@snjypl
snjypl marked this pull request as ready for review February 14, 2023 20:43
@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from cb467e6 to 66fa891CompareFebruary 14, 2023 20:43
@potiuk

Copy link
Copy Markdown
Member

Sorry, i have not looked at this before, I want to have a closer look at that after we discuss the approach i proposed in #29513 (comment). - I have a feeling that once we agree this is a good idea and we apply it here, we might implement some simple refactor that will let us avoid any complexity (but it's too late for me now to think clearly).

@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from 66fa891 to 1ae8161CompareFebruary 27, 2023 07:03
@potiuk
potiukforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from 1ae8161 to 4871031CompareFebruary 27, 2023 20:39
@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch 4 times, most recently from 700c17f to ef555caCompareMarch 2, 2023 18:51
@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from ef555ca to f48fdf4CompareMarch 9, 2023 15:13

@potiukpotiuk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@potiuk
potiuk merged commit 5c15b23 into apache:mainMar 12, 2023
@snjypl
snjypl deleted the 28615-aip-44-mirgate-dagbag.sync_to_db branch March 15, 2023 14:19
@pierrejeambrunpierrejeambrun added the AIP-44 Airflow Internal API label Mar 22, 2023
@pierrejeambrunpierrejeambrun added this to the Airflow 2.6.0 milestone Mar 22, 2023
@pierrejeambrunpierrejeambrun added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Mar 22, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AIP-44Airflow Internal APIarea:Schedulerincluding HA (high availability) schedulerchangelog:skipChanges that should be skipped from the changelog (CI, tests, etc..)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AIP-44 Migrate Dagbag.sync_to_db to internal API.

5 participants

@snjypl@mhenc@potiuk@vincbeck@pierrejeambrun
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

AIP-44 Migrate Dagbag.sync_to_db to internal API. - #29188

Merged
potiuk merged 2 commits into
apache:mainfrom
snjypl:28615-aip-44-mirgate-dagbag.sync_to_db
Mar 12, 2023
Merged

AIP-44 Migrate Dagbag.sync_to_db to internal API.#29188
potiuk merged 2 commits into
apache:mainfrom
snjypl:28615-aip-44-mirgate-dagbag.sync_to_db

Conversation

@snjypl

Copy link
Copy Markdown
Contributor

Fixes: #28615


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@boring-cyborgboring-cyborgBot added the area:Scheduler including HA (high availability) scheduler label Jan 26, 2023
@snjypl

snjypl commented Jan 26, 2023

Copy link
Copy Markdown
ContributorAuthor

Hi Team @potiuk@mhenc@vincbeck

this task appears to be more complex than i expected. i went through the AIP 44, , and the PRs for the other tasks to get a better understanding.

in AIP-44, i found a reference to the save_dag_to_db method.

This is a new, “heaviest” method that should be exposed by the internal API to the DAG processor. We should be able to serialize all the information stored currently in the DagBag and send it to the Internal API server. The method should be roughly equivalent to: sync_to_db and pickling dags if set. This should be done in a single transaction as a single API call.

based on my understanding so far, i have done a rough refactoring to see if i am in the right direction. it will be really helpful if anyone could take a look at the changes.

From the AIP, i got the impression that we would be sending the serialized dag to the internal api. Will BaseSerialization.serialize in the internal_api_call decorator take care about the serialization?

@snjypl

Copy link
Copy Markdown
ContributorAuthor

i tried the below code to check the serialization/deserialization:

from airflow.models.dagbag import DagBag
from airflow.serialization.serialized_objects import BaseSerialization,SerializedDAG
dagbag = DagBag('/opt/airflow/dags')
BaseSerialization.deserialize(BaseSerialization.serialize(dagbag.dags))

but i got this error:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/airflow/.local/lib/python3.7/site-packages/airflow/serialization/serialized_objects.py", line 475, in deserialize
return {k: cls.deserialize(v) for k, v in var.items()}
File "/home/airflow/.local/lib/python3.7/site-packages/airflow/serialization/serialized_objects.py", line 475, in <dictcomp>
return {k: cls.deserialize(v) for k, v in var.items()}
File "/home/airflow/.local/lib/python3.7/site-packages/airflow/serialization/serialized_objects.py", line 471, in deserialize
var = encoded_var[Encoding.VAR]
KeyError: <Encoding.VAR: '__var'>

@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from 8ec3f0d to 94a1999CompareJanuary 27, 2023 11:49
Comment threadairflow/dag_processing/processor.py Outdated
@mhenc

mhenc commented Feb 1, 2023

Copy link
Copy Markdown
Contributor

From the AIP, i got the impression that we would be sending the serialized dag to the internal api. Will BaseSerialization.serialize in the internal_api_call decorator take care about the serialization?

Yes, the InternalApi decorator/server serializes/deserializes the objects using BaseSerialization.

https://github.com/apache/airflow/blob/main/airflow/api_internal/internal_api_call.py#L107

I see that you have problems serializing dags, which is dict[String,DAG]. We may need to extend the BaseSerialization to support it. Let me take a look.

@mhenc

mhenc commented Feb 1, 2023

Copy link
Copy Markdown
Contributor

Regarding dags: dict[String, Dag] serialization/deserialization:
I found that there is a code for it:
https://github.com/apache/airflow/blob/main/airflow/serialization/serialized_objects.py#L415
and
https://github.com/apache/airflow/blob/main/airflow/serialization/serialized_objects.py#L476

But for some reason the serialized object doesn't contain "__type"="dag" so the deserialization doesn't work as expected.
This can be easily fixed by changing line

return SerializedDAG.serialize_dag(var)

https://github.com/apache/airflow/blob/main/airflow/serialization/serialized_objects.py#L415
to

return cls._encode(SerializedDAG.serialize_dag(var), type_=DAT.DAG)

at least it worked for me.

But I am not sure if it won't break something.

@potiuk@ashb do you have any idea why it is like that? is this code used anywhere?
Note that there are similar cases (like return SerializedBaseOperator.serialize_mapped_operator(var) few lines below).

@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch 2 times, most recently from 8ef6e37 to 2804486CompareFebruary 2, 2023 13:41
@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch 2 times, most recently from 8d64734 to 126eac3CompareFebruary 2, 2023 20:16
@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from 126eac3 to cb467e6CompareFebruary 14, 2023 18:08
@snjypl
snjypl marked this pull request as ready for review February 14, 2023 20:43
@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from cb467e6 to 66fa891CompareFebruary 14, 2023 20:43
@potiuk

Copy link
Copy Markdown
Member

Sorry, i have not looked at this before, I want to have a closer look at that after we discuss the approach i proposed in #29513 (comment). - I have a feeling that once we agree this is a good idea and we apply it here, we might implement some simple refactor that will let us avoid any complexity (but it's too late for me now to think clearly).

@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from 66fa891 to 1ae8161CompareFebruary 27, 2023 07:03
@potiuk
potiukforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from 1ae8161 to 4871031CompareFebruary 27, 2023 20:39
@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch 4 times, most recently from 700c17f to ef555caCompareMarch 2, 2023 18:51
@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from ef555ca to f48fdf4CompareMarch 9, 2023 15:13

@potiukpotiuk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@potiuk
potiuk merged commit 5c15b23 into apache:mainMar 12, 2023
@snjypl
snjypl deleted the 28615-aip-44-mirgate-dagbag.sync_to_db branch March 15, 2023 14:19
@pierrejeambrunpierrejeambrun added the AIP-44 Airflow Internal API label Mar 22, 2023
@pierrejeambrunpierrejeambrun added this to the Airflow 2.6.0 milestone Mar 22, 2023
@pierrejeambrunpierrejeambrun added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Mar 22, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AIP-44Airflow Internal APIarea:Schedulerincluding HA (high availability) schedulerchangelog:skipChanges that should be skipped from the changelog (CI, tests, etc..)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AIP-44 Migrate Dagbag.sync_to_db to internal API.

5 participants

@snjypl@mhenc@potiuk@vincbeck@pierrejeambrun
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

AIP-44 Migrate Dagbag.sync_to_db to internal API. - #29188

Merged
potiuk merged 2 commits into
apache:mainfrom
snjypl:28615-aip-44-mirgate-dagbag.sync_to_db
Mar 12, 2023
Merged

AIP-44 Migrate Dagbag.sync_to_db to internal API.#29188
potiuk merged 2 commits into
apache:mainfrom
snjypl:28615-aip-44-mirgate-dagbag.sync_to_db

Conversation

@snjypl

Copy link
Copy Markdown
Contributor

Fixes: #28615


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@boring-cyborgboring-cyborgBot added the area:Scheduler including HA (high availability) scheduler label Jan 26, 2023
@snjypl

snjypl commented Jan 26, 2023

Copy link
Copy Markdown
ContributorAuthor

Hi Team @potiuk@mhenc@vincbeck

this task appears to be more complex than i expected. i went through the AIP 44, , and the PRs for the other tasks to get a better understanding.

in AIP-44, i found a reference to the save_dag_to_db method.

This is a new, “heaviest” method that should be exposed by the internal API to the DAG processor. We should be able to serialize all the information stored currently in the DagBag and send it to the Internal API server. The method should be roughly equivalent to: sync_to_db and pickling dags if set. This should be done in a single transaction as a single API call.

based on my understanding so far, i have done a rough refactoring to see if i am in the right direction. it will be really helpful if anyone could take a look at the changes.

From the AIP, i got the impression that we would be sending the serialized dag to the internal api. Will BaseSerialization.serialize in the internal_api_call decorator take care about the serialization?

@snjypl

Copy link
Copy Markdown
ContributorAuthor

i tried the below code to check the serialization/deserialization:

from airflow.models.dagbag import DagBag
from airflow.serialization.serialized_objects import BaseSerialization,SerializedDAG
dagbag = DagBag('/opt/airflow/dags')
BaseSerialization.deserialize(BaseSerialization.serialize(dagbag.dags))

but i got this error:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/airflow/.local/lib/python3.7/site-packages/airflow/serialization/serialized_objects.py", line 475, in deserialize
return {k: cls.deserialize(v) for k, v in var.items()}
File "/home/airflow/.local/lib/python3.7/site-packages/airflow/serialization/serialized_objects.py", line 475, in <dictcomp>
return {k: cls.deserialize(v) for k, v in var.items()}
File "/home/airflow/.local/lib/python3.7/site-packages/airflow/serialization/serialized_objects.py", line 471, in deserialize
var = encoded_var[Encoding.VAR]
KeyError: <Encoding.VAR: '__var'>

@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from 8ec3f0d to 94a1999CompareJanuary 27, 2023 11:49
Comment threadairflow/dag_processing/processor.py Outdated
@mhenc

mhenc commented Feb 1, 2023

Copy link
Copy Markdown
Contributor

From the AIP, i got the impression that we would be sending the serialized dag to the internal api. Will BaseSerialization.serialize in the internal_api_call decorator take care about the serialization?

Yes, the InternalApi decorator/server serializes/deserializes the objects using BaseSerialization.

https://github.com/apache/airflow/blob/main/airflow/api_internal/internal_api_call.py#L107

I see that you have problems serializing dags, which is dict[String,DAG]. We may need to extend the BaseSerialization to support it. Let me take a look.

@mhenc

mhenc commented Feb 1, 2023

Copy link
Copy Markdown
Contributor

Regarding dags: dict[String, Dag] serialization/deserialization:
I found that there is a code for it:
https://github.com/apache/airflow/blob/main/airflow/serialization/serialized_objects.py#L415
and
https://github.com/apache/airflow/blob/main/airflow/serialization/serialized_objects.py#L476

But for some reason the serialized object doesn't contain "__type"="dag" so the deserialization doesn't work as expected.
This can be easily fixed by changing line

return SerializedDAG.serialize_dag(var)

https://github.com/apache/airflow/blob/main/airflow/serialization/serialized_objects.py#L415
to

return cls._encode(SerializedDAG.serialize_dag(var), type_=DAT.DAG)

at least it worked for me.

But I am not sure if it won't break something.

@potiuk@ashb do you have any idea why it is like that? is this code used anywhere?
Note that there are similar cases (like return SerializedBaseOperator.serialize_mapped_operator(var) few lines below).

@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch 2 times, most recently from 8ef6e37 to 2804486CompareFebruary 2, 2023 13:41
@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch 2 times, most recently from 8d64734 to 126eac3CompareFebruary 2, 2023 20:16
@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from 126eac3 to cb467e6CompareFebruary 14, 2023 18:08
@snjypl
snjypl marked this pull request as ready for review February 14, 2023 20:43
@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from cb467e6 to 66fa891CompareFebruary 14, 2023 20:43
@potiuk

Copy link
Copy Markdown
Member

Sorry, i have not looked at this before, I want to have a closer look at that after we discuss the approach i proposed in #29513 (comment). - I have a feeling that once we agree this is a good idea and we apply it here, we might implement some simple refactor that will let us avoid any complexity (but it's too late for me now to think clearly).

@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from 66fa891 to 1ae8161CompareFebruary 27, 2023 07:03
@potiuk
potiukforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from 1ae8161 to 4871031CompareFebruary 27, 2023 20:39
@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch 4 times, most recently from 700c17f to ef555caCompareMarch 2, 2023 18:51
@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from ef555ca to f48fdf4CompareMarch 9, 2023 15:13

@potiukpotiuk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@potiuk
potiuk merged commit 5c15b23 into apache:mainMar 12, 2023
@snjypl
snjypl deleted the 28615-aip-44-mirgate-dagbag.sync_to_db branch March 15, 2023 14:19
@pierrejeambrunpierrejeambrun added the AIP-44 Airflow Internal API label Mar 22, 2023
@pierrejeambrunpierrejeambrun added this to the Airflow 2.6.0 milestone Mar 22, 2023
@pierrejeambrunpierrejeambrun added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Mar 22, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AIP-44Airflow Internal APIarea:Schedulerincluding HA (high availability) schedulerchangelog:skipChanges that should be skipped from the changelog (CI, tests, etc..)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AIP-44 Migrate Dagbag.sync_to_db to internal API.

5 participants

@snjypl@mhenc@potiuk@vincbeck@pierrejeambrun
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

AIP-44 Migrate Dagbag.sync_to_db to internal API. - #29188

Merged
potiuk merged 2 commits into
apache:mainfrom
snjypl:28615-aip-44-mirgate-dagbag.sync_to_db
Mar 12, 2023
Merged

AIP-44 Migrate Dagbag.sync_to_db to internal API.#29188
potiuk merged 2 commits into
apache:mainfrom
snjypl:28615-aip-44-mirgate-dagbag.sync_to_db

Conversation

@snjypl

Copy link
Copy Markdown
Contributor

Fixes: #28615


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@boring-cyborgboring-cyborgBot added the area:Scheduler including HA (high availability) scheduler label Jan 26, 2023
@snjypl

snjypl commented Jan 26, 2023

Copy link
Copy Markdown
ContributorAuthor

Hi Team @potiuk@mhenc@vincbeck

this task appears to be more complex than i expected. i went through the AIP 44, , and the PRs for the other tasks to get a better understanding.

in AIP-44, i found a reference to the save_dag_to_db method.

This is a new, “heaviest” method that should be exposed by the internal API to the DAG processor. We should be able to serialize all the information stored currently in the DagBag and send it to the Internal API server. The method should be roughly equivalent to: sync_to_db and pickling dags if set. This should be done in a single transaction as a single API call.

based on my understanding so far, i have done a rough refactoring to see if i am in the right direction. it will be really helpful if anyone could take a look at the changes.

From the AIP, i got the impression that we would be sending the serialized dag to the internal api. Will BaseSerialization.serialize in the internal_api_call decorator take care about the serialization?

@snjypl

Copy link
Copy Markdown
ContributorAuthor

i tried the below code to check the serialization/deserialization:

from airflow.models.dagbag import DagBag
from airflow.serialization.serialized_objects import BaseSerialization,SerializedDAG
dagbag = DagBag('/opt/airflow/dags')
BaseSerialization.deserialize(BaseSerialization.serialize(dagbag.dags))

but i got this error:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/airflow/.local/lib/python3.7/site-packages/airflow/serialization/serialized_objects.py", line 475, in deserialize
return {k: cls.deserialize(v) for k, v in var.items()}
File "/home/airflow/.local/lib/python3.7/site-packages/airflow/serialization/serialized_objects.py", line 475, in <dictcomp>
return {k: cls.deserialize(v) for k, v in var.items()}
File "/home/airflow/.local/lib/python3.7/site-packages/airflow/serialization/serialized_objects.py", line 471, in deserialize
var = encoded_var[Encoding.VAR]
KeyError: <Encoding.VAR: '__var'>

@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from 8ec3f0d to 94a1999CompareJanuary 27, 2023 11:49
Comment threadairflow/dag_processing/processor.py Outdated
@mhenc

mhenc commented Feb 1, 2023

Copy link
Copy Markdown
Contributor

From the AIP, i got the impression that we would be sending the serialized dag to the internal api. Will BaseSerialization.serialize in the internal_api_call decorator take care about the serialization?

Yes, the InternalApi decorator/server serializes/deserializes the objects using BaseSerialization.

https://github.com/apache/airflow/blob/main/airflow/api_internal/internal_api_call.py#L107

I see that you have problems serializing dags, which is dict[String,DAG]. We may need to extend the BaseSerialization to support it. Let me take a look.

@mhenc

mhenc commented Feb 1, 2023

Copy link
Copy Markdown
Contributor

Regarding dags: dict[String, Dag] serialization/deserialization:
I found that there is a code for it:
https://github.com/apache/airflow/blob/main/airflow/serialization/serialized_objects.py#L415
and
https://github.com/apache/airflow/blob/main/airflow/serialization/serialized_objects.py#L476

But for some reason the serialized object doesn't contain "__type"="dag" so the deserialization doesn't work as expected.
This can be easily fixed by changing line

return SerializedDAG.serialize_dag(var)

https://github.com/apache/airflow/blob/main/airflow/serialization/serialized_objects.py#L415
to

return cls._encode(SerializedDAG.serialize_dag(var), type_=DAT.DAG)

at least it worked for me.

But I am not sure if it won't break something.

@potiuk@ashb do you have any idea why it is like that? is this code used anywhere?
Note that there are similar cases (like return SerializedBaseOperator.serialize_mapped_operator(var) few lines below).

@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch 2 times, most recently from 8ef6e37 to 2804486CompareFebruary 2, 2023 13:41
@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch 2 times, most recently from 8d64734 to 126eac3CompareFebruary 2, 2023 20:16
@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from 126eac3 to cb467e6CompareFebruary 14, 2023 18:08
@snjypl
snjypl marked this pull request as ready for review February 14, 2023 20:43
@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from cb467e6 to 66fa891CompareFebruary 14, 2023 20:43
@potiuk

Copy link
Copy Markdown
Member

Sorry, i have not looked at this before, I want to have a closer look at that after we discuss the approach i proposed in #29513 (comment). - I have a feeling that once we agree this is a good idea and we apply it here, we might implement some simple refactor that will let us avoid any complexity (but it's too late for me now to think clearly).

@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from 66fa891 to 1ae8161CompareFebruary 27, 2023 07:03
@potiuk
potiukforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from 1ae8161 to 4871031CompareFebruary 27, 2023 20:39
@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch 4 times, most recently from 700c17f to ef555caCompareMarch 2, 2023 18:51
@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from ef555ca to f48fdf4CompareMarch 9, 2023 15:13

@potiukpotiuk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@potiuk
potiuk merged commit 5c15b23 into apache:mainMar 12, 2023
@snjypl
snjypl deleted the 28615-aip-44-mirgate-dagbag.sync_to_db branch March 15, 2023 14:19
@pierrejeambrunpierrejeambrun added the AIP-44 Airflow Internal API label Mar 22, 2023
@pierrejeambrunpierrejeambrun added this to the Airflow 2.6.0 milestone Mar 22, 2023
@pierrejeambrunpierrejeambrun added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Mar 22, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AIP-44Airflow Internal APIarea:Schedulerincluding HA (high availability) schedulerchangelog:skipChanges that should be skipped from the changelog (CI, tests, etc..)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AIP-44 Migrate Dagbag.sync_to_db to internal API.

5 participants

@snjypl@mhenc@potiuk@vincbeck@pierrejeambrun
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

AIP-44 Migrate Dagbag.sync_to_db to internal API. - #29188

Merged
potiuk merged 2 commits into
apache:mainfrom
snjypl:28615-aip-44-mirgate-dagbag.sync_to_db
Mar 12, 2023
Merged

AIP-44 Migrate Dagbag.sync_to_db to internal API.#29188
potiuk merged 2 commits into
apache:mainfrom
snjypl:28615-aip-44-mirgate-dagbag.sync_to_db

Conversation

@snjypl

Copy link
Copy Markdown
Contributor

Fixes: #28615


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@boring-cyborgboring-cyborgBot added the area:Scheduler including HA (high availability) scheduler label Jan 26, 2023
@snjypl

snjypl commented Jan 26, 2023

Copy link
Copy Markdown
ContributorAuthor

Hi Team @potiuk@mhenc@vincbeck

this task appears to be more complex than i expected. i went through the AIP 44, , and the PRs for the other tasks to get a better understanding.

in AIP-44, i found a reference to the save_dag_to_db method.

This is a new, “heaviest” method that should be exposed by the internal API to the DAG processor. We should be able to serialize all the information stored currently in the DagBag and send it to the Internal API server. The method should be roughly equivalent to: sync_to_db and pickling dags if set. This should be done in a single transaction as a single API call.

based on my understanding so far, i have done a rough refactoring to see if i am in the right direction. it will be really helpful if anyone could take a look at the changes.

From the AIP, i got the impression that we would be sending the serialized dag to the internal api. Will BaseSerialization.serialize in the internal_api_call decorator take care about the serialization?

@snjypl

Copy link
Copy Markdown
ContributorAuthor

i tried the below code to check the serialization/deserialization:

from airflow.models.dagbag import DagBag
from airflow.serialization.serialized_objects import BaseSerialization,SerializedDAG
dagbag = DagBag('/opt/airflow/dags')
BaseSerialization.deserialize(BaseSerialization.serialize(dagbag.dags))

but i got this error:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/airflow/.local/lib/python3.7/site-packages/airflow/serialization/serialized_objects.py", line 475, in deserialize
return {k: cls.deserialize(v) for k, v in var.items()}
File "/home/airflow/.local/lib/python3.7/site-packages/airflow/serialization/serialized_objects.py", line 475, in <dictcomp>
return {k: cls.deserialize(v) for k, v in var.items()}
File "/home/airflow/.local/lib/python3.7/site-packages/airflow/serialization/serialized_objects.py", line 471, in deserialize
var = encoded_var[Encoding.VAR]
KeyError: <Encoding.VAR: '__var'>

@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from 8ec3f0d to 94a1999CompareJanuary 27, 2023 11:49
Comment threadairflow/dag_processing/processor.py Outdated
@mhenc

mhenc commented Feb 1, 2023

Copy link
Copy Markdown
Contributor

From the AIP, i got the impression that we would be sending the serialized dag to the internal api. Will BaseSerialization.serialize in the internal_api_call decorator take care about the serialization?

Yes, the InternalApi decorator/server serializes/deserializes the objects using BaseSerialization.

https://github.com/apache/airflow/blob/main/airflow/api_internal/internal_api_call.py#L107

I see that you have problems serializing dags, which is dict[String,DAG]. We may need to extend the BaseSerialization to support it. Let me take a look.

@mhenc

mhenc commented Feb 1, 2023

Copy link
Copy Markdown
Contributor

Regarding dags: dict[String, Dag] serialization/deserialization:
I found that there is a code for it:
https://github.com/apache/airflow/blob/main/airflow/serialization/serialized_objects.py#L415
and
https://github.com/apache/airflow/blob/main/airflow/serialization/serialized_objects.py#L476

But for some reason the serialized object doesn't contain "__type"="dag" so the deserialization doesn't work as expected.
This can be easily fixed by changing line

return SerializedDAG.serialize_dag(var)

https://github.com/apache/airflow/blob/main/airflow/serialization/serialized_objects.py#L415
to

return cls._encode(SerializedDAG.serialize_dag(var), type_=DAT.DAG)

at least it worked for me.

But I am not sure if it won't break something.

@potiuk@ashb do you have any idea why it is like that? is this code used anywhere?
Note that there are similar cases (like return SerializedBaseOperator.serialize_mapped_operator(var) few lines below).

@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch 2 times, most recently from 8ef6e37 to 2804486CompareFebruary 2, 2023 13:41
@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch 2 times, most recently from 8d64734 to 126eac3CompareFebruary 2, 2023 20:16
@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from 126eac3 to cb467e6CompareFebruary 14, 2023 18:08
@snjypl
snjypl marked this pull request as ready for review February 14, 2023 20:43
@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from cb467e6 to 66fa891CompareFebruary 14, 2023 20:43
@potiuk

Copy link
Copy Markdown
Member

Sorry, i have not looked at this before, I want to have a closer look at that after we discuss the approach i proposed in #29513 (comment). - I have a feeling that once we agree this is a good idea and we apply it here, we might implement some simple refactor that will let us avoid any complexity (but it's too late for me now to think clearly).

@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from 66fa891 to 1ae8161CompareFebruary 27, 2023 07:03
@potiuk
potiukforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from 1ae8161 to 4871031CompareFebruary 27, 2023 20:39
@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch 4 times, most recently from 700c17f to ef555caCompareMarch 2, 2023 18:51
@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from ef555ca to f48fdf4CompareMarch 9, 2023 15:13

@potiukpotiuk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@potiuk
potiuk merged commit 5c15b23 into apache:mainMar 12, 2023
@snjypl
snjypl deleted the 28615-aip-44-mirgate-dagbag.sync_to_db branch March 15, 2023 14:19
@pierrejeambrunpierrejeambrun added the AIP-44 Airflow Internal API label Mar 22, 2023
@pierrejeambrunpierrejeambrun added this to the Airflow 2.6.0 milestone Mar 22, 2023
@pierrejeambrunpierrejeambrun added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Mar 22, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AIP-44Airflow Internal APIarea:Schedulerincluding HA (high availability) schedulerchangelog:skipChanges that should be skipped from the changelog (CI, tests, etc..)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AIP-44 Migrate Dagbag.sync_to_db to internal API.

5 participants

@snjypl@mhenc@potiuk@vincbeck@pierrejeambrun
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

AIP-44 Migrate Dagbag.sync_to_db to internal API. - #29188

Merged
potiuk merged 2 commits into
apache:mainfrom
snjypl:28615-aip-44-mirgate-dagbag.sync_to_db
Mar 12, 2023
Merged

AIP-44 Migrate Dagbag.sync_to_db to internal API.#29188
potiuk merged 2 commits into
apache:mainfrom
snjypl:28615-aip-44-mirgate-dagbag.sync_to_db

Conversation

@snjypl

Copy link
Copy Markdown
Contributor

Fixes: #28615


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@boring-cyborgboring-cyborgBot added the area:Scheduler including HA (high availability) scheduler label Jan 26, 2023
@snjypl

snjypl commented Jan 26, 2023

Copy link
Copy Markdown
ContributorAuthor

Hi Team @potiuk@mhenc@vincbeck

this task appears to be more complex than i expected. i went through the AIP 44, , and the PRs for the other tasks to get a better understanding.

in AIP-44, i found a reference to the save_dag_to_db method.

This is a new, “heaviest” method that should be exposed by the internal API to the DAG processor. We should be able to serialize all the information stored currently in the DagBag and send it to the Internal API server. The method should be roughly equivalent to: sync_to_db and pickling dags if set. This should be done in a single transaction as a single API call.

based on my understanding so far, i have done a rough refactoring to see if i am in the right direction. it will be really helpful if anyone could take a look at the changes.

From the AIP, i got the impression that we would be sending the serialized dag to the internal api. Will BaseSerialization.serialize in the internal_api_call decorator take care about the serialization?

@snjypl

Copy link
Copy Markdown
ContributorAuthor

i tried the below code to check the serialization/deserialization:

from airflow.models.dagbag import DagBag
from airflow.serialization.serialized_objects import BaseSerialization,SerializedDAG
dagbag = DagBag('/opt/airflow/dags')
BaseSerialization.deserialize(BaseSerialization.serialize(dagbag.dags))

but i got this error:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/airflow/.local/lib/python3.7/site-packages/airflow/serialization/serialized_objects.py", line 475, in deserialize
return {k: cls.deserialize(v) for k, v in var.items()}
File "/home/airflow/.local/lib/python3.7/site-packages/airflow/serialization/serialized_objects.py", line 475, in <dictcomp>
return {k: cls.deserialize(v) for k, v in var.items()}
File "/home/airflow/.local/lib/python3.7/site-packages/airflow/serialization/serialized_objects.py", line 471, in deserialize
var = encoded_var[Encoding.VAR]
KeyError: <Encoding.VAR: '__var'>

@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from 8ec3f0d to 94a1999CompareJanuary 27, 2023 11:49
Comment threadairflow/dag_processing/processor.py Outdated
@mhenc

mhenc commented Feb 1, 2023

Copy link
Copy Markdown
Contributor

From the AIP, i got the impression that we would be sending the serialized dag to the internal api. Will BaseSerialization.serialize in the internal_api_call decorator take care about the serialization?

Yes, the InternalApi decorator/server serializes/deserializes the objects using BaseSerialization.

https://github.com/apache/airflow/blob/main/airflow/api_internal/internal_api_call.py#L107

I see that you have problems serializing dags, which is dict[String,DAG]. We may need to extend the BaseSerialization to support it. Let me take a look.

@mhenc

mhenc commented Feb 1, 2023

Copy link
Copy Markdown
Contributor

Regarding dags: dict[String, Dag] serialization/deserialization:
I found that there is a code for it:
https://github.com/apache/airflow/blob/main/airflow/serialization/serialized_objects.py#L415
and
https://github.com/apache/airflow/blob/main/airflow/serialization/serialized_objects.py#L476

But for some reason the serialized object doesn't contain "__type"="dag" so the deserialization doesn't work as expected.
This can be easily fixed by changing line

return SerializedDAG.serialize_dag(var)

https://github.com/apache/airflow/blob/main/airflow/serialization/serialized_objects.py#L415
to

return cls._encode(SerializedDAG.serialize_dag(var), type_=DAT.DAG)

at least it worked for me.

But I am not sure if it won't break something.

@potiuk@ashb do you have any idea why it is like that? is this code used anywhere?
Note that there are similar cases (like return SerializedBaseOperator.serialize_mapped_operator(var) few lines below).

@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch 2 times, most recently from 8ef6e37 to 2804486CompareFebruary 2, 2023 13:41
@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch 2 times, most recently from 8d64734 to 126eac3CompareFebruary 2, 2023 20:16
@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from 126eac3 to cb467e6CompareFebruary 14, 2023 18:08
@snjypl
snjypl marked this pull request as ready for review February 14, 2023 20:43
@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from cb467e6 to 66fa891CompareFebruary 14, 2023 20:43
@potiuk

Copy link
Copy Markdown
Member

Sorry, i have not looked at this before, I want to have a closer look at that after we discuss the approach i proposed in #29513 (comment). - I have a feeling that once we agree this is a good idea and we apply it here, we might implement some simple refactor that will let us avoid any complexity (but it's too late for me now to think clearly).

@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from 66fa891 to 1ae8161CompareFebruary 27, 2023 07:03
@potiuk
potiukforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from 1ae8161 to 4871031CompareFebruary 27, 2023 20:39
@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch 4 times, most recently from 700c17f to ef555caCompareMarch 2, 2023 18:51
@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from ef555ca to f48fdf4CompareMarch 9, 2023 15:13

@potiukpotiuk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@potiuk
potiuk merged commit 5c15b23 into apache:mainMar 12, 2023
@snjypl
snjypl deleted the 28615-aip-44-mirgate-dagbag.sync_to_db branch March 15, 2023 14:19
@pierrejeambrunpierrejeambrun added the AIP-44 Airflow Internal API label Mar 22, 2023
@pierrejeambrunpierrejeambrun added this to the Airflow 2.6.0 milestone Mar 22, 2023
@pierrejeambrunpierrejeambrun added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Mar 22, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AIP-44Airflow Internal APIarea:Schedulerincluding HA (high availability) schedulerchangelog:skipChanges that should be skipped from the changelog (CI, tests, etc..)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AIP-44 Migrate Dagbag.sync_to_db to internal API.

5 participants

@snjypl@mhenc@potiuk@vincbeck@pierrejeambrun
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

AIP-44 Migrate Dagbag.sync_to_db to internal API. - #29188

Merged
potiuk merged 2 commits into
apache:mainfrom
snjypl:28615-aip-44-mirgate-dagbag.sync_to_db
Mar 12, 2023
Merged

AIP-44 Migrate Dagbag.sync_to_db to internal API.#29188
potiuk merged 2 commits into
apache:mainfrom
snjypl:28615-aip-44-mirgate-dagbag.sync_to_db

Conversation

@snjypl

Copy link
Copy Markdown
Contributor

Fixes: #28615


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@boring-cyborgboring-cyborgBot added the area:Scheduler including HA (high availability) scheduler label Jan 26, 2023
@snjypl

snjypl commented Jan 26, 2023

Copy link
Copy Markdown
ContributorAuthor

Hi Team @potiuk@mhenc@vincbeck

this task appears to be more complex than i expected. i went through the AIP 44, , and the PRs for the other tasks to get a better understanding.

in AIP-44, i found a reference to the save_dag_to_db method.

This is a new, “heaviest” method that should be exposed by the internal API to the DAG processor. We should be able to serialize all the information stored currently in the DagBag and send it to the Internal API server. The method should be roughly equivalent to: sync_to_db and pickling dags if set. This should be done in a single transaction as a single API call.

based on my understanding so far, i have done a rough refactoring to see if i am in the right direction. it will be really helpful if anyone could take a look at the changes.

From the AIP, i got the impression that we would be sending the serialized dag to the internal api. Will BaseSerialization.serialize in the internal_api_call decorator take care about the serialization?

@snjypl

Copy link
Copy Markdown
ContributorAuthor

i tried the below code to check the serialization/deserialization:

from airflow.models.dagbag import DagBag
from airflow.serialization.serialized_objects import BaseSerialization,SerializedDAG
dagbag = DagBag('/opt/airflow/dags')
BaseSerialization.deserialize(BaseSerialization.serialize(dagbag.dags))

but i got this error:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/airflow/.local/lib/python3.7/site-packages/airflow/serialization/serialized_objects.py", line 475, in deserialize
return {k: cls.deserialize(v) for k, v in var.items()}
File "/home/airflow/.local/lib/python3.7/site-packages/airflow/serialization/serialized_objects.py", line 475, in <dictcomp>
return {k: cls.deserialize(v) for k, v in var.items()}
File "/home/airflow/.local/lib/python3.7/site-packages/airflow/serialization/serialized_objects.py", line 471, in deserialize
var = encoded_var[Encoding.VAR]
KeyError: <Encoding.VAR: '__var'>

@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from 8ec3f0d to 94a1999CompareJanuary 27, 2023 11:49
Comment threadairflow/dag_processing/processor.py Outdated
@mhenc

mhenc commented Feb 1, 2023

Copy link
Copy Markdown
Contributor

From the AIP, i got the impression that we would be sending the serialized dag to the internal api. Will BaseSerialization.serialize in the internal_api_call decorator take care about the serialization?

Yes, the InternalApi decorator/server serializes/deserializes the objects using BaseSerialization.

https://github.com/apache/airflow/blob/main/airflow/api_internal/internal_api_call.py#L107

I see that you have problems serializing dags, which is dict[String,DAG]. We may need to extend the BaseSerialization to support it. Let me take a look.

@mhenc

mhenc commented Feb 1, 2023

Copy link
Copy Markdown
Contributor

Regarding dags: dict[String, Dag] serialization/deserialization:
I found that there is a code for it:
https://github.com/apache/airflow/blob/main/airflow/serialization/serialized_objects.py#L415
and
https://github.com/apache/airflow/blob/main/airflow/serialization/serialized_objects.py#L476

But for some reason the serialized object doesn't contain "__type"="dag" so the deserialization doesn't work as expected.
This can be easily fixed by changing line

return SerializedDAG.serialize_dag(var)

https://github.com/apache/airflow/blob/main/airflow/serialization/serialized_objects.py#L415
to

return cls._encode(SerializedDAG.serialize_dag(var), type_=DAT.DAG)

at least it worked for me.

But I am not sure if it won't break something.

@potiuk@ashb do you have any idea why it is like that? is this code used anywhere?
Note that there are similar cases (like return SerializedBaseOperator.serialize_mapped_operator(var) few lines below).

@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch 2 times, most recently from 8ef6e37 to 2804486CompareFebruary 2, 2023 13:41
@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch 2 times, most recently from 8d64734 to 126eac3CompareFebruary 2, 2023 20:16
@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from 126eac3 to cb467e6CompareFebruary 14, 2023 18:08
@snjypl
snjypl marked this pull request as ready for review February 14, 2023 20:43
@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from cb467e6 to 66fa891CompareFebruary 14, 2023 20:43
@potiuk

Copy link
Copy Markdown
Member

Sorry, i have not looked at this before, I want to have a closer look at that after we discuss the approach i proposed in #29513 (comment). - I have a feeling that once we agree this is a good idea and we apply it here, we might implement some simple refactor that will let us avoid any complexity (but it's too late for me now to think clearly).

@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from 66fa891 to 1ae8161CompareFebruary 27, 2023 07:03
@potiuk
potiukforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from 1ae8161 to 4871031CompareFebruary 27, 2023 20:39
@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch 4 times, most recently from 700c17f to ef555caCompareMarch 2, 2023 18:51
@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from ef555ca to f48fdf4CompareMarch 9, 2023 15:13

@potiukpotiuk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@potiuk
potiuk merged commit 5c15b23 into apache:mainMar 12, 2023
@snjypl
snjypl deleted the 28615-aip-44-mirgate-dagbag.sync_to_db branch March 15, 2023 14:19
@pierrejeambrunpierrejeambrun added the AIP-44 Airflow Internal API label Mar 22, 2023
@pierrejeambrunpierrejeambrun added this to the Airflow 2.6.0 milestone Mar 22, 2023
@pierrejeambrunpierrejeambrun added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Mar 22, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AIP-44Airflow Internal APIarea:Schedulerincluding HA (high availability) schedulerchangelog:skipChanges that should be skipped from the changelog (CI, tests, etc..)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AIP-44 Migrate Dagbag.sync_to_db to internal API.

5 participants

@snjypl@mhenc@potiuk@vincbeck@pierrejeambrun
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

AIP-44 Migrate Dagbag.sync_to_db to internal API. - #29188

Merged
potiuk merged 2 commits into
apache:mainfrom
snjypl:28615-aip-44-mirgate-dagbag.sync_to_db
Mar 12, 2023
Merged

AIP-44 Migrate Dagbag.sync_to_db to internal API.#29188
potiuk merged 2 commits into
apache:mainfrom
snjypl:28615-aip-44-mirgate-dagbag.sync_to_db

Conversation

@snjypl

Copy link
Copy Markdown
Contributor

Fixes: #28615


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@boring-cyborgboring-cyborgBot added the area:Scheduler including HA (high availability) scheduler label Jan 26, 2023
@snjypl

snjypl commented Jan 26, 2023

Copy link
Copy Markdown
ContributorAuthor

Hi Team @potiuk@mhenc@vincbeck

this task appears to be more complex than i expected. i went through the AIP 44, , and the PRs for the other tasks to get a better understanding.

in AIP-44, i found a reference to the save_dag_to_db method.

This is a new, “heaviest” method that should be exposed by the internal API to the DAG processor. We should be able to serialize all the information stored currently in the DagBag and send it to the Internal API server. The method should be roughly equivalent to: sync_to_db and pickling dags if set. This should be done in a single transaction as a single API call.

based on my understanding so far, i have done a rough refactoring to see if i am in the right direction. it will be really helpful if anyone could take a look at the changes.

From the AIP, i got the impression that we would be sending the serialized dag to the internal api. Will BaseSerialization.serialize in the internal_api_call decorator take care about the serialization?

@snjypl

Copy link
Copy Markdown
ContributorAuthor

i tried the below code to check the serialization/deserialization:

from airflow.models.dagbag import DagBag
from airflow.serialization.serialized_objects import BaseSerialization,SerializedDAG
dagbag = DagBag('/opt/airflow/dags')
BaseSerialization.deserialize(BaseSerialization.serialize(dagbag.dags))

but i got this error:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/airflow/.local/lib/python3.7/site-packages/airflow/serialization/serialized_objects.py", line 475, in deserialize
return {k: cls.deserialize(v) for k, v in var.items()}
File "/home/airflow/.local/lib/python3.7/site-packages/airflow/serialization/serialized_objects.py", line 475, in <dictcomp>
return {k: cls.deserialize(v) for k, v in var.items()}
File "/home/airflow/.local/lib/python3.7/site-packages/airflow/serialization/serialized_objects.py", line 471, in deserialize
var = encoded_var[Encoding.VAR]
KeyError: <Encoding.VAR: '__var'>

@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from 8ec3f0d to 94a1999CompareJanuary 27, 2023 11:49
Comment threadairflow/dag_processing/processor.py Outdated
@mhenc

mhenc commented Feb 1, 2023

Copy link
Copy Markdown
Contributor

From the AIP, i got the impression that we would be sending the serialized dag to the internal api. Will BaseSerialization.serialize in the internal_api_call decorator take care about the serialization?

Yes, the InternalApi decorator/server serializes/deserializes the objects using BaseSerialization.

https://github.com/apache/airflow/blob/main/airflow/api_internal/internal_api_call.py#L107

I see that you have problems serializing dags, which is dict[String,DAG]. We may need to extend the BaseSerialization to support it. Let me take a look.

@mhenc

mhenc commented Feb 1, 2023

Copy link
Copy Markdown
Contributor

Regarding dags: dict[String, Dag] serialization/deserialization:
I found that there is a code for it:
https://github.com/apache/airflow/blob/main/airflow/serialization/serialized_objects.py#L415
and
https://github.com/apache/airflow/blob/main/airflow/serialization/serialized_objects.py#L476

But for some reason the serialized object doesn't contain "__type"="dag" so the deserialization doesn't work as expected.
This can be easily fixed by changing line

return SerializedDAG.serialize_dag(var)

https://github.com/apache/airflow/blob/main/airflow/serialization/serialized_objects.py#L415
to

return cls._encode(SerializedDAG.serialize_dag(var), type_=DAT.DAG)

at least it worked for me.

But I am not sure if it won't break something.

@potiuk@ashb do you have any idea why it is like that? is this code used anywhere?
Note that there are similar cases (like return SerializedBaseOperator.serialize_mapped_operator(var) few lines below).

@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch 2 times, most recently from 8ef6e37 to 2804486CompareFebruary 2, 2023 13:41
@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch 2 times, most recently from 8d64734 to 126eac3CompareFebruary 2, 2023 20:16
@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from 126eac3 to cb467e6CompareFebruary 14, 2023 18:08
@snjypl
snjypl marked this pull request as ready for review February 14, 2023 20:43
@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from cb467e6 to 66fa891CompareFebruary 14, 2023 20:43
@potiuk

Copy link
Copy Markdown
Member

Sorry, i have not looked at this before, I want to have a closer look at that after we discuss the approach i proposed in #29513 (comment). - I have a feeling that once we agree this is a good idea and we apply it here, we might implement some simple refactor that will let us avoid any complexity (but it's too late for me now to think clearly).

@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from 66fa891 to 1ae8161CompareFebruary 27, 2023 07:03
@potiuk
potiukforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from 1ae8161 to 4871031CompareFebruary 27, 2023 20:39
@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch 4 times, most recently from 700c17f to ef555caCompareMarch 2, 2023 18:51
@snjypl
snjyplforce-pushed the 28615-aip-44-mirgate-dagbag.sync_to_db branch from ef555ca to f48fdf4CompareMarch 9, 2023 15:13

@potiukpotiuk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@potiuk
potiuk merged commit 5c15b23 into apache:mainMar 12, 2023
@snjypl
snjypl deleted the 28615-aip-44-mirgate-dagbag.sync_to_db branch March 15, 2023 14:19
@pierrejeambrunpierrejeambrun added the AIP-44 Airflow Internal API label Mar 22, 2023
@pierrejeambrunpierrejeambrun added this to the Airflow 2.6.0 milestone Mar 22, 2023
@pierrejeambrunpierrejeambrun added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Mar 22, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AIP-44Airflow Internal APIarea:Schedulerincluding HA (high availability) schedulerchangelog:skipChanges that should be skipped from the changelog (CI, tests, etc..)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AIP-44 Migrate Dagbag.sync_to_db to internal API.

5 participants

@snjypl@mhenc@potiuk@vincbeck@pierrejeambrun