You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/09/09 15:44:57 UTC

[GitHub] [airflow] norm opened a new pull request, #26275: Create a workflow to sync the list of authors

norm opened a new pull request, #26275:
URL: https://github.com/apache/airflow/pull/26275

   The CI jobs caused by Pull Requests run on Airflow infrastructure only when an author is trusted, which currently means a core committer. The list is currently duplicated in the ci.yml workflow.
   
   As part of being able to open up the infra to other trusted authors, this list needs to be updated based on a list of trusted authors kept in the `airflow-ci-infra` repository.
   


-- 
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: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] norm commented on a diff in pull request #26275: Create a workflow to sync the list of authors

Posted by GitBox <gi...@apache.org>.
norm commented on code in PR #26275:
URL: https://github.com/apache/airflow/pull/26275#discussion_r969417825


##########
scripts/ci/runners/sync_authors.py:
##########
@@ -0,0 +1,56 @@
+#!/usr/bin/env python
+
+# 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.
+
+import re
+
+import requests
+import toml
+
+AUTHORS = 'https://raw.githubusercontent.com/apache/airflow-ci-infra/main/authors.toml'
+
+
+req = requests.get(AUTHORS)
+author_list = toml.loads(req.text)
+
+author_set = set()
+for membership in author_list:
+    author_set.update([author for author in author_list[membership]])
+
+authors = ''
+for author in sorted(author_set):
+    authors += f'            "{author}",\n'
+
+authors = authors[:-2]
+
+with open('ci.yml') as handle:
+    new_ci = re.sub(

Review Comment:
   That particular breakage I've fixed — it wants a `width=180` or similar large number in order to not wrap.



-- 
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: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] ashb merged pull request #26275: Create a workflow to sync the list of authors

Posted by GitBox <gi...@apache.org>.
ashb merged PR #26275:
URL: https://github.com/apache/airflow/pull/26275


-- 
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: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] norm commented on a diff in pull request #26275: Create a workflow to sync the list of authors

Posted by GitBox <gi...@apache.org>.
norm commented on code in PR #26275:
URL: https://github.com/apache/airflow/pull/26275#discussion_r967632599


##########
.github/workflows/sync_authors.yml:
##########
@@ -0,0 +1,59 @@
+# 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: Sync authors list
+
+on:
+  schedule:
+    #        min   hr    dom   mon   dow
+    - cron: '11    01    *     *     *'     # daily at 1.11am
+  workflow_dispatch:

Review Comment:
   This was left in because I was testing the workflow in another repo first.



-- 
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: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] norm commented on a diff in pull request #26275: Create a workflow to sync the list of authors

Posted by GitBox <gi...@apache.org>.
norm commented on code in PR #26275:
URL: https://github.com/apache/airflow/pull/26275#discussion_r969483804


##########
scripts/ci/runners/sync_authors.py:
##########
@@ -0,0 +1,56 @@
+#!/usr/bin/env python
+
+# 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.
+
+import re
+
+import requests
+import toml
+
+AUTHORS = 'https://raw.githubusercontent.com/apache/airflow-ci-infra/main/authors.toml'
+
+
+req = requests.get(AUTHORS)
+author_list = toml.loads(req.text)
+
+author_set = set()
+for membership in author_list:
+    author_set.update([author for author in author_list[membership]])
+
+authors = ''
+for author in sorted(author_set):
+    authors += f'            "{author}",\n'
+
+authors = authors[:-2]
+
+with open('ci.yml') as handle:
+    new_ci = re.sub(

Review Comment:
   (done, sort-of)



-- 
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: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] norm commented on pull request #26275: Create a workflow to sync the list of authors

Posted by GitBox <gi...@apache.org>.
norm commented on PR #26275:
URL: https://github.com/apache/airflow/pull/26275#issuecomment-1242701465

   @potiuk It should create a PR with a single line change (or more, if multiple people are added) to the `ci.yml`. If I've done it right :)


