Skip to content

Reduce pre-commit autoupdate frequency PRs#2544

Merged
tatiana merged 15 commits into
mainfrom
disable-pre-commit-autofix
Apr 8, 2026
Merged

Reduce pre-commit autoupdate frequency PRs#2544
tatiana merged 15 commits into
mainfrom
disable-pre-commit-autofix

Conversation

@tatiana
Copy link
Copy Markdown
Collaborator

@tatiana tatiana commented Apr 8, 2026

Currently, pre-commit-ci[bot] opens PR suggestions on GitHub, and we would like to disable them because it does not respect Astronomer's 7-day cooldown policy. We recently updated Dependabot to manage pre-commit upgrades, so we can safely disable this other configuration.

Related: #2530
Related: #2530

Unfortunately, it seems that, to date, pre-commit[ci] does not offer granularity to disable only the autoupdate PRs. It is also not possible to skip it, since it is not a pre-commit job. The alternative to the change in this PR would be to remove pre-commit[ci] as a GitHub app altogether. This would, however, have the downside of not running pre-commit checks in the CI as we do now, which are quite useful. Therefore, we decided to reduce the frequency of how often this happens - for now - until we have a better solution.

Also fixes failing pre-commit check:

❯ Just pulled the latest changes from main, getting: ruff check....................................................................Failed                            
- hook id: ruff-check                                                                                                                                                
- exit code: 1                                                                                                                                                       
                                                                                                                                                                     
F821 Undefined name `cosmos`                                                                                                                                         
  --> tests/test_log.py:45:25                                                                                                                                        
   |                                                                                                                                                                 
43 | def test_rich_logging_none_message(monkeypatch, caplog):                                                                                                        
44 |     """CosmosRichLogger should not crash when record.msg is None."""                                                                                            
45 |     monkeypatch.setattr(cosmos.log, "rich_logging", True)                                                                                                       
   |                         ^^^^^^                                                                                                                                  
46 |     logger = get_logger("test-none-msg")                                                                                                                        
47 |     with caplog.at_level("INFO"):                                                                                                                               
   |                                                                                                                                                                          

https://results.pre-commit.ci/run/github/577757880/1775638428.KyFU_uV_Q-id7x3hn2tGVg

Currently `pre-commit-ci[bot]` opens PR suggestions in Github and we would like to disable them, since it does not respect
Astronomer's 7 day cooldown policy. We recently updated Dependabot to manage pre-commit upgrades, so we are safe to disable
this other configuration.

Related: #2530
Copilot AI review requested due to automatic review settings April 8, 2026 08:27
@tatiana tatiana requested review from a team, corsettigyg, dwreeves and jbandoro as code owners April 8, 2026 08:27
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to stop pre-commit-ci[bot] from opening automated PRs (autofix/autoupdate), aligning with Astronomer’s 7-day cooldown policy now that Dependabot handles pre-commit upgrades.

Changes:

  • Removed the ci: configuration block from .pre-commit-config.yaml (commit message customization and mypy skip).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .pre-commit-config.yaml
Comment thread .pre-commit-config.yaml
Copilot AI review requested due to automatic review settings April 8, 2026 08:57
@tatiana tatiana added this to the Cosmos 1.14.1 milestone Apr 8, 2026
@tatiana tatiana self-assigned this Apr 8, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .pre-commit-config.yaml Outdated
Co-authored-by: Tatiana Al-Chueyr <tatiana.alchueyr@gmail.com>
Copilot AI review requested due to automatic review settings April 8, 2026 09:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

.pre-commit-config.yaml:149

  • autoupdate_schedule is declared multiple times here (and with different value types). In YAML, duplicate keys mean only the last one takes effect, so this config is ambiguous and may not disable autoupdates as intended. Keep a single autoupdate_schedule entry with the intended value and remove the duplicates.
  skip:
    - mypy # build of https://github.com/pre-commit/mirrors-mypy:types-PyYAML,types-attrs,attrs,types-requests,
    #types-python-dateutil,apache-airflow@v1.5.0 for python@python3 exceeds tier max size 250MiB: 262.6MiB


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tatiana tatiana marked this pull request as draft April 8, 2026 09:08
Comment thread .pre-commit-config.yaml Outdated
Comment thread .pre-commit-config.yaml Outdated
@tatiana tatiana changed the title Disable pre-commit auto-fix PRs Delay pre-commit auto-fix PRs Apr 8, 2026
Comment thread .pre-commit-config.yaml
@tatiana tatiana changed the title Delay pre-commit auto-fix PRs Disable pre-commit autoupdate PRs Apr 8, 2026
Comment thread .pre-commit-config.yaml Outdated
@tatiana tatiana changed the title Disable pre-commit autoupdate PRs Reduce pre-commit autoupdate frequency PRs Apr 8, 2026
Comment thread tests/test_log.py
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.08%. Comparing base (82ec2e5) to head (b3e39ff).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2544      +/-   ##
==========================================
+ Coverage   97.34%   98.08%   +0.74%     
==========================================
  Files         103      103              
  Lines        7484     7484              
==========================================
+ Hits         7285     7341      +56     
+ Misses        199      143      -56     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tatiana tatiana marked this pull request as ready for review April 8, 2026 11:39
Copilot AI review requested due to automatic review settings April 8, 2026 11:39
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tatiana tatiana merged commit 513f0ed into main Apr 8, 2026
88 checks passed
@tatiana tatiana deleted the disable-pre-commit-autofix branch April 8, 2026 11:52
pankajkoti pushed a commit that referenced this pull request Apr 23, 2026
Currently, `pre-commit-ci[bot]` opens PR suggestions on GitHub, and we
would like to disable them because it does not respect Astronomer's
7-day cooldown policy. We recently updated Dependabot to manage
pre-commit upgrades, so we can safely disable this other configuration.

Related: #2530
Related: #2530

Unfortunately, it seems that, to date, pre-commit[ci] does not offer
[granularity to disable only the autoupdate
PRs](pre-commit/pre-commit#2670). It is also
[not possible to skip
it](ddf8375),
since it is not a pre-commit job. The alternative to the change in this
PR would be to remove `pre-commit[ci]` as a GitHub app altogether. This
would, however, have the downside of not running pre-commit checks in
the CI as we do now, which are quite useful. Therefore, we decided to
reduce the frequency of how often this happens - for now - until we have
a better solution.

Also fixes failing `pre-commit` check:

```
❯ Just pulled the latest changes from main, getting: ruff check....................................................................Failed
- hook id: ruff-check
- exit code: 1

F821 Undefined name `cosmos`
  --> tests/test_log.py:45:25
   |
43 | def test_rich_logging_none_message(monkeypatch, caplog):
44 |     """CosmosRichLogger should not crash when record.msg is None."""
45 |     monkeypatch.setattr(cosmos.log, "rich_logging", True)
   |                         ^^^^^^
46 |     logger = get_logger("test-none-msg")
47 |     with caplog.at_level("INFO"):
   |
```

https://results.pre-commit.ci/run/github/577757880/1775638428.KyFU_uV_Q-id7x3hn2tGVg
(cherry picked from commit 513f0ed)
@pankajkoti pankajkoti mentioned this pull request Apr 23, 2026
tatiana pushed a commit that referenced this pull request Apr 23, 2026
Bug Fixes

* Fix ``ExecutionMode.WATCHER`` producer retry behaviour by @tatiana in
#2559
* Prevent watcher producer skip propagating to downstream tasks via
gateway task by @johnhoran and @tatiana in #2597
* Keep watcher sensor polling when producer is still running by
@pankajkoti in #2592
* Fix circular import error in Cosmos plugin discovery under Astro
Runtime by @tatiana in #2538
* Fix ``CosmosRichLogger`` crash on ``None`` log message by @tatiana in
#2540
* Enable inlets and outlets using dbt Fusion on Airflow 3 by
@ichirotakami in #2561
* Fix incorrectly skipped source downstream tasks in
``ExecutionMode.WATCHER`` by @pankajastro in #2563
* Fix duplicate logs in ``dbt build`` when source freshness is enabled
by @pankajastro in #2564
* Warn and normalize when ``source_rendering_behavior=None`` is passed
by @pankajastro in #2570
* Gracefully handle ``Variable.set()`` failures on Astro Remote
Execution by @hkc-8010 in #2573
* Skip malformed YAML selectors instead of failing entirely by
@YourRoyalLinus in #2577

Docs

* Update watcher test behavior docs for Cosmos 1.14.0 by @tatiana in
#2549
* Add redirect for moved partial-parsing docs page by @tatiana in #2550
* Document ``ExecutionMode.WATCHER`` and ``depends_on_past`` limitation
by @tatiana in #2602
* Restore memory-optimised imports docs for Cosmos < 1.14.0 by
@pankajkoti in #2604

Others

* Speed up Airflow 3.1+ integration tests by caching
InProcessExecutionAPI by @pankajkoti in #2547
* Improve stability of cache hash unit tests by @tatiana in #2539
* Fix mypy 1.20.0 type check failures by @pankajkoti in #2546
* Fix CI failures caused by docs build memory exhaustion by @pankajkoti
in #2580
* Fix dbt Fusion broken integration tests by @tatiana in #2581
* Fix flaky ``cosmos_manifest_selectors_example`` DAG in CI by
@pankajkoti in #2593
* Reduce pre-commit autoupdate frequency PRs by @tatiana in #2544
* Bump ``reviewdog/action-actionlint`` from 1.71.0 to 1.72.0 by
@dependabot in #2542
* Skip watcher gateway test on Airflow 3.0 by @tatiana in #2607

closes: astronomer/oss-integrations-private#381
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.

3 participants