You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2021/06/08 15:10:13 UTC

[GitHub] [trafficcontrol] ocket8888 commented on a change in pull request #5920: Use ATS 8.1 in CDN in a Box

ocket8888 commented on a change in pull request #5920:
URL: https://github.com/apache/trafficcontrol/pull/5920#discussion_r647538312



##########
File path: infrastructure/cdn-in-a-box/traffic_ops_data/profiles/010-ATS_EDGE_TIER_CACHE.json
##########
@@ -87,7 +87,7 @@
 			"configFile": "records.config",
 			"name": "CONFIG proxy.config.log.logfile_dir",
 			"secure": false,
-			"value": "STRING /var/log/trafficserver"
+			"value": "STRING /opt/trafficserver/var/log/trafficserver"

Review comment:
       Shouldn't this be determined from the RPM the same way the configuration files are for the `chown` step?

##########
File path: infrastructure/cdn-in-a-box/Makefile
##########
@@ -164,6 +180,9 @@ $(ORT_RPM_ABSOLUTE): $(ORT_DIST_RPM)
 	cp -f "$?" "$@"
 
 # Dist rpms
+$(ATS_DIST_RPM): $(ATS_SOURCE)
+	docker-compose -f ../../cache-config/testing/docker/docker-compose-ats-build.yml build --parallel trafficserver_build && docker-compose -f ../../cache-config/testing/docker/docker-compose-ats-build.yml run --rm trafficserver_build

Review comment:
       Don't these `../../`s need to be expanded from some variable?

##########
File path: infrastructure/cdn-in-a-box/bin/ats-version.sh
##########
@@ -0,0 +1,52 @@
+#!/usr/bin/env bash
+# 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.
+
+trap 'echo "Error on line ${LINENO} of ${0}" >/dev/stderr; exit 1' ERR;
+set -o errexit -o nounset -o pipefail
+
+project=trafficserver
+script_dir="$(dirname "$0")"
+ats_version_file="${script_dir}/../cache/ATS_VERSION"
+
+remote_ats_version() {
+  local gitbox_url=https://gitbox.apache.org/repos/asf
+  local repo="${project}.git"
+	local branch refs commit last_tag release

Review comment:
       Inconsistent indentation. You can use whatever you want as long as it's consistent, but just remember that tabs are inherently superior and if you use spaces you're a bad person.

##########
File path: .github/workflows/ciab.yaml
##########
@@ -215,16 +215,52 @@ jobs:
           name: ${{ github.job }}
           path: ${{ github.workspace }}/dist/${{ github.job }}-*.rpm
 
+  trafficserver:
+    if: github.event.pull_request.draft == false
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v2
+      - name: Get commit sha
+        uses: ./.github/actions/fetch-github-branch-sha
+        with:
+          owner: apache
+          repo: trafficserver
+          branch: 8.1.x
+        id: git-repo-sha
+      - name: Display SHA
+        run: echo "${{ steps.git-repo-sha.outputs.sha }}"
+      - name: Check Cache
+        id: ats-rpm-cache
+        uses: actions/cache@v2
+        with:
+          path: ${{ github.workspace }}/dist
+          key: ${{ steps.git-repo-sha.outputs.sha }}-el${{ env.RHEL_VERSION }}-${{ hashFiles('cache-config/testing/docker/trafficserver/**') }}
+      - name: Build ATS RPM
+        if: steps.ats-rpm-cache.outputs.cache-hit != 'true'
+        uses: ./.github/actions/build-ats-test-rpm
+        env:
+          ATC_COMPONENT: ${{ github.job }}
+      - name: Display structure of dist directory
+        run: ls -lR
+        working-directory: ${{ github.workspace }}/dist

Review comment:
       This step and the "Display SHA" seem like the GHA equivalent of `console.debug("myVar is:", myVar)` to me - do you think those add continued value now that the workflow is written?




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