You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/05/05 05:31:01 UTC

[GitHub] [incubator-nuttx-apps] btashton opened a new pull request #229: Restore Git Credentials on NuttX repo

btashton opened a new pull request #229:
URL: https://github.com/apache/incubator-nuttx-apps/pull/229


   Something change on the GitHub side that has broken credentials
   between the the fetch and buld workflow steps.  There is no
   way to tell the checkout action to only re-auth so we have it
   checkout the repo again, but it will use what it already has.
   
   In the future we can change fetch step to just compute the
   target refs and store them in a script that we can call to
   set the environment variables for the targets much like
   this patch.


----------------------------------------------------------------
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.

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



[GitHub] [incubator-nuttx-apps] btashton commented on a change in pull request #229: Restore Git Credentials on NuttX repo

Posted by GitBox <gi...@apache.org>.
btashton commented on a change in pull request #229:
URL: https://github.com/apache/incubator-nuttx-apps/pull/229#discussion_r419898801



##########
File path: .github/workflows/build.yml
##########
@@ -162,13 +162,23 @@ jobs:
           retry_wait_seconds: 10
           command: docker pull docker.pkg.github.com/apache/incubator-nuttx-testing/nuttx-ci-linux
 
+      - name: Export NuttX Repo SHA
+        run:  echo "::set-env name=nuttx_sha::`git -C sources/nuttx rev-parse HEAD`"
+      - name: Refresh Git Credentials
+        uses: actions/checkout@v2
+        with:
+          repository: apache/incubator-nuttx
+          ref: ${{ env.nuttx_sha }}
+          path: sources/nuttx
+          fetch-depth: 1
+      - name: Get Tags for NuttX Repo
+        run: git -C sources/nuttx fetch --tags

Review comment:
       because we loose the clone of depth=1 when you pull down tags since it has to pull the full history :/




----------------------------------------------------------------
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.

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



[GitHub] [incubator-nuttx-apps] btashton commented on a change in pull request #229: Restore Git Credentials on NuttX repo

Posted by GitBox <gi...@apache.org>.
btashton commented on a change in pull request #229:
URL: https://github.com/apache/incubator-nuttx-apps/pull/229#discussion_r419879541



##########
File path: .github/workflows/build.yml
##########
@@ -162,13 +162,23 @@ jobs:
           retry_wait_seconds: 10
           command: docker pull docker.pkg.github.com/apache/incubator-nuttx-testing/nuttx-ci-linux
 
+      - name: Export NuttX Repo SHA
+        run:  echo "::set-env name=nuttx_sha::`git -C sources/nuttx rev-parse HEAD`"
+      - name: Refresh Git Credentials
+        uses: actions/checkout@v2
+        with:
+          repository: apache/incubator-nuttx

Review comment:
       It cleans the repo and resets all the refs (no way to avoid it, I opened a ticket on the checkout action), but we still have all the objects cached in `.git`




----------------------------------------------------------------
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.

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



[GitHub] [incubator-nuttx-apps] btashton commented on a change in pull request #229: Restore Git Credentials on NuttX repo

Posted by GitBox <gi...@apache.org>.
btashton commented on a change in pull request #229:
URL: https://github.com/apache/incubator-nuttx-apps/pull/229#discussion_r419913575



##########
File path: .github/workflows/build.yml
##########
@@ -162,13 +162,23 @@ jobs:
           retry_wait_seconds: 10
           command: docker pull docker.pkg.github.com/apache/incubator-nuttx-testing/nuttx-ci-linux
 
+      - name: Export NuttX Repo SHA
+        run:  echo "::set-env name=nuttx_sha::`git -C sources/nuttx rev-parse HEAD`"
+      - name: Refresh Git Credentials
+        uses: actions/checkout@v2
+        with:
+          repository: apache/incubator-nuttx

Review comment:
       I am testing a build where we just pass the refs




----------------------------------------------------------------
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.

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



