Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

console: Move to rspack/rsbuild #1414

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .direnv/bin/nix-direnv-reload
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
set -e
if [[ ! -d "/Users/santiagojimenez/development/redpanda/console" ]]; then
echo "Cannot find source directory; Did you move it?"
echo "(Looking for "/Users/santiagojimenez/development/redpanda/console")"
echo 'Cannot force reload with this script - use "direnv reload" manually and then try again'
exit 1
fi

# rebuild the cache forcefully
_nix_direnv_force_reload=1 direnv exec "/Users/santiagojimenez/development/redpanda/console" true

# Update the mtime for .envrc.
# This will cause direnv to reload again - but without re-building.
touch "/Users/santiagojimenez/development/redpanda/console/.envrc"

# Also update the timestamp of whatever profile_rc we have.
# This makes sure that we know we are up to date.
touch -r "/Users/santiagojimenez/development/redpanda/console/.envrc" "/Users/santiagojimenez/development/redpanda/console/.direnv"/*.rc
1 change: 1 addition & 0 deletions .direnv/nix-profile-pre674705.b833ff01a0d6
2,027 changes: 2,027 additions & 0 deletions .direnv/nix-profile-pre674705.b833ff01a0d6.rc

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use nix
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ requests.txt
.prettierrc

# Local build tools installed via Taskfiles
build
build
backend/cmd/api/api
82 changes: 82 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# run with:
# docker-compose up
version: "3.7"
services:
redpanda:
image: docker.vectorized.io/vectorized/redpanda:latest
command:
- redpanda start
- --smp 1
- --overprovisioned
- --node-id 0
- --kafka-addr internal://redpanda:29092,external://0.0.0.0:9092
- --advertise-kafka-addr internal://redpanda:29092,external://localhost:9092
- --pandaproxy-addr 0.0.0.0:8082
- --advertise-pandaproxy-addr localhost:8082
- --reserve-memory
- 0M
ports:
- 8081:8081
- 8082:8082
- 9092:9092
- 9644:9644

owl-shop:
#image: quay.io/cloudhut/owl-shop:v1.2.0
image: quay.io/cloudhut/owl-shop:latest
environment:
# - SHOP_KAFKA_BROKERS=localhost:9092
- SHOP_KAFKA_BROKERS=redpanda:29092
- SHOP_KAFKA_TOPICREPLICATIONFACTOR=1
- SHOP_TRAFFIC_INTERVAL_RATE=2
- SHOP_TRAFFIC_INTERVAL_DURATION=0.1s
depends_on:
- redpanda

debezium:
image: debezium/connect:2.0
hostname: debezium
depends_on:
- redpanda
ports:
- "8088:8083"
environment:
BOOTSTRAP_SERVERS: "redpanda:29092"
GROUP_ID: dbz-connect-group
REST_ADVERTISED_HOST_NAME: debezium
CONFIG_STORAGE_TOPIC: dbz-connect-configs
OFFSET_STORAGE_TOPIC: dbz-connect-offsets
STATUS_STORAGE_TOPIC: dbz-connect-status

connect:
image: docker.cloudsmith.io/redpanda/connectors-unsupported/connectors:latest
hostname: connect
depends_on:
- redpanda
ports:
- "8083:8083"
environment:
AWS_ACCESS_KEY_ID:
AWS_SECRET_ACCESS_KEY:
CONNECT_CONFIGURATION: |
key.converter=org.apache.kafka.connect.converters.ByteArrayConverter
value.converter=org.apache.kafka.connect.converters.ByteArrayConverter
group.id=connectors-cluster
offset.storage.topic=_internal_connectors_offsets
config.storage.topic=_internal_connectors_configs
status.storage.topic=_internal_connectors_status
config.storage.replication.factor=-1
offset.storage.replication.factor=-1
status.storage.replication.factor=-1
offset.flush.interval.ms=1000
producer.linger.ms=1
producer.batch.size=131072
config.config.providers=file,secretsManager
config.providers.file.class=org.apache.kafka.common.config.provider.FileConfigProvider
config.providers.secretsManager.class=com.redpanda.connectors.config.provider.aws.SecretsManagerConfigProvider
config.providers.secretsManager.param.secret.prefix=redpanda/my-redpanda-id/connectors/redpanda/
config.providers.secretsManager.param.aws.region=eu-west-1
CONNECT_BOOTSTRAP_SERVERS: redpanda:29092
CONNECT_GC_LOG_ENABLED: "false"
CONNECT_HEAP_OPTS: -Xms512M -Xmx512M
CONNECT_LOG_LEVEL: info
5 changes: 1 addition & 4 deletions frontend/.sample.env
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ PORT=3000
# needed for webpack issue: https://github.com/webpack/webpack/issues/14532
NODE_OPTIONS=--openssl-legacy-provider

# "cra needs webpack 4.29.6, but different version detected"
SKIP_PREFLIGHT_CHECK=true

# forces ui to assume its in dev mode
# - websocket will always connect to "localhost:9090"
# - enables some additional debug logging
Expand All @@ -24,4 +21,4 @@ ESLINT_NO_DEV_ERRORS=true
# REACT_APP_BUILD_TIMESTAMP=32503680000

# Enable all features while developing locally
REACT_APP_ENABLED_FEATURES=SINGLE_SIGN_ON,REASSIGN_PARTITIONS
REACT_APP_ENABLED_FEATURES=SINGLE_SIGN_ON,REASSIGN_PARTITIONS
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
const deps = require('./package.json').dependencies;
module.exports = {
import type { Rspack } from '@rsbuild/core';
import { dependencies } from './package.json';

export const moduleFederationConfig: Rspack.ModuleFederationPluginOptions = {
filename: 'embedded.js',
name: 'rp_console',

exposes: {
'./EmbeddedApp': './src/EmbeddedApp',
'./injectApp': './src/injectApp',
'./config': './src/config.ts',
},

shared: {
...dependencies,
react: {
singleton: true,
requiredVersion: deps.react,
requiredVersion: dependencies.react,
},
'react-dom': {
singleton: true,
requiredVersion: deps['react-dom'],
requiredVersion: dependencies['react-dom'],
},
'@redpanda-data/ui': {
import: '@redpanda-data/ui',
Expand Down
Loading
Loading