Skip to content

Commit

Permalink
Merge branch 'master' into issue-1182-cache-update
Browse files Browse the repository at this point in the history
  • Loading branch information
rakeshkky committed Mar 11, 2019
2 parents 7f98d5f + a5b4c5f commit cc45860
Show file tree
Hide file tree
Showing 185 changed files with 5,059 additions and 4,803 deletions.
24 changes: 14 additions & 10 deletions .circleci/ciignore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@
set -eo pipefail
ROOT="$(readlink -f ${BASH_SOURCE[0]%/*}/../)"

# succeed until the script is fixed: https://github.com/hasura/graphql-engine/issues/1161
exit
# make build directory
mkdir -p /build/ciignore

# always build tagged builds
if [[ ! -z "$CIRCLE_TAG" ]]; then
echo "Skipping check for tags"
exit
fi

# always build default branch
if [[ "$CIRCLE_BRANCH" == "master" ]]; then
echo "Skipping check for master branch"
# always build release branch
if [[ "$CIRCLE_BRANCH" = "release-"* ]]; then
echo "Skipping check for release branch"
exit
fi

Expand All @@ -30,8 +30,7 @@ if [[ ! -a "$ROOT/.ciignore" ]]; then
exit # If .ciignore doesn't exists, just quit this script
fi

# Check CIRCLE_COMPARE_URL first and if its not set, check for diff with master.

