You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "zhjwpku (via GitHub)" <gi...@apache.org> on 2024/12/17 10:57:00 UTC

[PR] Add pre-commit config [iceberg-cpp]

zhjwpku opened a new pull request, #16:
URL: https://github.com/apache/iceberg-cpp/pull/16

   (no comment)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Add pre-commit config [iceberg-cpp]

Posted by "raulcd (via GitHub)" <gi...@apache.org>.
raulcd commented on PR #16:
URL: https://github.com/apache/iceberg-cpp/pull/16#issuecomment-2548559200

   > @Fokko @raulcd there is startup error, do you have any experience on this? https://github.com/apache/iceberg-cpp/actions/runs/12374293318
   
   Oh, it seems pre-commit is not an allowed GH action to use, yes the snippet you shared looks good to me. That's more or less how we do it in Arrow: https://github.com/apache/arrow/blob/main/.github/workflows/dev.yml#L56-L67
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Add pre-commit config [iceberg-cpp]

Posted by "wgtmac (via GitHub)" <gi...@apache.org>.
wgtmac commented on PR #16:
URL: https://github.com/apache/iceberg-cpp/pull/16#issuecomment-2563226071

   > pre-commit/action@v3.0.1 is not allowed to be used in apache/iceberg-cpp.
   
   It seems that pre-commit check never run successfully: https://github.com/apache/iceberg-cpp/actions/workflows/pre-commit.yml. I saw the same thing with cpp-linter-action: https://issues.apache.org/jira/browse/INFRA-26318


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Add pre-commit config [iceberg-cpp]

Posted by "raulcd (via GitHub)" <gi...@apache.org>.
raulcd commented on code in PR #16:
URL: https://github.com/apache/iceberg-cpp/pull/16#discussion_r1888530697


##########
.github/workflows/pre-commit.yml:
##########
@@ -0,0 +1,31 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+name: pre-commit
+
+on:
+  pull_request:
+  push:
+    branches: [main]

