From 47501931f24ff5e9f674e1cf7b834a451790ecbd Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Wed, 1 May 2024 16:21:21 +0200 Subject: [PATCH 1/4] remove no longer used test modules --- t/lib/TestApp.pm | 18 ------------------ t/lib/TestContext.pm | 19 ------------------- t/model/release-info.t | 1 - 3 files changed, 38 deletions(-) delete mode 100644 t/lib/TestApp.pm delete mode 100644 t/lib/TestContext.pm diff --git a/t/lib/TestApp.pm b/t/lib/TestApp.pm deleted file mode 100644 index 8a5622a421d..00000000000 --- a/t/lib/TestApp.pm +++ /dev/null @@ -1,18 +0,0 @@ -use strict; -use warnings; - -package # no_index - TestApp; - -use Moose; -extends 'MetaCPAN::Web'; - -# If token returns a value the root controller will attempt to authenticate -# and then Plack::Session will error because something is missing. :-/ -sub token { - return; -} - -__PACKAGE__->meta->make_immutable; - -1; diff --git a/t/lib/TestContext.pm b/t/lib/TestContext.pm deleted file mode 100644 index 08d9c4b61b9..00000000000 --- a/t/lib/TestContext.pm +++ /dev/null @@ -1,19 +0,0 @@ -use strict; -use warnings; - -package # no_index - TestContext; - -use Catalyst::Test 'TestApp'; - -use parent 'Exporter'; - -our @EXPORT_OK = qw( - get_context -); - -sub get_context { - return ( ctx_request('/foo_not_real.txt') )[1]; -} - -1; diff --git a/t/model/release-info.t b/t/model/release-info.t index 90f4f23e0aa..6deb29ebc2e 100644 --- a/t/model/release-info.t +++ b/t/model/release-info.t @@ -1,7 +1,6 @@ use strict; use warnings; -use lib 't/lib'; use Test::More; use Module::Runtime qw( use_module ); From 318c1ede3fe1913534bca83a9ad5a65046b07717 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sun, 28 Apr 2024 17:08:42 +0100 Subject: [PATCH 2/4] update Dockerfile to make hadolint happy --- .hadolint.yaml | 6 ------ Dockerfile | 32 ++++++++++++++++++-------------- 2 files changed, 18 insertions(+), 20 deletions(-) delete mode 100644 .hadolint.yaml diff --git a/.hadolint.yaml b/.hadolint.yaml deleted file mode 100644 index fb29ff61572..00000000000 --- a/.hadolint.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -ignored: - # PDL3007 asks you to pin the FROM version explicitly to a release tag. - - DL3007 - # PDL3007 asks you to pin apt packages to a release tag. - - DL3008 diff --git a/Dockerfile b/Dockerfile index b24479f212c..30a2d86d9ed 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,15 @@ ################### Asset Builder FROM node:22 AS build-assets +SHELL [ "/bin/bash", "-euo", "pipefail", "-c" ] ENV NO_UPDATE_NOTIFIER=1 WORKDIR /build/ -COPY package.json package-lock.json . +COPY package.json package-lock.json ./ RUN \ --mount=type=cache,target=/root/.npm,sharing=private \ -<= 0.30.2)' EOT WORKDIR /metacpan-web/ -COPY cpanfile cpanfile.snapshot . +COPY cpanfile cpanfile.snapshot ./ RUN \ --mount=type=cache,target=/root/.perl-cpm,sharing=private \ <= 21.6.1)' + npm install -g npm@^10.4.0 EOT -COPY package.json package-lock.json . +COPY package.json package-lock.json ./ RUN \ --mount=type=cache,target=/root/.npm,sharing=private \ < Date: Sun, 28 Apr 2024 17:09:21 +0100 Subject: [PATCH 3/4] don't need to mark git hook as executable - it already is --- git/setup.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/git/setup.sh b/git/setup.sh index da4cc2e944b..e2e4ee7c009 100755 --- a/git/setup.sh +++ b/git/setup.sh @@ -1,5 +1,4 @@ #!/bin/bash -chmod +x git/hooks/pre-commit cd .git/hooks ln -s ../../git/hooks/pre-commit From f70da2e8cd092886000c1b3f1a00ef77c0415ba7 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sun, 28 Apr 2024 17:38:28 +0100 Subject: [PATCH 4/4] API handles purging on account changes; we don't need to. --- lib/MetaCPAN/Web/Controller/Account.pm | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/MetaCPAN/Web/Controller/Account.pm b/lib/MetaCPAN/Web/Controller/Account.pm index 22978ae963b..c7eb4f83388 100644 --- a/lib/MetaCPAN/Web/Controller/Account.pm +++ b/lib/MetaCPAN/Web/Controller/Account.pm @@ -159,7 +159,6 @@ sub profile : Local : Args(0) { $c->stash( { author => $data, errors => $res->{errors} } ); } else { - $c->purge_author_key( $data->{pauseid} ) if exists $data->{pauseid}; $c->stash( { success => 1, author => $res } ); } }