# get the diff
if [[ ! -z "$CIRCLE_COMPARE_URL" ]]; then
# CIRCLE_COMPARE_URL is not empty, use it to get the diff
if [[ $CIRCLE_COMPARE_URL = *"commit"* ]]; then
Expand All @@ -41,8 +40,12 @@ if [[ ! -z "$CIRCLE_COMPARE_URL" ]]; then
fi
echo "Diff: $COMMIT_RANGE"
changes="$(git diff $COMMIT_RANGE --name-only)"
elif [[ "$CIRCLE_BRANCH" == "master" ]]; then
# CIRCLE_COMPARE_URL is not set, but branch is master, diff with last commit
echo "Diff: HEAD~1"
changes="$(git diff HEAD~1 --name-only)"
else
# CIRCLE_COMPARE_URL is not set, diff with origin/master
# CIRCLE_COMPARE_URL is not set, branch is not master, diff with origin/master
echo "Diff: origin/master..HEAD"
changes="$(git diff-tree --no-commit-id --name-only -r origin/master..HEAD)"
fi
Expand Down Expand Up @@ -72,5 +75,6 @@ if [[ ${#changes[@]} -gt 0 ]]; then
exit
fi

echo "Only ignored files are present in commits, no need to build, fail the job"
exit 1
echo "Only ignored files are present in commits, build is not required, write the skip_job file"
echo "true" > /build/ciignore/skip_job.txt
exit
46 changes: 37 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# anchor refs to be used elsewhere
refs:
skip_job_on_ciignore: &skip_job_on_ciignore
run:
name: checking if job should be terminated or not
command: |
if [ -f /build/ciignore/skip_job.txt ]; then
echo "halting job due to /build/ciignore/skip_job.txt"
circleci-agent step halt
else
echo "no skip_job file present, full steam ahead"
fi
wait_for_postgres: &wait_for_postgres
run:
name: waiting for postgres to be ready
Expand Down Expand Up @@ -65,9 +75,10 @@ refs:
test_server: &test_server
working_directory: ~/graphql-engine
steps:
- checkout
- attach_workspace:
at: /build
- *skip_job_on_ciignore
- checkout
- *wait_for_postgres
- run:
name: test the server
Expand All @@ -79,15 +90,16 @@ refs:
pytest_server: &pytest_server
working_directory: ~/graphql-engine
steps:
- attach_workspace:
at: /build
- *skip_job_on_ciignore
- checkout
- restore_cache:
keys:
- server-app-cache-{{ .Branch }}-{{ .Revision }}
- restore_cache:
keys:
- server-deps-cache-{{ checksum "server/graphql-engine.cabal" }}-{{ checksum "server/stack.yaml" }}
- attach_workspace:
at: /build
- *wait_for_postgres
- run:
name: Install deps
Expand Down Expand Up @@ -119,17 +131,26 @@ jobs:
- image: hasura/graphql-engine-cli-builder:v0.3
working_directory: ~/graphql-engine
steps:
- attach_workspace:
at: /build
- checkout
- run:
name: check build worthiness
command: .circleci/ciignore.sh
- persist_to_workspace:
root: /build
paths:
- ciignore

# build the server binary, and package into docker image
build_server:
docker:
- image: hasura/graphql-engine-server-builder:v0.3
working_directory: ~/graphql-engine
steps:
- attach_workspace:
at: /build
- *skip_job_on_ciignore
- checkout
- *setup_remote_docker
- restore_cache:
Expand Down Expand Up @@ -226,9 +247,10 @@ jobs:
POSTGRES_DB: gql_test
working_directory: /go/src/github.com/hasura/graphql-engine
steps:
- checkout
- attach_workspace:
at: /build
- *skip_job_on_ciignore
- checkout
- restore_cache:
keys:
- cli-vendor-{{ checksum "cli/Gopkg.toml" }}-{{ checksum "cli/Gopkg.lock" }}
Expand Down Expand Up @@ -258,9 +280,10 @@ jobs:
POSTGRES_DB: gql_test
working_directory: /go/src/github.com/hasura/graphql-engine
steps:
- checkout
- attach_workspace:
at: /build
- *skip_job_on_ciignore
- checkout
- restore_cache:
keys:
- cli-vendor-{{ checksum "cli/Gopkg.toml" }}-{{ checksum "cli/Gopkg.lock" }}
Expand Down Expand Up @@ -304,9 +327,10 @@ jobs:
working_directory: ~/graphql-engine
parallelism: 4
steps:
- checkout
- attach_workspace:
at: /build
- *skip_job_on_ciignore
- checkout
- restore_cache:
key:
console-npm-cache-{{ checksum "console/package.json" }}-{{ checksum "console/package-lock.json" }}
Expand Down Expand Up @@ -351,9 +375,10 @@ jobs:
POSTGRES_DB: gql_test
working_directory: ~/graphql-engine
steps:
- checkout
- attach_workspace:
at: /build
- *skip_job_on_ciignore
- checkout
- run:
name: upgrade_test
command: .circleci/server-upgrade/run.sh
Expand All @@ -366,10 +391,11 @@ jobs:
- image: hasura/graphql-engine-deployer:v0.3
working_directory: ~/graphql-engine
steps:
- *setup_remote_docker
- checkout
- attach_workspace:
at: /build
- *skip_job_on_ciignore
- *setup_remote_docker
- checkout
- run:
name: deploy
command: .circleci/deploy.sh
Expand Down Expand Up @@ -413,6 +439,8 @@ workflows:
- test_server_upgrade
- test_cli_with_last_release:
<<: *filter_only_vtags
requires:
- check_build_worthiness
- test_and_build_cli:
<<: *filter_only_vtags
requires:
Expand Down
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/server/ @0x777
/docs/ @rikinsk
/cli/ @shahidhk
/console/ @praveenweb
/console/ @rikinsk
8 changes: 4 additions & 4 deletions console/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
} from './src/components/Services/Data/DataActions';

// import Event Tab parts
import eventRouter from './src/components/Services/EventTrigger/EventRouter';
import eventRouterUtils from './src/components/Services/EventTrigger/EventRouter';
import { eventReducer } from './src/components/Services/EventTrigger';

// import Remote Schema parts
Expand All @@ -31,8 +31,8 @@ import mainState from './src/components/Main/State';
import { changeRequestHeader } from './src/components/ApiExplorer/Actions';
import { validateLogin } from './src/components/Main/Actions';

const filterQueryScss = require('./src/components/Services/Data/TableBrowseRows/FilterQuery.scss');
const tableScss = require('./src/components/Services/Data/TableCommon/Table.scss');
const filterQueryScss = require('./src/components/Common/FilterQuery/FilterQuery.scss');
const tableScss = require('./src/components/Common/TableCommon/Table.scss');

// export GraphiQL parts
export { GraphiQLWrapper };
Expand All @@ -44,7 +44,7 @@ export { UPDATE_CURRENT_SCHEMA, UPDATE_DATA_HEADERS, ACCESS_KEY_ERROR };
export { dataHeaders };

// export Event Tab parts
export { eventRouter, eventReducer };
export { eventRouterUtils, eventReducer };

// export Remote Schema parts
export { getCustomResolverRouter, customResolverReducer };
Expand Down
6 changes: 3 additions & 3 deletions console/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"match-sorter": "^2.3.0",
"multireducer": "^1.0.2",
"piping": "^0.3.0",
"prettier": "^1.13.0",
"prettier": "^1.16.4",
"pretty-error": "^1.2.0",
"prop-types": "^15.6.0",
"query-string": "^6.1.0",
Expand Down
3 changes: 2 additions & 1 deletion console/src/components/404/PageNotFound.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import Helmet from 'react-helmet';
class PageNotFound extends Component {
render() {
const lostImage = require('./404-logo.png');
const styles = require('./Styles.scss');
const styles = require('./PageNotFound.scss');

return (
<div className={styles.viewcontainer}>
<Helmet title="404 - Page Not Found | Hasura" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@
.message {
padding: 50px 20%;
}

.message h1 {
font-size: 54px;
font-weight: bold;
}

.message p {
margin-left: 15px;
}

.message p > a {
font-weight: bold;
}
Expand All @@ -29,12 +32,14 @@

.header {
background: #eee;

h2 {
margin: 0;
padding: 26px;
float: left;
line-height: 26px;
}

.nav {
padding: 20px;
float: left;
Expand Down
Loading

0 comments on commit cc45860

Please sign in to comment.