Review Comment:
   I would probably allow this to run on any branch (except dependabot) not only on main. For example we might have branches to track minor / patch releases where we still want to run those jobs in the future.
   ```suggestion
       branches:
         - '**'
         - '!dependabot/**'
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Add pre-commit config [iceberg-cpp]

Posted by "raulcd (via GitHub)" <gi...@apache.org>.
raulcd commented on PR #16:
URL: https://github.com/apache/iceberg-cpp/pull/16#issuecomment-2548613181

   >  you mean apache infra or github infra?
   
   Apache Infra
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Add pre-commit config [iceberg-cpp]

Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko merged PR #16:
URL: https://github.com/apache/iceberg-cpp/pull/16


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Add pre-commit config [iceberg-cpp]

Posted by "zhjwpku (via GitHub)" <gi...@apache.org>.
zhjwpku commented on PR #16:
URL: https://github.com/apache/iceberg-cpp/pull/16#issuecomment-2563259290

   > Apache allow-lists GitHub actions to use. I think for arrow-adbc I've just manually installed and run pre-commit instead of using the dedicated action.
   
   But https://issues.apache.org/jira/browse/INFRA-26378 seems whitelists the pre-commit action. Anyway, if we find that doesn't work in the end, I will file a PR changing to the arrow way.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Add pre-commit config [iceberg-cpp]

Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko commented on PR #16:
URL: https://github.com/apache/iceberg-cpp/pull/16#issuecomment-2563379820

   Looks like an issue on the INFRA end? For PyIceberg we also [just install pre-commit](https://github.com/apache/iceberg-python/blob/main/.github/workflows/python-ci.yml) and this works just as well


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Add pre-commit config [iceberg-cpp]

Posted by "zhjwpku (via GitHub)" <gi...@apache.org>.
zhjwpku commented on PR #16:
URL: https://github.com/apache/iceberg-cpp/pull/16#issuecomment-2559428937

   > > Cool, I've raised an issue: https://issues.apache.org/jira/browse/INFRA-26378
   > 
   > It got approved :)
   
   Hi @Fokko, I see the comment that the pre-commit/action@3.0.1 has been whitelisted, do i need to take some action so that this PR can be merged into main?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Add pre-commit config [iceberg-cpp]

Posted by "zhjwpku (via GitHub)" <gi...@apache.org>.
zhjwpku commented on PR #16:
URL: https://github.com/apache/iceberg-cpp/pull/16#issuecomment-2550137994

   > Should we also add some instructions on how to use `pre-commit`? Similar to https://py.iceberg.apache.org/contributing/#linting
   
   I've added some linting instructions to Contribute section of README.md, please check if that is adequate.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Add pre-commit config [iceberg-cpp]

Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko commented on PR #16:
URL: https://github.com/apache/iceberg-cpp/pull/16#issuecomment-2559523819

   @zhjwpku no action needed, let me get this in 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Add pre-commit config [iceberg-cpp]

Posted by "zhjwpku (via GitHub)" <gi...@apache.org>.
zhjwpku commented on PR #16:
URL: https://github.com/apache/iceberg-cpp/pull/16#issuecomment-2550134922

   > > Cool, I've raised an issue: https://issues.apache.org/jira/browse/INFRA-26378
   > 
   > It got approved :)
   
   Still got a startup error: https://github.com/apache/iceberg-cpp/actions/runs/12384969557, maybe we should just wait for some time ;(


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Add pre-commit config [iceberg-cpp]

Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko commented on PR #16:
URL: https://github.com/apache/iceberg-cpp/pull/16#issuecomment-2549497161

   > Cool, I've raised an issue: https://issues.apache.org/jira/browse/INFRA-26378
   
   It got approved :)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Add pre-commit config [iceberg-cpp]

Posted by "zhjwpku (via GitHub)" <gi...@apache.org>.
zhjwpku commented on PR #16:
URL: https://github.com/apache/iceberg-cpp/pull/16#issuecomment-2563236285

   > > pre-commit/action@v3.0.1 is not allowed to be used in apache/iceberg-cpp.
   > 
   > It seems that pre-commit check never run successfully: https://github.com/apache/iceberg-cpp/actions/workflows/pre-commit.yml. I saw the same thing with cpp-linter-action: https://issues.apache.org/jira/browse/INFRA-26318
   
   Yeah, I see that too, not sure how the infra works, any chance @Fokko take a look at this?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Add pre-commit config [iceberg-cpp]

Posted by "zhjwpku (via GitHub)" <gi...@apache.org>.
zhjwpku commented on PR #16:
URL: https://github.com/apache/iceberg-cpp/pull/16#issuecomment-2548505203

   @Fokko @raulcd there is startup error, do you have any experience on this?
   https://github.com/apache/iceberg-cpp/actions/runs/12374293318


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Add pre-commit config [iceberg-cpp]

Posted by "zhjwpku (via GitHub)" <gi...@apache.org>.
zhjwpku commented on PR #16:
URL: https://github.com/apache/iceberg-cpp/pull/16#issuecomment-2548581125

   > > @Fokko @raulcd there is startup error, do you have any experience on this? https://github.com/apache/iceberg-cpp/actions/runs/12374293318
   > 
   > Oh, it seems pre-commit is not an allowed GH action to use, yes the snippet you shared looks good to me. That's more or less how we do it in Arrow: https://github.com/apache/arrow/blob/main/.github/workflows/dev.yml#L56-L67
   
   Yeah, I just copied that from Arrow with some reduction.
   
   > _edit_: On another note we could ask infra to whitelist the action but that might take some time.
   
   Do you mean apache infra or github infra? I think we can go the Arrow way first and change to pre-commit action after infra whitelist it.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Add pre-commit config [iceberg-cpp]

Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on PR #16:
URL: https://github.com/apache/iceberg-cpp/pull/16#issuecomment-2563248835

   Apache allow-lists GitHub actions to use. I think for arrow-adbc I've just manually installed and run pre-commit instead of using the dedicated action.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Add pre-commit config [iceberg-cpp]

Posted by "wgtmac (via GitHub)" <gi...@apache.org>.
wgtmac commented on PR #16:
URL: https://github.com/apache/iceberg-cpp/pull/16#issuecomment-2563262588

   I have replied to the JIRA ticket. I guess it might have some misconfigurations.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Add pre-commit config [iceberg-cpp]

Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko commented on PR #16:
URL: https://github.com/apache/iceberg-cpp/pull/16#issuecomment-2548682321

   Should we also add some instructions on how to use `pre-commit`? Similar to https://py.iceberg.apache.org/contributing/#linting


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Add pre-commit config [iceberg-cpp]

Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko commented on PR #16:
URL: https://github.com/apache/iceberg-cpp/pull/16#issuecomment-2548679078

   Cool, I've raised an issue: https://issues.apache.org/jira/browse/INFRA-26378


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Add pre-commit config [iceberg-cpp]

Posted by "zhjwpku (via GitHub)" <gi...@apache.org>.
zhjwpku commented on code in PR #16:
URL: https://github.com/apache/iceberg-cpp/pull/16#discussion_r1888564860


##########
.github/workflows/pre-commit.yml:
##########
@@ -0,0 +1,33 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+name: pre-commit
+
+on:
+  pull_request:
+  push:
+    branches:
+      - '**'
+      - '!dependabot/**'
+
+jobs:
+  pre-commit:
+    runs-on: ubuntu-24.04
+    steps:
+    - uses: actions/checkout@v3
+    - uses: actions/setup-python@v3
+    - uses: pre-commit/action@v3.0.1

Review Comment:
   @Fokko @raulcd I'm considering change to the following code snip, but I want to know if you have any better idea.
   
   ```suggestion
       - name: Install pre-commit
         run: |
           python -m pip install pre-commit
       - name: Run pre-commit
         run: |
           pre-commit run --all-files --color=always --show-diff-on-failure
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Add pre-commit config [iceberg-cpp]

Posted by "wgtmac (via GitHub)" <gi...@apache.org>.
wgtmac commented on PR #16:
URL: https://github.com/apache/iceberg-cpp/pull/16#issuecomment-2563408856

   Yes, they have confirmed that there was a typo. Now it works: https://github.com/apache/iceberg-cpp/actions/runs/12512760344


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org