Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding fix for incorrect log level bug and refactoring entrypoint.py to fix circular dependency issue #215

Merged
merged 4 commits into from
Feb 26, 2025

Conversation

Vraj2725
Copy link
Contributor

@Vraj2725 Vraj2725 commented Feb 7, 2025

Issue #, if available:
When using airflow versions 2.9.2 and above customer are unable to see error logs when they set their loglevel to WARNING or above. The root cause is that in subprocess.py, the line self.process_logger.info(line.decode("utf-8")) overrides the log level coming from airflow stream to INFO in subprocess.py.

Description of changes:

  • Setting prcoess logger level to DEBUG to emit all logs and setting root logger to customer's log level to respect customer's log level.
  • Refactoring entrypoint.py and breaking down its logic into different files so all files have single responsibility such as:
    • user_requirements.py: Installing user requirements.
    • execute_command.py: Logic for executing all the subprocesses
    • setup_environment.py: Running the startup script and setting up environment variables

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@Vraj2725 Vraj2725 requested a review from Kytha February 20, 2025 18:36
@Vraj2725 Vraj2725 changed the title Adding parsing logic for incorrect log level bug Adding fix for incorrect bug and refactoring entrypoint.py to fix circular dependency issue Feb 21, 2025
@Vraj2725
Copy link
Contributor Author

I implemented changes as per Kyle's suggestions. Have updated he description for the same.

Kytha
Kytha previously approved these changes Feb 24, 2025
@Vraj2725 Vraj2725 merged commit f9427c4 into aws:main Feb 26, 2025
1 check passed
@Vraj2725 Vraj2725 changed the title Adding fix for incorrect bug and refactoring entrypoint.py to fix circular dependency issue Adding fix for incorrect log level bug and refactoring entrypoint.py to fix circular dependency issue Feb 26, 2025
Vraj2725 pushed a commit to Vraj2725/amazon-mwaa-docker-images that referenced this pull request Mar 3, 2025
… fix circular dependency issue (aws#215)"

This reverts commit f9427c4.
Vraj2725 added a commit that referenced this pull request Mar 3, 2025
… fix circular dependency issue (#215)" (#225)

… fix circular dependency issue (#215)"

This reverts commit f9427c4.

*Issue #, if available:*

*Description of changes:*
- Reverting this commit because this changes break when we export
customer environment variables in start-up scripts.

By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.

Co-authored-by: Vraj Patel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants