-
Notifications
You must be signed in to change notification settings - Fork 508
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
Remove pop from Proxy & RDBMS storage getter #511
Changes from all commits
57314df
9f09cd7
1777208
e330327
49b8e6d
6cef1fc
2c59093
1dc9123
0928c47
fe9e55c
6d3098a
6dd18fb
aec759d
f1f01fc
384eaea
e2046f1
414f4ac
aa47460
c203fed
3884e17
1054f41
0023831
4349ae2
4e036c8
6289fed
2974ae8
1f57cdb
3add1e4
04a471e
9e69dfc
c1921a1
bdf8211
97ea321
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,8 +7,8 @@ go: | |
env: | ||
global: | ||
- PATH=${PATH}:./bin | ||
- POP_PATH=$PWD/cmd/proxy | ||
- GO_ENV=test_postgres | ||
- POP_PATH=$PWD/cmd/olympus | ||
- GO_ENV=test | ||
- MINIO_ACCESS_KEY=minio | ||
- MINIO_SECRET_KEY=minio123 | ||
- ATHENS_MONGO_CONNECTION_STRING=mongodb://127.0.0.1:27017 | ||
|
@@ -20,8 +20,9 @@ before_script: | |
- make setup-dev-env | ||
- wget "https://dl.minio.io/server/minio/release/linux-amd64/minio" | ||
- chmod +x minio && nohup ./minio server . & | ||
- buffalo db create | ||
- buffalo db migrate up | ||
- buffalo db create -e $GO_ENV -d -c $POP_PATH/database.yml | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why do we need this if we're removing pop and rdbms storage? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See below! |
||
- buffalo db migrate up -e $GO_ENV -d -c $POP_PATH/database.yml | ||
|
||
|
||
script: | ||
- make verify test-unit test-e2e | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,57 @@ | ||
-- MySQL dump 10.13 Distrib 5.7.21, for osx10.13 (x86_64) | ||
-- | ||
-- Host: 127.0.0.1 Database: athens | ||
-- ------------------------------------------------------ | ||
-- Server version 5.7.21 | ||
|
||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | ||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; | ||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; | ||
/*!40101 SET NAMES utf8 */; | ||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; | ||
/*!40103 SET TIME_ZONE='+00:00' */; | ||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; | ||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; | ||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; | ||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; | ||
|
||
-- | ||
-- Table structure for table `schema_migration` | ||
-- | ||
|
||
DROP TABLE IF EXISTS `schema_migration`; | ||
/*!40101 SET @saved_cs_client = @@character_set_client */; | ||
/*!40101 SET character_set_client = utf8 */; | ||
CREATE TABLE `schema_migration` ( | ||
`version` varchar(255) NOT NULL, | ||
UNIQUE KEY `version_idx` (`version`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
/*!40101 SET character_set_client = @saved_cs_client */; | ||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; | ||
|
||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; | ||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; | ||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; | ||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; | ||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; | ||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; | ||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; | ||
|
||
-- Dump completed on 2018-06-06 12:42:59 | ||
-- | ||
-- PostgreSQL database dump | ||
-- | ||
|
||
-- Dumped from database version 9.6.9 | ||
-- Dumped by pg_dump version 10.4 | ||
|
||
SET statement_timeout = 0; | ||
SET lock_timeout = 0; | ||
SET idle_in_transaction_session_timeout = 0; | ||
SET client_encoding = 'UTF8'; | ||
SET standard_conforming_strings = on; | ||
SELECT pg_catalog.set_config('search_path', '', false); | ||
SET check_function_bodies = false; | ||
SET client_min_messages = warning; | ||
SET row_security = off; | ||
|
||
-- | ||
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: | ||
-- | ||
|
||
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; | ||
|
||
|
||
-- | ||
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: | ||
-- | ||
|
||
COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language'; | ||
|
||
|
||
SET default_tablespace = ''; | ||
|
||
SET default_with_oids = false; | ||
|
||
-- | ||
-- Name: schema_migration; Type: TABLE; Schema: public; Owner: postgres | ||
-- | ||
|
||
CREATE TABLE public.schema_migration ( | ||
version character varying(255) NOT NULL | ||
); | ||
|
||
|
||
ALTER TABLE public.schema_migration OWNER TO postgres; | ||
|
||
-- | ||
-- Name: schema_migration_version_idx; Type: INDEX; Schema: public; Owner: postgres | ||
-- | ||
|
||
CREATE UNIQUE INDEX schema_migration_version_idx ON public.schema_migration USING btree (version); | ||
|
||
|
||
-- | ||
-- PostgreSQL database dump complete | ||
-- | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,5 @@ | ||
package models | ||
|
||
import ( | ||
"log" | ||
|
||
"github.com/gobuffalo/pop" | ||
"github.com/gomods/athens/pkg/config/env" | ||
) | ||
|
||
// DB is a connection to your database to be used | ||
// throughout your application. | ||
var DB *pop.Connection | ||
|
||
func init() { | ||
var err error | ||
env := env.GoEnvironmentWithDefault("development") | ||
DB, err = pop.Connect(env) | ||
if err != nil { | ||
log.Fatal(err) | ||
} | ||
pop.Debug = env == "development" | ||
|
||
} |
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need POP_PATH at all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes! because we still have the CDN rdbms driver which is dependent on Pop. So, I made sure that the proxy is independent of
Pop
butolympus
is not.Once, we have voted on CDN to be kicked out of olympus, the next step would be to create a PR that basically removes
POP_PATH
from travisThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@manugupt1 so say we keep CDN, do we still need RDBMS in the CDN? can we not remove RDBMS and use another storage for CDN?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right on!
So, if we decide not to support the RDBMS driver for CDN, we do not need it at all.
For example,
https://github.com/gomods/athens/blob/master/pkg/cdn/metadata/cdn_metadata_entry.go#L14-L19
Supports both mongo and SQL based tags!
If we remove the rdbms driver that stores the metadata https://github.com/gomods/athens/tree/master/pkg/cdn/metadata/rdbms
Then, we can remove all the dependency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we decided to remove RDBMS from anything Athens related, but we can do it in another PR. @arschles correct me if im wrong :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh cool! I was not aware of of that! Let us wait for @arschles to confirm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do believe that RDBMS in CDN is without use. there are no relationships there so any document db will do just fine. Let's get rid of it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to address it in this or a separate PR @manugupt1