Skip to content

feat(patchable)!: Use consistent long index in patches - #1705

Open
NickLarsenNZ wants to merge 7 commits into
mainfrom
feat/patchable-long-index
Open

NickLarsenNZ wants to merge 7 commits into
mainfrom
feat/patchable-long-index

Conversation

@NickLarsenNZ

@NickLarsenNZ NickLarsenNZ commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Otherwise git chooses a reasonable length based on how many objects are checked out, to try to avoid ambiguity.

But that means some people will export a product version and a change will appear for existing patches they didn't touch. Eg: #1686 (review)

This change sets a consistent long hash format for the patch index lines.
It also hard-codes the diff algorithm to myers, which is the git default. I use histogram, so it changed how some patches were presented.

versions re-exported
cargo patchable checkout $IMAGE $VERSION
cargo patchable export $IMAGE $VERSION

airflow

  • airflow 3.2.2
  • airflow 3.3.1

druid

  • druid 37.0.0

hadoop

  • hadoop/hadoop 3.3.6
  • hadoop/hadoop 3.4.3
  • hadoop/hadoop 3.5.0
  • precompiled/hadoop 3.3.6
  • precompiled/hadoop 3.4.2

hbase

  • hbase/hbase 2.6.6
  • hbase/hbase 2.6.7
  • hbase/hbase 3.0.0
  • hbase/hbase-operator-tools 1.3.0
  • hbase/phoenix 5.3.0
  • hbase/phoenix 5.3.1
  • hbase/phoenix 5.3.2

hive

  • hive 3.1.3
  • hive 4.0.0
  • hive 4.1.0
  • hive 4.2.0
  • hive 4.2.1
  • hive/hive-metastore-opa-authorizer v1.0.0

kafka

  • kafka 3.9.2
  • kafka 4.2.1
  • kafka 4.3.1

nifi

  • nifi 2.6.0
  • nifi 2.9.0
  • nifi 2.12.0

omid

  • omid 1.1.3

opensearch

  • opensearch 3.1.0
  • opensearch 3.6.0
  • opensearch 3.8.0
  • opensearch/opensearch-prometheus-exporter 3.1.0.0
  • opensearch/opensearch-prometheus-exporter 3.6.0.0
  • opensearch/opensearch-prometheus-exporter 3.8.0.0
  • opensearch/security-plugin 3.1.0.0
  • opensearch/security-plugin 3.6.0.0
  • opensearch/security-plugin 3.8.0.0

opensearch-dashboards

  • opensearch-dashboards/opensearch-build 3.1.0
  • opensearch-dashboards/opensearch-build 3.6.0
  • opensearch-dashboards/opensearch-build 3.8.0

shared

  • shared/logback 1.3.15
  • shared/logback 1.5.18
  • shared/reload4j 1.2.25

spark-k8s

  • spark-k8s 3.5.7
  • spark-k8s 3.5.8
  • spark-k8s 4.0.1
  • spark-k8s 4.1.1
  • spark-k8s 4.1.2
  • spark-k8s/hbase-connectors 1.0.1_3.5.8

superset

  • superset 4.1.4

trino

  • trino/airlift 361
  • trino/airlift 424
  • trino/storage-connector 477
  • trino/trino 477
  • trino/trino 481
  • trino/trino 483

superset

  • superset 4.1.4

trino

  • trino/airlift 361
  • trino/airlift 424
  • trino/storage-connector 477 (1)
  • trino/trino 477
  • trino/trino 481
  • trino/trino 483

zookeeper

  • zookeeper 3.9.5
  • zookeeper 3.9.6

Otherwise git chooses a reasonable length based on how many objects are checked out, to try to avoid ambiguity.

But that means some people will export a product version and a change will appear for existing patches they didn't touch.
@NickLarsenNZ NickLarsenNZ self-assigned this Oct 16, 2026
@NickLarsenNZ NickLarsenNZ moved this to Development: In Progress in Stackable Engineering Oct 16, 2026
Techassi
Techassi previously approved these changes Oct 16, 2026
Note:
- One patch had the Subject fixed so that the exported filename doesn't change.
- Other patches have the Form line show a different hash. Previously they were stale (eg: earlier patch removed after export, or perhaps a reordering of the patch files).
- Other differences are due to the diff algorithm when the export happened on my machine. Will look at fixing that here.
…for consistency

My local config uses histogram, so the previous commit showed changes in the patches. This reverts those changes.
errMsg = "Could not open client transport for any of the Server URI's in ZooKeeper: ";
// Try next available server in zookeeper, or retry all the servers again if retry is enabled
@@ -267,15 +273,15 @@ public HiveConnection(String uri, Properties info) throws SQLException {
@@ -267,15 +273,15 @@ public class HiveConnection implements java.sql.Connection {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This appears to be happening for old diffs that were done in the checkout directory. Patchable doesn't enter the checkout directory, so exports are missing the language diff set in .gitattributes of the checked out repo.

Eg: for hive 3.1.3, it is:

# Auto detect text files and perform LF normalization
*        text=auto

*.cs     text diff=csharp
*.java   text diff=java
*.html   text diff=html
*.py     text diff=python
*.pl     text diff=perl
*.pm     text diff=perl
*.css    text
*.js     text
*.sql    text
*.q      text
*.q.out  text diff

*.sh     text eol=lf

#test files, use lf so that size is same on windows as well
data/files/*.dat    text eol=lf

*.bat    text eol=crlf
*.cmd    text eol=crlf
*.csproj text merge=union eol=crlf
*.sln    text merge=union eol=crlf

It probably makes sense that we use the .gitattributes (so our patches look like upstream patches).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I will look into this in a different PR. There are other things I want to fix and this PR is getting big.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

To the reviewer, this is the cause of all the patch file changes.

@NickLarsenNZ
NickLarsenNZ marked this pull request as ready for review October 16, 2026 14:06
@NickLarsenNZ NickLarsenNZ moved this from Development: In Progress to Development: Waiting for Review in Stackable Engineering Oct 16, 2026
@NickLarsenNZ

This comment was marked as resolved.

@NickLarsenNZ
NickLarsenNZ requested a review from Techassi October 16, 2026 14:15

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I need to look at this one

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

ok, I think this is fine. The original patch was done with histogram, and now it's being forced back to myers.

In a later PR, I will make it configurable.

@Techassi Techassi moved this from Development: Waiting for Review to Development: In Review in Stackable Engineering Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Development: In Review

Development

Successfully merging this pull request may close these issues.

2 participants