-
Notifications
You must be signed in to change notification settings - Fork 22
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
Open
robert-bryson
wants to merge
14
commits into
main
Choose a base branch
from
feature/datagov-deploy-refactor
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
f67cd55
sql file added locally and chmodded
robert-bryson b385767
Revert "sql file added locally and chmodded"
robert-bryson 34b36ba
update all refs to datagov-deploy to data.gov repo
robert-bryson 5ab101d
Merge branch 'main' into feature/datagov-deploy-refactor
robert-bryson 163c31a
Merge branch 'main' into feature/datagov-deploy-refactor
robert-bryson 64389c3
feedback response
btylerburton 750be61
Merge branch 'main' into feature/datagov-deploy-refactor
btylerburton 056ef36
Merge branch 'main' into feature/datagov-deploy-refactor
robert-bryson 89fca2c
update install-locaitons-table.sh
robert-bryson 42130a4
Merge branch 'main' into feature/datagov-deploy-refactor
robert-bryson 8560e02
Merge branch 'main' into feature/datagov-deploy-refactor
robert-bryson e981524
Merge branch 'main' into feature/datagov-deploy-refactor
btylerburton 70a2b50
Merge branch 'main' into feature/datagov-deploy-refactor
btylerburton 92c86d0
Merge branch 'main' into feature/datagov-deploy-refactor
btylerburton File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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=_"); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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