Skip to content

Commit

Permalink
Don't use configurables for licenses (pixie-io#1458)
Browse files Browse the repository at this point in the history
Summary: This ensures that all cloud builds have a working
credits page with a somewhat graceful though suboptimal
fallback.

Type of change: /kind cleanup

Test Plan: Check the credits page for an OSS cloud build.

---------

Signed-off-by: Vihang Mehta <vihang@pixielabs.ai>
  • Loading branch information
vihangm authored Jun 8, 2023
1 parent c9e7280 commit 7393bdb
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 26 deletions.
2 changes: 1 addition & 1 deletion bazel/ui.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def _pl_webpack_library_impl(ctx):
cmd = env_cmds + ui_shared_cmds_start + cp_cmds + [
'pushd "$TMPPATH/src/ui" &> /dev/null',
'tar -xzf "$BASE_PATH/{}"'.format(ctx.file.deps.path),
'[ ! -d src/configurables/private ] || mv "$BASE_PATH/{}" src/configurables/private/licenses.json'.format(ctx.file.licenses.path),
'mv -f "$BASE_PATH/{}" src/pages/credits/licenses.json'.format(ctx.file.licenses.path),
"retval=0",
"output=`yarn build_prod 2>&1` || retval=$?",
'[ "$retval" -eq 0 ] || (echo $output; echo "Build Failed with Code: $retval"; exit $retval)',
Expand Down
24 changes: 0 additions & 24 deletions src/ui/src/configurables/base/licenses.json

This file was deleted.

3 changes: 2 additions & 1 deletion src/ui/src/pages/credits/credits.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ import { createStyles, makeStyles } from '@mui/styles';
import { buildClass, scrollbarStyles, Footer } from 'app/components';
import { WithChildren } from 'app/utils/react-boilerplate';
import { Copyright } from 'configurable/copyright';
import licenseJson from 'configurable/licenses.json';

import licenseJson from './licenses.json';

const useStyles = makeStyles((theme: Theme) => createStyles({
root: {
Expand Down
8 changes: 8 additions & 0 deletions src/ui/src/pages/credits/licenses.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[
{
"name": "Pixie dependencies",
"url": "https://github.com/pixie-io/pixie",
"spdxID": "NOASSERTION",
"licenseText": "License file not written at build time.\nList of all licenses for the latest release are available at https://storage.googleapis.com/pixie-dev-public/oss-licenses/latest.json\n"
}
]

0 comments on commit 7393bdb

Please sign in to comment.