This change adds a section on when to use `sx` vs `styled`. I'm adding
it because it was unclear to me when we should use one over the other.
Hopefully this clears it up and makes it easier for others going
forward.
---------
Co-authored-by: Nuno Góis <github@nunogois.com>
I've held an internal knowledge sharing session on this already. If
someone can think of a better phrasing for the background, I'm all ears.
I think it's just nice to have this documented, so people remember that
our logging framework already has a good way to format errors when you
use the API `logger.error("<message>", e)`
Having old ADRs makes it harder for newcomers, that have to navigate
through many ADRs and spot the ones that were superseded by others. We
can save the mental burden by just moving the old ones to a deprecated
folder
## Key Updates in the ADR
- **Separation of Migrations in PRs**: Migrations are now required to be
carried out in separate pull requests. This change is intended to
improve the monitoring and management of database schema changes during
deployment.
- **Primary Key Requirement for New Tables**: A new paragraph mandates
the inclusion of primary keys in all new tables, emphasizing the
importance of data integrity, efficient data retrieval, and supporting
table relationships. Additionally, by adding primary keys, we resolve
the issue of migrations failing during upgrades in replicated database
setups, as we are not using PostgreSQL replica identities. Exceptions to
this rule require a compelling justification.
Also added better structuring and styling to ADR for better readability.
https://linear.app/unleash/issue/2-1680/adr-specify-tables-when-querying-columns
This PR includes my suggestion of a "Specificity in database column
references" ADR.
The ADR proposes a standard for explicitly specifying the full table
name or alias for each column in our SQL queries, especially for queries
with joins between multiple tables. This decision is a direct response
to recent ambiguity errors encountered due to a database migration,
emphasizing the need for clearer SQL query standards in complex joins
and schema changes.
---------
Co-authored-by: Mateusz Kwasniewski <kwasniewski.mateusz@gmail.com>
## About the changes
While working on Terraform I identified some issues with how our backend
handled some requests. This happened because the Terraform client was
unaware of new fields and was not sending them. This resulted in bad
behavior as some of those missing fields were treated in the backend as
`null` and removed existing data from the DB.
This ADR aims to shed some light on the problem and specifies how our
server should handle these requests.
---------
Co-authored-by: Nuno Góis <github@nunogois.com>
https://linear.app/unleash/issue/2-943/adr-separate-request-and-response-types-in-apis
During the updating of our OpenAPI documentation, we've seen several
times that our schemas are either way too wide for a response or way to
strict for a request. This is usually due to us reusing the same schema
for both request and response. We should write an ADR where we reason
about the usefulness of code duplication and keeping separate response
and request schemas.
Based on our needs, this PR adds my suggested ADR.
---------
Co-authored-by: Simon Hornby <liquidwicked64@gmail.com>
This PR puts our contributing guidelines in the sidebar of the unleash
documentation. Currently there was no way of navigating to them easily,
which made our contribution guides and ADRs less useful. This PR adds
them to the sidebar as their own category, and adds an ADR for domain
centric language.
Co-authored-by: Thomas Heartman <thomas@getunleash.ai>