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

[Bug:] run-clang-format failed on dev #736

Open
Bai-Li-NOAA opened this issue Jan 23, 2025 · 1 comment
Open

[Bug:] run-clang-format failed on dev #736

Bai-Li-NOAA opened this issue Jan 23, 2025 · 1 comment
Labels
kind: bug Something isn't working status: triage_needed This is not approved for this milestone, do not work on it yet

Comments

@Bai-Li-NOAA
Copy link
Contributor

Describe the bug

The run-clang-format GHA failed to run after merging changes from a feature branch to the dev branch. It failed when creating a pull request. Below is the error message:

Attempting creation of pull request
  A pull request already exists for NOAA-FIMS:format-c++-code
  Fetching existing pull request
  Attempting update of pull request
  Error: Cannot read properties of undefined (reading 'number')

Is it related to the failed PR for formatting C++ code with clang format here?
In addition, I saw a warning after the GHA ran Peter-evans/create-pull-request@v4:

(node:2089) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. 
Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `node --trace-deprecation ...` to show where the warning was created)

Describe how to reproduce the bug

See GHA log here

Screenshots

No response

Which OS are you seeing the problem on?

Linux

Which browser are you seeing the problem on?

No response

Which version of FIMS are you seeing the problem on?

0.3.0.1 from the dev branch

Additional context

We may need to update the build triggers (e.g., run on pull requests) if we want to keep dev passing all the checks and catch failed GHA before merging the code into dev.

@Bai-Li-NOAA Bai-Li-NOAA added kind: bug Something isn't working status: triage_needed This is not approved for this milestone, do not work on it yet labels Jan 23, 2025
@k-doering-NOAA
Copy link
Member

@Bai-Li-NOAA , I think the issue is that the branch name where the styling occurs is always the same, so if there is already a PR open to main, it will error if it tries to make a PR to a feature branch as well.

Actually, workflows like doc and style in ghactions4r have this same issue.

I think the solution would be to figure out how to pass different names of branches depending on where the PR should be merged to. I'm not quite sure how to do this, but it seems like it should be possible?

If we can figure this out, it would be good to update doc and style in ghactions4r, too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Something isn't working status: triage_needed This is not approved for this milestone, do not work on it yet
Projects
None yet
Development

No branches or pull requests

2 participants