Skip to content

Commit

Permalink
Fix playground scio examples, fix playground lint (#31556)
Browse files Browse the repository at this point in the history
  • Loading branch information
Amar3tto authored Jun 11, 2024
1 parent 0d037a9 commit e3dec52
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/playground_backend_precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ jobs:
sudo chmod 644 /etc/apt/trusted.gpg.d/scalasbt-release.gpg
sudo apt-get update --yes
sudo apt-get install sbt --yes
sudo wget https://codeload.github.com/spotify/scio.g8/zip/7c1ba7c1651dfd70976028842e721da4107c0d6d -O scio.g8.zip && unzip scio.g8.zip && mv scio.g8-7c1ba7c1651dfd70976028842e721da4107c0d6d /opt/scio.g8
- name: Set up Cloud SDK and its components
uses: google-github-actions/setup-gcloud@v0
with:
Expand Down
6 changes: 6 additions & 0 deletions playground/backend/containers/scio/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ RUN chown -R appuser:appgroup /opt/playground/backend/executable_files/ && chmod
RUN mkdir -p /opt/sbt-template
RUN chown -R appuser:appgroup /opt/sbt-template

#Download spotify g8 template at specific commit
ARG g8_commit=7c1ba7c1651dfd70976028842e721da4107c0d6d
RUN wget https://codeload.github.com/spotify/scio.g8/zip/$g8_commit -O scio.g8.zip && unzip scio.g8.zip && mv scio.g8-$g8_commit /opt/scio.g8

# Switch to appuser
USER appuser

Expand All @@ -88,6 +92,8 @@ WORKDIR /opt/sbt-template
RUN /opt/playground/backend/new_scio_project.sh
WORKDIR /opt/sbt-template/scio
RUN sbt "+compile"
#chmod is a fix for sbt scala output permission issue that is known in scala-js https://github.com/scala-js/scala-js/issues/4212
RUN chmod -R 0644 /opt/sbt-template/scio/target/scala-*/zinc/*.zip
WORKDIR /

USER root
Expand Down
2 changes: 1 addition & 1 deletion playground/backend/env_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# 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.
GO_LINTER_VERSION=1.51.2
GO_LINTER_VERSION=1.59.1

# Install GO Linter
#wget https://github.com/golangci/golangci-lint/releases/download/v1.42.1/golangci-lint-$GO_LINTER_VERSION-linux-amd64.deb
Expand Down
3 changes: 2 additions & 1 deletion playground/backend/new_scio_project.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@
if [ -d /opt/sbt-template/scio ]; then
cp -r /opt/sbt-template/scio scio
else
{ printf scio\\nscio\\n; yes; } | sbt new spotify/scio-template.g8
{ printf scio\\nscio\\n; yes; } | sbt new file:///opt/scio.g8

echo "Compile / run / fork := false" >> scio/build.sbt
echo "updateOptions := updateOptions.value.withCachedResolution(true)" >> scio/build.sbt
echo "libraryDependencies ++= Seq(\"org.apache.beam\" % \"beam-runners-direct-java\" % beamVersion)" >> scio/build.sbt
fi

0 comments on commit e3dec52

Please sign in to comment.