-- 
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: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] norm commented on a diff in pull request #26275: Create a workflow to sync the list of authors

Posted by GitBox <gi...@apache.org>.
norm commented on code in PR #26275:
URL: https://github.com/apache/airflow/pull/26275#discussion_r969394735


##########
scripts/ci/runners/sync_authors.py:
##########
@@ -0,0 +1,56 @@
+#!/usr/bin/env python
+
+# 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.
+
+import re
+
+import requests
+import toml
+
+AUTHORS = 'https://raw.githubusercontent.com/apache/airflow-ci-infra/main/authors.toml'
+
+
+req = requests.get(AUTHORS)
+author_list = toml.loads(req.text)
+
+author_set = set()
+for membership in author_list:
+    author_set.update([author for author in author_list[membership]])
+
+authors = ''
+for author in sorted(author_set):
+    authors += f'            "{author}",\n'
+
+authors = authors[:-2]
+
+with open('ci.yml') as handle:
+    new_ci = re.sub(

Review Comment:
   Updating the yaml with that does not preserve the contents of the file well, even with `RoundTripLoader/Dumper`. Most comments are stripped, and some parts are rewritten such that I would not be confident it would even work.



-- 
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: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] norm commented on a diff in pull request #26275: Create a workflow to sync the list of authors

Posted by GitBox <gi...@apache.org>.
norm commented on code in PR #26275:
URL: https://github.com/apache/airflow/pull/26275#discussion_r967633470


##########
.github/workflows/sync_authors.yml:
##########
@@ -0,0 +1,59 @@
+# 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: Sync authors list
+

Review Comment:
   This is why I had it in draft, I hadn't yet worked out what was needed there. :)



-- 
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: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] norm commented on a diff in pull request #26275: Create a workflow to sync the list of authors

Posted by GitBox <gi...@apache.org>.
norm commented on code in PR #26275:
URL: https://github.com/apache/airflow/pull/26275#discussion_r969462771


##########
scripts/ci/runners/sync_authors.py:
##########
@@ -0,0 +1,56 @@
+#!/usr/bin/env python
+
+# 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.
+
+import re
+
+import requests
+import toml
+
+AUTHORS = 'https://raw.githubusercontent.com/apache/airflow-ci-infra/main/authors.toml'
+
+
+req = requests.get(AUTHORS)
+author_list = toml.loads(req.text)
+
+author_set = set()
+for membership in author_list:
+    author_set.update([author for author in author_list[membership]])
+
+authors = ''
+for author in sorted(author_set):
+    authors += f'            "{author}",\n'
+
+authors = authors[:-2]
+
+with open('ci.yml') as handle:
+    new_ci = re.sub(

Review Comment:
   I've tried all the options I can find and still can't get it to roundtrip without stripping out many of the comments. Doesn't seem like a good idea. I could document the regexp better though.



-- 
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: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] norm commented on a diff in pull request #26275: Create a workflow to sync the list of authors

Posted by GitBox <gi...@apache.org>.
norm commented on code in PR #26275:
URL: https://github.com/apache/airflow/pull/26275#discussion_r969401712


##########
scripts/ci/runners/sync_authors.py:
##########
@@ -0,0 +1,56 @@
+#!/usr/bin/env python
+
+# 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.
+
+import re
+
+import requests
+import toml
+
+AUTHORS = 'https://raw.githubusercontent.com/apache/airflow-ci-infra/main/authors.toml'
+
+
+req = requests.get(AUTHORS)
+author_list = toml.loads(req.text)
+
+author_set = set()
+for membership in author_list:
+    author_set.update([author for author in author_list[membership]])
+
+authors = ''
+for author in sorted(author_set):
+    authors += f'            "{author}",\n'
+
+authors = authors[:-2]
+
+with open('ci.yml') as handle:
+    new_ci = re.sub(

Review Comment:
   eg
   
   ```
   -      DEFAULT_CONSTRAINTS_BRANCH: ${{ needs.build-info.outputs.default-constraints-branch }}
   +      DEFAULT_CONSTRAINTS_BRANCH: ${{ needs.build-info.outputs.default-constraints-branch
   +        }}
   ```



-- 
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: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] ashb commented on a diff in pull request #26275: Create a workflow to sync the list of authors

