Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix frozen tools check never failing #14705

Merged
merged 3 commits into from
May 31, 2021
Merged

Conversation

LDong-Arm
Copy link
Contributor

@LDong-Arm LDong-Arm commented May 26, 2021

Summary of changes

Having recently moved the frozen tools check to a standalone Travis stage at the end, we need to fetch the base branch so make comparison work. Travis environments are not shared across different stages. Without the fetch, the check always passes as a PR is compared with itself.

Also change git fetch to be shallow, as the git history is irrelevant to git diff which only compares files between two revisions.

And deleted files are no longer ignored from the frozen tools check, because deleting a file can also break compatibility with the legacy tools.

Impact of changes

Migration actions required

Documentation

None.


Pull request type

[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[x] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers


@ciarmcom ciarmcom added the release-type: patch Indentifies a PR as containing just a patch label May 26, 2021
@ciarmcom
Copy link
Member

@LDong-Arm, thank you for your changes.
@ARMmbed/mbed-os-maintainers please review.

@ciarmcom ciarmcom requested a review from a team May 26, 2021 13:00
@LDong-Arm LDong-Arm changed the title DO NOT MERGE: Fix frozen tools check Fix frozen tools check always passing May 26, 2021
We only compare files in current PR with the base branch. There's no
need to fetch the full git history or branches that are not involved
in the comparison.

This is to save time in Travis runs.
Having recently moved the frozen tools check to a standalone stage
at the end, we need to fetch the base branch so make comparison
work. Travis environments are not shared across different stages.

Without the fetch, the check always passes as a PR is compared with
itself.
The filter `--diff-filter=d' causes deleted files to be ignored from
the frozen tools check. But there is no reason for this, as deleting
a file can break compatibility with the legacy tools.
@LDong-Arm LDong-Arm changed the title Fix frozen tools check always passing Fix frozen tools check never failing May 26, 2021
.travis.yml Show resolved Hide resolved
@ciarmcom
Copy link
Member

@LDong-Arm, thank you for your changes.
@ARMmbed/mbed-os-maintainers please review.

@LDong-Arm
Copy link
Contributor Author

LDong-Arm commented May 26, 2021

Now ready for review. I've removed the experimental commit.

Frozen tools check failed as expected when the experimental commit was there.

Copy link
Contributor

@Patater Patater left a comment

Choose a reason for hiding this comment

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

LGTM

@mergify mergify bot added needs: CI and removed needs: work labels May 27, 2021
@Patater
Copy link
Contributor

Patater commented May 27, 2021

CI started

@mergify mergify bot removed the needs: CI label May 27, 2021
@0xc0170 0xc0170 merged commit b0ab466 into ARMmbed:master May 31, 2021
@mergify mergify bot removed the ready for merge label May 31, 2021
@mbedmain mbedmain added release-version: 6.12.0 Release-pending and removed release-type: patch Indentifies a PR as containing just a patch Release-pending labels Jun 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants