-
Notifications
You must be signed in to change notification settings - Fork 20
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 references to the old datagov-deploy repo #1143
base: main
Are you sure you want to change the base?
Changes from 10 commits
f67cd55
b385767
34b36ba
5ab101d
163c31a
64389c3
750be61
056ef36
89fca2c
42130a4
8560e02
e981524
70a2b50
92c86d0
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# gunicorn prior to version 20.1.0 discloses "server" header | ||
# https://github.com/GSA/datagov-deploy/issues/2826 | ||
import gunicorn | ||
gunicorn.SERVER_SOFTWARE = '' | ||
|
||
gunicorn.SERVER_SOFTWARE = "" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,43 @@ | ||
describe('Facets', { testIsolation: false }, () => { | ||
before(() => { | ||
cy.login(); | ||
}); | ||
describe("Facets", { testIsolation: false }, () => { | ||
before(() => { | ||
cy.login(); | ||
}); | ||
|
||
after(() => { | ||
cy.delete_organization('org-tags'); | ||
cy.delete_group('group-facets'); | ||
cy.logout(); | ||
}); | ||
after(() => { | ||
cy.delete_organization("org-tags"); | ||
cy.delete_group("group-facets"); | ||
cy.logout(); | ||
}); | ||
|
||
it('Show datagov facet list on dataset page', () => { | ||
cy.visit('/dataset'); | ||
cy.get('.filters h2').its('length').should('be.equal', 9); | ||
cy.get('.filters h2').first().contains('Topics'); | ||
cy.get('.filters h2').last().contains('Bureaus'); | ||
}); | ||
it("Show datagov facet list on dataset page", () => { | ||
cy.visit("/dataset"); | ||
cy.get(".filters h2").its("length").should("be.equal", 9); | ||
cy.get(".filters h2").first().contains("Topics"); | ||
cy.get(".filters h2").last().contains("Bureaus"); | ||
}); | ||
|
||
it('Show datagov facet list on organization page', () => { | ||
cy.visit('/organization'); | ||
cy.get('a[class="btn btn-primary"]').click(); | ||
cy.create_organization_ui('org-tags', 'tags for org test'); | ||
cy.visit('/organization/org-tags'); | ||
cy.get('.module-shallow').its('length').should('be.equal', 11); | ||
cy.get('.module-shallow').contains('Topics'); | ||
cy.get('.module-shallow').contains('Harvest Source'); | ||
cy.get('.module-shallow').last().contains('Bureaus'); | ||
}); | ||
it("Show datagov facet list on organization page", () => { | ||
cy.visit("/organization"); | ||
cy.get('a[class="btn btn-primary"]').click(); | ||
cy.create_organization_ui("org-tags", "tags for org test"); | ||
cy.visit("/organization/org-tags"); | ||
cy.get(".module-shallow").its("length").should("be.equal", 11); | ||
cy.get(".module-shallow").contains("Topics"); | ||
cy.get(".module-shallow").contains("Harvest Source"); | ||
cy.get(".module-shallow").last().contains("Bureaus"); | ||
}); | ||
|
||
it('Show datagov facet list on group page', () => { | ||
cy.create_group('group-facets'); | ||
cy.visit('/group/group-facets'); | ||
cy.get('.filters h2').its('length').should('be.equal', 6); | ||
cy.get('.filters h2').first().contains('Categories'); | ||
cy.get('.filters h2').last().contains('Organizations'); | ||
}); | ||
it("Show datagov facet list on group page", () => { | ||
cy.create_group("group-facets"); | ||
cy.visit("/group/group-facets"); | ||
cy.get(".filters h2").its("length").should("be.equal", 6); | ||
cy.get(".filters h2").first().contains("Categories"); | ||
cy.get(".filters h2").last().contains("Organizations"); | ||
}); | ||
|
||
// https://github.com/GSA/datagov-deploy/issues/3672 | ||
it('Can visit organization and group facet link', () => { | ||
cy.visit('/organization/org-tags?tags=_'); | ||
cy.visit('/group/group-facets?tags=_'); | ||
}); | ||
// https://github.com/GSA/data.gov/issues/3672 | ||
it("Can visit organization and group facet link", () => { | ||
cy.visit("/organization/org-tags?tags=_"); | ||
cy.visit("/group/group-facets?tags=_"); | ||
}); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
# Locations table | ||
|
||
The locations table [was defined in 2016](https://github.com/GSA/datagov-deploy/search?q=location+table&type=commits). | ||
This table was deleted from the repo but is still available from old commits: [locations.sql.gz](https://github.com/GSA/datagov-deploy/raw/71936f004be1882a506362670b82c710c64ef796/ansible/roles/software/ec2/ansible/files/locations.sql.gz). | ||
The locations table [was defined in 2016](https://github.com/GSA/data.gov/search?q=location+table&type=commits). | ||
This table was deleted from the repo but is still available from old commits: [locations.sql.gz](https://github.com/GSA/data.gov/raw/71936f004be1882a506362670b82c710c64ef796/ansible/roles/software/ec2/ansible/files/locations.sql.gz). | ||
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. This is outdated now that the table is in the docker-entrypoint dir. |
||
|
||
This table could be dd to database with | ||
|
||
``` | ||
```bash | ||
./install-locations-table.sh HOST DB_NAME DB_USER PASS | ||
``` | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
#!/bin/bash | ||
|
||
echo "*** USAGE: $(basename "$0") HOST DB_NAME DB_USER PASS" | ||
|
||
DEST_FOLDER=/tmp | ||
# TODO check path on run | ||
SQL_FILE=30_locations.sql.gz | ||
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. i'm almost positive the pathing needs to be adjusted |
||
HOST=$1 | ||
DB_NAME=$2 | ||
DB_USER=$3 | ||
PASS=$4 | ||
|
||
echo "Downloading locations table" | ||
wget https://github.com/GSA/datagov-deploy/raw/71936f004be1882a506362670b82c710c64ef796/ansible/roles/software/ec2/ansible/files/locations.sql.gz -O $DEST_FOLDER/locations.sql.gz | ||
if ! [ -f $SQL_FILE ]; then | ||
echo "Error: locations.sql file not found, exiting.." | ||
exit 1 | ||
fi | ||
|
||
echo "Creating locations table" | ||
gunzip -c ${DEST_FOLDER}/locations.sql.gz | PGPASSWORD=${PASS} psql -h $HOST -U $DB_USER -d $DB_NAME -v ON_ERROR_STOP=1 | ||
|
||
echo "Cleaning" | ||
rm -f $DEST_FOLDER/locations.sql.gz | ||
gunzip -c ${SQL_FILE} | PGPASSWORD=${PASS} psql -h "$HOST" -U "$DB_USER" -d "$DB_NAME" -v ON_ERROR_STOP=1 | ||
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. my understanding was putting the .gzipped file in the docker-entrypoint dir executes it automatically when catalog starts up... is that correct? and if so, what does this script here do? |
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.
Instead of updating this link, I think referencing a key piece of DB setup (for dev and prod) at a historical git commit to a file that is no longer being tracked isn't good practice. Can we just add the file in the repo similar to the other files in docker-entrypoint-initdb.d folder?
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.
+1 to that