Posted by GitBox <gi...@apache.org>.
ashb commented on code in PR #26275:
URL: https://github.com/apache/airflow/pull/26275#discussion_r969442656


##########
scripts/ci/runners/sync_authors.py:
##########
@@ -0,0 +1,56 @@
+#!/usr/bin/env python
+
+# 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.
+
+import re
+
+import requests
+import toml
+
+AUTHORS = 'https://raw.githubusercontent.com/apache/airflow-ci-infra/main/authors.toml'
+
+
+req = requests.get(AUTHORS)
+author_list = toml.loads(req.text)
+
+author_set = set()
+for membership in author_list:
+    author_set.update([author for author in author_list[membership]])
+
+authors = ''
+for author in sorted(author_set):
+    authors += f'            "{author}",\n'
+
+authors = authors[:-2]
+
+with open('ci.yml') as handle:
+    new_ci = re.sub(

Review Comment:
   Happy to merge this as is if you don't think ruamel.yaml is worth it (it may not be)



-- 
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: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] ashb commented on a diff in pull request #26275: Create a workflow to sync the list of authors

Posted by GitBox <gi...@apache.org>.
ashb commented on code in PR #26275:
URL: https://github.com/apache/airflow/pull/26275#discussion_r969334641


##########
scripts/ci/runners/sync_authors.py:
##########
@@ -0,0 +1,56 @@
+#!/usr/bin/env python
+
+# 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.
+
+import re
+
+import requests
+import toml
+
+AUTHORS = 'https://raw.githubusercontent.com/apache/airflow-ci-infra/main/authors.toml'
+
+
+req = requests.get(AUTHORS)
+author_list = toml.loads(req.text)
+
+author_set = set()
+for membership in author_list:
+    author_set.update([author for author in author_list[membership]])
+
+authors = ''
+for author in sorted(author_set):
+    authors += f'            "{author}",\n'
+
+authors = authors[:-2]
+
+with open('ci.yml') as handle:
+    new_ci = re.sub(

Review Comment:
   https://pypi.org/project/ruamel.yaml/ might be a slightly more maintable way than a regex. Though we'd still need to regex the value



-- 
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: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] potiuk commented on a diff in pull request #26275: Create a workflow to sync the list of authors

Posted by GitBox <gi...@apache.org>.
potiuk commented on code in PR #26275:
URL: https://github.com/apache/airflow/pull/26275#discussion_r967239406


##########
.github/workflows/sync_authors.yml:
##########
@@ -0,0 +1,59 @@
+# 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: Sync authors list
+
+on:
+  schedule:
+    #        min   hr    dom   mon   dow
+    - cron: '11    01    *     *     *'     # daily at 1.11am
+  workflow_dispatch:

Review Comment:
   We have the approach that "workflow_dispatch" workflows should also be limited to a few people - for example to release the prod images, we have a workflow limited to few release managers only - we probably should do something similar here.



-- 
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: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] potiuk commented on a diff in pull request #26275: Create a workflow to sync the list of authors

Posted by GitBox <gi...@apache.org>.
potiuk commented on code in PR #26275:
URL: https://github.com/apache/airflow/pull/26275#discussion_r967237654


##########
.github/workflows/sync_authors.yml:
##########
@@ -0,0 +1,59 @@
+# 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: Sync authors list
+

Review Comment:
   we should explicitly list permissions here - this is far safer as we will only give the actual permissions needed by the workflow.



-- 
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: commits-unsubscribe@airflow.apache.org

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