Skip to content

Commit

Permalink
Merge pull request #83 from lyft/merge_apache_20191115a
Browse files Browse the repository at this point in the history
Merge apache 20191115a
  • Loading branch information
Beto Dealmeida authored Nov 15, 2019
2 parents 420602b + 72c56f7 commit 26c7587
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 26 deletions.
4 changes: 1 addition & 3 deletions RELEASING/Dockerfile.from_tarball
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ RUN cd superset/assets \

WORKDIR /home/superset/apache-superset-incubating-$VERSION
RUN pip install --upgrade setuptools pip \
&& pip install -r requirements.txt -r requirements-dev.txt \
&& pip install -e . \
&& rm -rf /root/.cache/pip
&& pip install --no-cache-dir .

RUN flask fab babel-compile --target superset/translations

Expand Down
31 changes: 15 additions & 16 deletions RELEASING/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,18 @@ need to be done at every release.
## Crafting a source release

When crafting a new minor or major release we create
a branch named with the release MAJOR.MINOR version.
a branch named with the release MAJOR.MINOR version (on this example 0.34).
This new branch will hold all PATCH and release candidates
that belong to the MAJOR.MINOR version.

The MAJOR.MINOR branch is normally a "cut" from a specific point in time from the master branch.
Then (if needed) apply all cherries that will make the PATCH

Finally bump the version number on `superset/static/assets/package.json` ::
Finally bump the version number on `superset/static/assets/package.json`:

"version": "0.35.0"
```json
"version": "0.34.1"
```

Commit the change with the version number, then git tag the version with the release candidate and push

Expand Down Expand Up @@ -157,6 +159,16 @@ Now let's ship this RC into svn's dev folder
svn commit -m "Release ${SUPERSET_VERSION_RC}"
```

### Build and test from source tarball

To make a working build given a tarball
```bash
# Build and run a release candidate tarball
./test_run_tarball.sh
# you should be able to access localhost:5001 on your browser
# login using admin/admin
```

### Voting
Now you're ready to start the [VOTE] thread. Here's an example of a
previous release vote thread:
Expand Down Expand Up @@ -218,19 +230,6 @@ deprecations and upgrading-related topics,
make sure to move the content now under the `Next Version` section under a new
section for the new release.

## Build from source tarball

To make a working build given a tarball
```bash
# Building a docker from a tarball
docker build -t apache-superset:${SUPERSET_VERSION_RC} -f Dockerfile.from_tarball . --build-arg VERSION=${SUPERSET_VERSION_RC}

# testing the resulting docker
docker run -p 5001:8088 apache-superset:${SUPERSET_VERSION_RC}
# you should be able to access localhost:5001 on your browser
# login using admin/admin
```

# Refresh documentation website

Every once in a while we want to compile the documentation and publish it.
Expand Down
36 changes: 36 additions & 0 deletions RELEASING/test_run_tarball.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/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.
#
set -e

if [ -z "${SUPERSET_VERSION_RC}" ]; then
echo "SUPERSET_VERSION_RC is required to run this container"
exit 1
fi

# Building a docker from a tarball
docker build --no-cache -t apache-superset:${SUPERSET_VERSION_RC} -f Dockerfile.from_tarball . --build-arg VERSION=${SUPERSET_VERSION_RC}

echo "---------------------------------------------------"
echo "After docker build and run, you should be able to access localhost:5001 on your browser"
echo "login using admin/admin"
echo "---------------------------------------------------"
if ! docker run -p 5001:8088 apache-superset:${SUPERSET_VERSION_RC}; then
echo "---------------------------------------------------"
echo "[ERROR] Seems like this apache-superset:${SUPERSET_VERSION_RC} has a setup/startup problem!"
echo "---------------------------------------------------"
fi
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pathlib2==2.3.4
polyline==1.4.0
prison==0.1.2 # via flask-appbuilder
py==1.8.0 # via retry
pyarrow==0.14.1
pyarrow==0.15.1
pycparser==2.19 # via cffi
pyjwt==1.7.1 # via flask-appbuilder, flask-jwt-extended
pyrsistent==0.15.4 # via jsonschema
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def get_git_sha():
"python-dateutil",
"python-dotenv",
"python-geohash",
"pyarrow>=0.14.1, <0.15.0",
"pyarrow>=0.15.1, <0.16.0",
"pyyaml>=5.1",
"retry>=0.9.2",
"selenium>=3.141.0",
Expand Down
1 change: 1 addition & 0 deletions superset/assets/src/SqlLab/components/SouthPane.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ export class SouthPane extends React.PureComponent {
if (latestQuery) {
if (
isFeatureEnabled(FeatureFlag.SQLLAB_BACKEND_PERSISTENCE) &&
latestQuery.state === 'success' &&
(!latestQuery.resultsKey && !latestQuery.results)
) {
results = <Alert bsStyle="warning">{t('No stored results found, you need to re-run your query')}</Alert>;
Expand Down
10 changes: 5 additions & 5 deletions superset/connectors/druid/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def get_base_broker_url(self) -> str:
base_url = self.get_base_url(self.broker_host, self.broker_port)
return f"{base_url}/{self.broker_endpoint}"

def get_pydruid_client(self) -> PyDruid:
def get_pydruid_client(self) -> "PyDruid":
cli = PyDruid(
self.get_base_url(self.broker_host, self.broker_port), self.broker_endpoint
)
Expand Down Expand Up @@ -829,7 +829,7 @@ def granularity(
return granularity

@staticmethod
def get_post_agg(mconf: Dict) -> Postaggregator:
def get_post_agg(mconf: Dict) -> "Postaggregator":
"""
For a metric specified as `postagg` returns the
kind of post aggregation for pydruid.
Expand Down Expand Up @@ -1441,7 +1441,7 @@ def _create_extraction_fn(dim_spec):
return (col, extraction_fn)

@classmethod
def get_filters(cls, raw_filters, num_cols, columns_dict) -> Filter:
def get_filters(cls, raw_filters, num_cols, columns_dict) -> "Filter":
"""Given Superset filter data structure, returns pydruid Filter(s)"""
filters = None
for flt in raw_filters:
Expand Down Expand Up @@ -1570,7 +1570,7 @@ def get_filters(cls, raw_filters, num_cols, columns_dict) -> Filter:

return filters

def _get_having_obj(self, col: str, op: str, eq: str) -> Having:
def _get_having_obj(self, col: str, op: str, eq: str) -> "Having":
cond = None
if op == "==":
if col in self.column_names:
Expand All @@ -1584,7 +1584,7 @@ def _get_having_obj(self, col: str, op: str, eq: str) -> Having:

return cond

def get_having_filters(self, raw_filters: List[Dict]) -> Having:
def get_having_filters(self, raw_filters: List[Dict]) -> "Having":
filters = None
reversed_op_map = {"!=": "==", ">=": "<", "<=": ">"}

Expand Down

0 comments on commit 26c7587

Please sign in to comment.