WordPress / openverse

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
https://openverse.org
MIT License
256 stars 204 forks source link

Add missing warning arg in `rotate_envfiles` DAG #5074

Closed krysal closed 1 month ago

krysal commented 1 month ago

Fixes

Related to #4954 by @sarayourfriend

Description

When enabling the DAG, I noticed this warning message looked incomplete:

https://github.com/WordPress/openverse/blob/670d4e73a0bd53a90e738547d5330b273b9a455a/catalog/dags/maintenance/rotate_envfiles.py#L93-L96

[2024-10-24, 13:45:51 UTC] {rotate_envfiles.py:94} WARNING - Skipping %s due to lack of tag specifications. This is probably because the launch template was created before tag specifications were properly configured.

For lack of something more expressive, I included the launch template ID and version there, so the message now should look like this:

[2024-10-24, 13:03:11 -04] {rotate_envfiles.py:94} WARNING - Skipping lt-0677c0d672a537f8c:3 due to lack of tag specifications. This is probably because the launch template was created before tag specifications were properly configured.

Testing Instructions

Found them in the linked PR. If you don't set the AWS connection via the airflow UI, you might want to add these environment variables to your .env file for simplicity.

AIRFLOW_CONN_AWS_S3_ENVFILE_ROTATION=aws://<user_id>:<secret>@/?region_name=us-east-1
AIRFLOW_VAR_S3_ENVFILE_ROTATION_AWS_CONN_ID=aws_s3_envfile_rotation

Checklist

[best_practices]: https://git-scm.com/book/en/v2/Distributed-Git-Contributing-to-a-Project#_commit_guidelines

Developer Certificate of Origin

Developer Certificate of Origin ``` Developer Certificate of Origin Version 1.1 Copyright (C) 2004, 2006 The Linux Foundation and its contributors. 1 Letterman Drive Suite D4700 San Francisco, CA, 94129 Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. ```