[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a change in pull request #229: Restore Git Credentials on NuttX repo

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #229:
URL: https://github.com/apache/incubator-nuttx-apps/pull/229#discussion_r419891511



##########
File path: .github/workflows/build.yml
##########
@@ -162,13 +162,23 @@ jobs:
           retry_wait_seconds: 10
           command: docker pull docker.pkg.github.com/apache/incubator-nuttx-testing/nuttx-ci-linux
 
+      - name: Export NuttX Repo SHA
+        run:  echo "::set-env name=nuttx_sha::`git -C sources/nuttx rev-parse HEAD`"
+      - name: Refresh Git Credentials
+        uses: actions/checkout@v2
+        with:
+          repository: apache/incubator-nuttx

Review comment:
       The current method require each job(20~):
   1.Clean the repo and reset all refs
   2.Fetch the tag from server
   Can we save these two step if we move the tag fetch to 'Fetch-Source->Checkout nuttx repo'? I am wondering which method is more fast and stable.
   




----------------------------------------------------------------
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.

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



[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a change in pull request #229: Restore Git Credentials on NuttX repo

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #229:
URL: https://github.com/apache/incubator-nuttx-apps/pull/229#discussion_r419888171



##########
File path: .github/workflows/build.yml
##########
@@ -162,13 +162,23 @@ jobs:
           retry_wait_seconds: 10
           command: docker pull docker.pkg.github.com/apache/incubator-nuttx-testing/nuttx-ci-linux
 
+      - name: Export NuttX Repo SHA
+        run:  echo "::set-env name=nuttx_sha::`git -C sources/nuttx rev-parse HEAD`"
+      - name: Refresh Git Credentials
+        uses: actions/checkout@v2
+        with:
+          repository: apache/incubator-nuttx
+          ref: ${{ env.nuttx_sha }}
+          path: sources/nuttx
+          fetch-depth: 1
+      - name: Get Tags for NuttX Repo
+        run: git -C sources/nuttx fetch --tags

Review comment:
       I am curious why tag can increase the size so much? as I understand that tag is just a simple marker.




----------------------------------------------------------------
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.

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



[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a change in pull request #229: Restore Git Credentials on NuttX repo

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #229:
URL: https://github.com/apache/incubator-nuttx-apps/pull/229#discussion_r419917272



##########
File path: .github/workflows/build.yml
##########
@@ -162,13 +162,23 @@ jobs:
           retry_wait_seconds: 10
           command: docker pull docker.pkg.github.com/apache/incubator-nuttx-testing/nuttx-ci-linux
 
+      - name: Export NuttX Repo SHA
+        run:  echo "::set-env name=nuttx_sha::`git -C sources/nuttx rev-parse HEAD`"
+      - name: Refresh Git Credentials
+        uses: actions/checkout@v2
+        with:
+          repository: apache/incubator-nuttx
+          ref: ${{ env.nuttx_sha }}
+          path: sources/nuttx
+          fetch-depth: 1
+      - name: Get Tags for NuttX Repo
+        run: git -C sources/nuttx fetch --tags

Review comment:
       Just saw this from https://github.com/actions/checkout:
   ## Fetch all tags
   
   ```yaml
   - uses: actions/checkout@v2
   - run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
   ```
   
   ## Fetch all branches
   
   ```yaml
   - uses: actions/checkout@v2
   - run: |
       git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
   ```
   
   ## Fetch all history for all tags and branches
   
   ```yaml
   - uses: actions/checkout@v2
   - run: |
       git fetch --prune --unshallow
   ```
   Can we use them to fix the problem without dropping the speed.




----------------------------------------------------------------
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.

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



[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a change in pull request #229: Restore Git Credentials on NuttX repo

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #229:
URL: https://github.com/apache/incubator-nuttx-apps/pull/229#discussion_r419877153



##########
File path: .github/workflows/build.yml
##########
@@ -162,13 +162,23 @@ jobs:
           retry_wait_seconds: 10
           command: docker pull docker.pkg.github.com/apache/incubator-nuttx-testing/nuttx-ci-linux
 
+      - name: Export NuttX Repo SHA
+        run:  echo "::set-env name=nuttx_sha::`git -C sources/nuttx rev-parse HEAD`"
+      - name: Refresh Git Credentials
+        uses: actions/checkout@v2
+        with:
+          repository: apache/incubator-nuttx

Review comment:
       Does this mean we fetch the source code again?

##########
File path: .github/workflows/build.yml
##########
@@ -162,13 +162,23 @@ jobs:
           retry_wait_seconds: 10
           command: docker pull docker.pkg.github.com/apache/incubator-nuttx-testing/nuttx-ci-linux
 
+      - name: Export NuttX Repo SHA
+        run:  echo "::set-env name=nuttx_sha::`git -C sources/nuttx rev-parse HEAD`"
+      - name: Refresh Git Credentials
+        uses: actions/checkout@v2
+        with:
+          repository: apache/incubator-nuttx
+          ref: ${{ env.nuttx_sha }}
+          path: sources/nuttx
+          fetch-depth: 1
+      - name: Get Tags for NuttX Repo
+        run: git -C sources/nuttx fetch --tags

Review comment:
       I may ask the same question before: does it make sense to move the tag fetch to 'Fetch-Source->Checkout nuttx repo'?




----------------------------------------------------------------
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.

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



[GitHub] [incubator-nuttx-apps] btashton commented on a change in pull request #229: Restore Git Credentials on NuttX repo

Posted by GitBox <gi...@apache.org>.
btashton commented on a change in pull request #229:
URL: https://github.com/apache/incubator-nuttx-apps/pull/229#discussion_r419880108



##########
File path: .github/workflows/build.yml
##########
@@ -162,13 +162,23 @@ jobs:
           retry_wait_seconds: 10
           command: docker pull docker.pkg.github.com/apache/incubator-nuttx-testing/nuttx-ci-linux
 
+      - name: Export NuttX Repo SHA
+        run:  echo "::set-env name=nuttx_sha::`git -C sources/nuttx rev-parse HEAD`"
+      - name: Refresh Git Credentials
+        uses: actions/checkout@v2
+        with:
+          repository: apache/incubator-nuttx
+          ref: ${{ env.nuttx_sha }}
+          path: sources/nuttx
+          fetch-depth: 1
+      - name: Get Tags for NuttX Repo
+        run: git -C sources/nuttx fetch --tags

Review comment:
       Causes a huge slow down because the cache becomes substantially larger.  I want to implement a better solution later this week that goes back to just doing the checkouts in the build job but computes the refs in the shared job, but I want to unblock the CI for now.




----------------------------------------------------------------
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.

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