Skip to content

fix(cmake): correct PFL_ARG prefix typo in conflict check - #2115

Open
chennaji9 wants to merge 1 commit into
OpenAtom-Linyaps:masterfrom
chennaji9:fix/pfl-conflict-check-typo
Open

chennaji9 wants to merge 1 commit into
OpenAtom-Linyaps:masterfrom
chennaji9:fix/pfl-conflict-check-typo

Conversation

@chennaji9

Copy link
Copy Markdown

What does this PR do?

_pfl_init_produce_auto_argument in cmake/PFL.cmake is supposed to fail with a fatal error when a project-level variable (e.g. probe_ENABLE_TESTING) and the matching PFL_INIT argument are both defined. The condition reads:

if(DEFINED ${PROJECT_NAME}_${NAME} AND DEFINED PLF_ARG_${NAME})

The PLF_ARG_ prefix is a typo — the argument is actually stored under PFL_ARG_${NAME} (as the same macro reads it a few lines below). The check therefore compares against a variable that never exists, and defining both sources silently lets the PFL_INIT argument overwrite the project variable instead of producing the intended error.

Fix the prefix so the conflict check works.

Validation

Isolated cmake repro against the vendored cmake/PFL.cmake (CMake 3.28.3):

  • pre-fix blob, set(probe_ENABLE_TESTING OFF) + PFL_INIT(ENABLE_TESTING ON): configure exits 0 and silently sets probe_ENABLE_TESTING=ON (the bug);
  • fixed file, same conflict input: configure exits 1 with the intended PFL.cmake: You may either define probe_ENABLE_TESTING before call PFL_INIT or call PFL_INIT with argument ENABLE_TESTING. error;
  • fixed file, argument-only input: configure exits 0 and probe_ENABLE_TESTING=ON.

Also verified grep -n 'PLF_ARG_' cmake/PFL.cmake returns no remaining occurrences, and cmake --preset debug configure + build of the project still pass with the fix.

Note: this file is a vendored copy maintained by tools/upgrade-pfl.sh, so the same typo likely exists upstream in the PFL framework and can be synced when it is fixed there.

🤖 Generated with Claude Code

@deepin-ci-robot

Copy link
Copy Markdown
Collaborator

Hi @chennaji9. Thanks for your PR.

I'm waiting for a OpenAtom-Linyaps member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@chennaji9

Copy link
Copy Markdown
Author

Hi, gentle ping — CI on this batch is still waiting for an /ok-to-test from an org member. All twelve PRs (#2115–#2126) were opened on Sep 30 and are sitting untested, so whenever someone has a moment to sanity-check them, that would unblock testing on everything at once. Happy to adjust anything that looks off. cc @dengbo11 (apologies if there's a better person to ping for this).

@chennaji9

Copy link
Copy Markdown
Author

/ok-to-test

@deepin-ci-robot

Copy link
Copy Markdown
Collaborator

@chennaji9: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

Details

In response to this:

/ok-to-test

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@codecov

codecov Bot commented Oct 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

The conflict check in _pfl_init_produce_auto_argument referenced the
non-existent PLF_ARG_* variable prefix, so setting both a project-level
variable and the matching PFL_INIT argument silently let the argument
overwrite the project variable instead of producing the intended fatal
error. Fix the prefix so the intended fatal error triggers.

Signed-off-by: 陈那几 <2078634206@qq.com>
@chennaji9
chennaji9 force-pushed the fix/pfl-conflict-check-typo branch from 9db72c8 to 38f4282 Compare October 13, 2026 05:45
@chennaji9

Copy link
Copy Markdown
Author

维护者您好,跟进一下 #2115–#2126 这批 PR:commitlint 工作流之前对提交信息里的 Co-Authored-By 尾行报错,我们已把 12 个分支的提交信息按检查要求修正(仅去掉该尾行,代码零改动,diff 为空),当前各分支 license-check 已通过,但 ubuntu 构建等 5 项工作流仍在等待放行。麻烦有空时帮忙重新 Approve and run 一下这批的 CI,如还有其他需要调整的地方随时指出,谢谢。

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.

2 participants