Skip to content

Conversation

@yctomwang
Copy link
Contributor

SUMMARY

Aim to implement the feature of sorting the content of FILES.json for the ansible galaxy build to allow for reproducible build mentioned in feature request issue #82792. The FILES.json is sorted by 'name' in ASCII order, with an integration test to ensure the functionaility.
The advantages of this feature:

  • this is of course necessary for reproducible build efforts
  • it reduces churn between updates, because if a user compares what changed, they don't get a huge diff, but only a diff for newly inserted or removed files.
  • it allows skipping a file transfer when using rsync or something similar to avoid transferring unchanged files.
  • the file is easier to read for humans ;)
ISSUE TYPE
  • Feature Pull Request
ADDITIONAL INFORMATION

@yctomwang yctomwang marked this pull request as ready for review March 15, 2024 10:39
@yctomwang yctomwang changed the title Feature: sort entries in FILES.json for reproducibility Feature: sort entries in FILES.json for reproducibility in ansible galaxy build Mar 15, 2024
@ansibot ansibot added feature This issue/PR relates to a feature request. needs_triage Needs a first human triage before being processed. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Mar 15, 2024
@ansibot
Copy link
Contributor

ansibot commented Mar 15, 2024

The test ansible-test sanity --test mypy --python 3.10 [explain] failed with 1 error:

lib/ansible/galaxy/collection/__init__.py:1307:5: union-attr: Item "int" of "list[dict[Literal['name', 'ftype', 'chksum_type', 'chksum_sha256', 'format'], str | int | None]] | int" has no attribute "sort"

The test ansible-test sanity --test mypy --python 3.11 [explain] failed with 1 error:

lib/ansible/galaxy/collection/__init__.py:1307:5: union-attr: Item "int" of "list[dict[Literal['name', 'ftype', 'chksum_type', 'chksum_sha256', 'format'], str | int | None]] | int" has no attribute "sort"

The test ansible-test sanity --test mypy --python 3.12 [explain] failed with 1 error:

lib/ansible/galaxy/collection/__init__.py:1307:5: union-attr: Item "int" of "list[dict[Literal['name', 'ftype', 'chksum_type', 'chksum_sha256', 'format'], str | int | None]] | int" has no attribute "sort"

click here for bot help

@webknjaz webknjaz added the ci_verified Changes made in this PR are causing tests to fail. label Mar 15, 2024
@s-hertel s-hertel removed the needs_triage Needs a first human triage before being processed. label Mar 19, 2024
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Mar 26, 2024
@ansibot ansibot removed ci_verified Changes made in this PR are causing tests to fail. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Apr 12, 2024
@webknjaz webknjaz added the ci_verified Changes made in this PR are causing tests to fail. label Apr 12, 2024
@TheVinaySagar
Copy link

Screenshot_3

I tried sort with converting the int to string but again this error occur. I am doing this because name have 3 type string | int | None
when there is int it fails.
can someone help me to debug this error

@ansibot ansibot removed the ci_verified Changes made in this PR are causing tests to fail. label Apr 16, 2024
@webknjaz webknjaz added the ci_verified Changes made in this PR are causing tests to fail. label Apr 16, 2024
@ansibot ansibot removed ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Apr 16, 2024
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label May 1, 2024
@Akasurde
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Akasurde Akasurde requested a review from sivel June 15, 2024 01:37
@Akasurde Akasurde requested review from s-hertel and webknjaz June 15, 2024 01:37
@ansibot ansibot removed the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Jun 15, 2024
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Jun 29, 2024
@ansibot ansibot added the stale_pr This PR has not been pushed to for more than one year. label Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature This issue/PR relates to a feature request. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. stale_pr This PR has not been pushed to for more than one year.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants