Skip to content

Conversation

@vincbeck
Copy link
Contributor

logical_date is nullable now. The system test example_sqs is failing for that reason, see error below.


ERROR    airflow.sdk.definitions._internal.abstractoperator:abstractoperator.py:376 Exception rendering Jinja template for task 'publish_to_queue_1', field 'message_content'. Template: '{{ task_instance }}-{{ logical_date }}'
--
4830 | Traceback (most recent call last):
4831 | File "/opt/airflow/task_sdk/src/airflow/sdk/definitions/_internal/abstractoperator.py", line 373, in _do_render_template_fields
4832 | rendered_content = self.render_template(value, context, jinja_env, seen_oids)
4833 | File "/opt/airflow/task_sdk/src/airflow/sdk/definitions/_internal/templater.py", line 177, in render_template
4834 | return self._render(template, context)
4835 | File "/opt/airflow/task_sdk/src/airflow/sdk/definitions/_internal/abstractoperator.py", line 334, in _render
4836 | return super()._render(template, context, dag=dag)
4837 | File "/opt/airflow/task_sdk/src/airflow/sdk/definitions/_internal/templater.py", line 133, in _render
4838 | return render_template_to_string(template, context)
4839 | File "/opt/airflow/airflow/utils/helpers.py", line 301, in render_template_to_string
4840 | return render_template(template, cast(MutableMapping[str, Any], context), native=False)
4841 | File "/opt/airflow/airflow/utils/helpers.py", line 296, in render_template
4842 | return "".join(nodes)
4843 | File "<template>", line 15, in root
4844 | File "/usr/local/lib/python3.9/site-packages/jinja2/runtime.py", line 859, in _fail_with_undefined_error
4845 | raise self._undefined_exception(self._undefined_message)
4846 | jinja2.exceptions.UndefinedError: 'logical_date' is undefined



^ 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-cyborg boring-cyborg bot added the provider:amazon AWS/Amazon - related issues label Feb 12, 2025
Copy link
Contributor

@ferruzzi ferruzzi left a comment

Choose a reason for hiding this comment

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

While I agree that the logical_date wasn't a necessary part of the test, we may want to look into why it is no longer available after the package move, or if the timing is just coincidental.

@vincbeck
Copy link
Contributor Author

While I agree that the logical_date wasn't a necessary part of the test, we may want to look into why it is no longer available after the package move, or if the timing is just coincidental.

I should have specified it but it is not due to the restructure but just changes made recently in main

@vincbeck vincbeck merged commit 1e2f14c into apache:main Feb 12, 2025
60 of 61 checks passed
@vincbeck vincbeck deleted the vincbeck/sqs branch February 12, 2025 20:40
ambika-garg pushed a commit to ambika-garg/airflow that referenced this pull request Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

provider:amazon AWS/Amazon - related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants