Commit Graph

88948 Commits

Author SHA1 Message Date
Sam Ruby
1437ff7899 Sorry I didn't catch these the first time, but two more... 2023-09-16 15:22:21 -04:00
Jean Boussier
65f43d7530
Merge pull request #49292 from victormours/clarify-backoff-strategy-for-activejob-retries
Clarify that the default retry strategy uses polynomial backoff instead of exponential backoff
2023-09-16 21:02:21 +02:00
Jean Boussier
8bd463c0b7
Merge pull request #49299 from BuonOmo/loosen-arel-test
Loosen test condition `Arel::Nodes::Node` descendants
2023-09-16 20:45:01 +02:00
Jonathan Hefner
4960de32d0
Merge pull request #49305 from rubys/bun-v
Consistency/semantics: BUN_VERSION vs bun-v
2023-09-16 13:12:39 -05:00
Sam Ruby
e21856f783 Consistency/semantics: BUN_VERSION vs bun-v
All the other VERSION ARGS in the Dockerfile are pure version numbers.
Any other additions are handled elsewhere.

Arguably, this is just cosmetic/foolish consistency, but it is a source
of subtle bugs.  For example, the fallback if `bun -version` fails is
defined here:

af1d77abfb/railties/lib/rails/generators/app_base.rb (L19)

Note the _lack_ of bun_v, which ultimately will cause the docker build
to fail.
2023-09-16 13:21:57 -04:00
Jonathan Hefner
af1d77abfb
Merge pull request #49302 from rubys/eliminate-extra-blank-lines-dockerfile
eliminate extra blank lines in dockerfile template
2023-09-16 10:42:25 -05:00
Sam Ruby
48879ee332 eliminate extra blank lines in dockerfile template
The rule should be:
  * one blank line between "stanzas" or groups of lines
  * two blanks lines preceed FROM statements
2023-09-16 10:56:51 -04:00
Ulysse Buonomo
e890ae6c5d
Loosen test condition Arel::Nodes::Node descendants
Dependent gems using this test suit may override further
the default methods.

Fixes #49274
2023-09-15 22:04:37 -05:00
Victor Mours
1bdabc1102 Clarify that the default retry strategy uses polynomial backoff and not exponential backoff 2023-09-16 00:51:14 +02:00
Hartley McGuire
d21d811ffe
Merge pull request #49291 from hungmi/fix-typos-in-action-view-test-case-documentation
[ci skip] Edit anchors in Testing View Partials to match targets
2023-09-15 14:05:27 -04:00
Nick Schwaderer
a50be005ae
Update 7_1_release_notes.md (#49285)
* Update 7_1_release_notes.md

For context see https://github.com/rails/rails/pull/45867

Include in release notes the deprecation of `true` and `false` values
for `config.action_dispatch.show_exceptions` in favor of `:all`,
`:rescuable` and `:none`.

* Update 7_1_release_notes.md

Co-authored-by: Hartley McGuire <skipkayhil@gmail.com>

---------

Co-authored-by: Hartley McGuire <skipkayhil@gmail.com>
Co-authored-by: Rafael Mendonça França <rafael@rubyonrails.org>
2023-09-15 13:52:51 -04:00
hungmi
f4234474e0 Edit anchors in Testing View Partials to match targets 2023-09-16 01:45:15 +08:00
Rafael Mendonça França
3c8e3fe37f
Merge pull request #49288 from seanpdoyle/action-view-guides-shared-partials
Action View: docs use `application/` instead of `shared/`
2023-09-15 13:05:18 -04:00
Rafael Mendonça França
19930b4c63
Merge pull request #49276 from akhilgkrishnan/add-railties-notable
Added new railties notable changes in 7.1 release note [skip ci]
2023-09-15 12:12:12 -04:00
Rafael Mendonça França
93ea1d0219
Merge pull request #49289 from esasse/remove-mispell-docs
Remove misspell references [ci skip]
2023-09-15 12:11:24 -04:00
Sean Doyle
32faee0e52 Action View: docs use application/ instead of shared/
Change mentions of `app/views/shared` in the guides to be
`app/views/application` instead. View partials rely on the same
[Template Inheritance][] as their template counterparts, so the guides
should encourage end-users to benefit from that inheritance.

> This makes `app/views/application/` a great place for your shared
> partials, which can then be rendered in your ERB as such:
>

```html+erb
<%# app/views/admin/products/index.html.erb %>
<%= render @products || "empty_list" %>

<%# app/views/application/_empty_list.html.erb %>
There are no items in this list <em>yet</em>.
```

To enforce that template resolution, this commit also replaces
references to `shared/` with `application/` in the Rails test suite.

[Template Inheritance]: https://guides.rubyonrails.org/layouts_and_rendering.html#template-inheritance
2023-09-15 12:06:22 -04:00
Erick Sasse
7c2e4fc5eb Remove misspell references 2023-09-15 16:02:54 +00:00
Eileen M. Uchitelle
7c9eac6923
Merge pull request #49284 from nikhilbhatt/fix_shard_names_returns_dup_shards
FIX shard_names method returns duplicate shard names
2023-09-15 09:27:16 -04:00
nikhilbhatt
726c2e4672 FIX shard_names returns duplicate shard names 2023-09-15 16:55:37 +05:30
Ryuta Kamizono
9c974caba1
Merge pull request #49280 from p8/railties/ar-dependency
Make GeneratedAttribute work without ActiveRecord
2023-09-15 19:14:34 +09:00
Xavier Noria
29cb2baf92
Merge pull request #48780 from rails/ar-deadlocked
Improve the docs of ActiveRecord::TransactionRollbackError
2023-09-15 11:44:19 +02:00
Jean Boussier
9e4d9c48f1
Merge pull request #49281 from Shopify/fix-error-reporter-assertions
Make ErrorReporterAssertions methods public
2023-09-15 11:23:23 +02:00
Jean Boussier
c15996c1bc Make ErrorReporterAssertions methods public
Since the methods are private they weren't documented.
2023-09-15 10:57:14 +02:00
Petrik
5d31d33860 Make GeneratedAttribute work without ActiveRecord
If GeneratedAttribute is used in a project that doesn't require
ActiveRecord, it should still work.

Co-authored-by: Ryuta Kamizono <kamipo@gmail.com>
2023-09-15 10:02:46 +02:00
Gannon McGibbon
ed9248d4e0
Merge pull request #49265 from gmcgibbon/cpk_tuple_or_querying
Clean up old composite key code
2023-09-14 22:58:44 -05:00
Gannon McGibbon
1111ec052f Clean up old composite key code
Because where now supports tuple querying, we don't need to manually
build queries with where and or statements.
2023-09-14 22:36:18 -05:00
dhh
83f36d5390 Remove duplication from #49278 2023-09-14 15:15:08 -07:00
Rafael Mendonça França
9e34e3bdf8
Merge pull request #49262 from ipc103/transaction-instrumentation-payload-outcome
Add outcome to transaction tracking payload
2023-09-14 18:14:20 -04:00
Rafael Mendonça França
4d4f105e25
Merge pull request #49279 from ghiculescu/documents-formattin
Shorten some of the guide names in the Guides index
2023-09-14 18:13:58 -04:00
David Heinemeier Hansson
757861889d
Ignore env files (except templates) (#49278)
Help prevent security issues out of the box.
2023-09-14 14:53:27 -07:00
Alex Ghiculescu
ccde530867 Shorten some of the guide names in the Guides index 2023-09-15 07:52:59 +10:00
Eileen M. Uchitelle
ff6bf8dd7e
Merge pull request #49277 from akhilgkrishnan/add-missing-dollar-s-gn
Add missing dollar sign for bash script [skip ci]
2023-09-14 14:13:06 -04:00
Akhil G Krishnan
0d3a4ca7e9
Add missing dollar sign for bash script [skip ci] 2023-09-14 17:48:20 +00:00
Akhil G Krishnan
524f485d9e
Added new railties notable changes in 7.1 release note 2023-09-14 17:35:52 +00:00
Hartley McGuire
6ba2bf4fbd
Merge pull request #49275 from akhilgkrishnan/add-missing-dollar
Add missing dollar sign to bash scripts [skip ci]
2023-09-14 13:02:21 -04:00
Akhil G Krishnan
96ff4767bf
Add missing dollar sign to bash scripts 2023-09-14 16:55:46 +00:00
Eileen M. Uchitelle
910eb470c5
Merge pull request #49264 from Shopify/explicitly-configured-primary-key-option-must-take-priority-in-association-primary-key
Explicit `primary_key:` option should always take priority in associations
2023-09-14 11:48:10 -04:00
Eileen M. Uchitelle
ff309346d3
Merge pull request #49268 from ghiculescu/cpk-guide
Add Composite Primary Keys guide to guides index
2023-09-14 11:39:14 -04:00
Ryuta Kamizono
da2af18834
Merge pull request #49269 from aidanharan/batches-test-regex-escape
Regex escape table and column names
2023-09-14 23:23:50 +09:00
Ryuta Kamizono
6d4abdca5d
Merge pull request #47752 from p8/activerecord/keyword-attributes
Raise error when generating attribute with dangerous name
2023-09-14 21:33:06 +09:00
Petrik
99b1316fd9 Raise error when generating attribute with dangerous name
Generating a model with attributes named `hash` or `save` should raise
an error, instead of generating a migration with an invalid attribute.
2023-09-14 12:58:36 +02:00
Aidan Haran
d777f7322e Regex escape table and column names 2023-09-14 10:55:22 +01:00
Ryuta Kamizono
7b670848e1
Merge pull request #49237 from shouichi/active-job-instrumentation-tests
Add tests for AJ events
2023-09-14 16:20:53 +09:00
Shouichi Kamiya
7ff936570b Add tests for AJ events
Because events are documented but not tested.
2023-09-14 16:05:26 +09:00
Ryuta Kamizono
bd3a0d4984
Merge pull request #49258 from p8/activerecord/enum-test-remove-unused-code
Remove unused delete_all from test
2023-09-14 14:48:48 +09:00
Alex
25524826aa Add Composite Primary Keys guide to guides index 2023-09-14 12:32:33 +10:00
Rafael Mendonça França
13b3e7d839
Merge pull request #49193 from seanpdoyle/action-view-test-case-documentation
Add "Testing View Partials" section to the Testing Guides
2023-09-13 19:06:33 -04:00
Nikita Vasilevsky
dcfddc1f90
Explicit primary_key: option should always take priority in associations
This commit fixes the issue where the `primary_key:` option was ignored
if the associated model had a `query_constraints` configured.
Now `primary_key:` option always takes priority and only if there is no
`primary_key:` option, the `query_constraints` are used to determine
the `association_primary_key` value.
2023-09-13 21:12:04 +00:00
Daniel Colson
cf8ab2f4b8
Add outcome to transaction tracking payload
Following up on https://github.com/rails/rails/pull/49192, this commit
adds the transaction `outcome` to the payload, helpful for collecting
stats on how many transactions commit, rollback, restart, or (perhaps
most interestingly) are incomplete because of an error.

The one quirk here is that we have to modify the payload on finish. It's
not the only place this sort of thing happens (instrument mutates the
payload with exceptions, for example), but it does mean we need to dup
the payload we initialize with to avoid mutating it for other tracking.

Co-authored-by: Ian Candy <ipc103@github.com>
2023-09-13 15:30:50 -04:00
Petrik
39f3f96ddb Remove unused delete_all from test
Deleting all books should not effect the inclusion validation.
2023-09-13 21:28:05 +02:00