servian / techchallengeapp Goto Github PK
View Code? Open in Web Editor NEWApplication for the Servian Tech Test
Home Page: http://www.servian.com/devops
License: MIT License
Application for the Servian Tech Test
Home Page: http://www.servian.com/devops
License: MIT License
as we click on the [official link] it will direct us to
https://github.com/golang/dep which is working but see the below [go.equinox.io] is broken
On Windows, you can download a tarball from go.equinox.io.
as we click on the [official link] it will direct us to
https://github.com/golang/dep which is working but see the below [go.equinox.io] is broken
On Windows, you can download a tarball from go.equinox.io.
Tell us what should happen
Tell us what happens instead
On 16th Feb 2021, a new version of GO 1.16 was released which defaults to "Module-aware mode" i.e. Environment Variable GO111MODULE defaults to "on". To build a docker image for the TechChallengeApp we need to explicitly set this variable to "auto" in the docker file.
Reference: https://golang.org/doc/go1.16#go-command
On Linux: Run command docker build -f Dockerfile .
A successful build of the docker image
Failure to build the docker image
Attached are the Successful logs using GO 1.15 and Failed logs using GO 1.16
DockerImageBuildLogs.zip
License is currently set to me, should be transferred to Vibrato
Docker File:
Describe your issue here.
Current Dockerfile where swagger dependencies are downloaded has issues
Tell us how to reproduce this issue
Tell us what should happen: It should download all the swagger dependencies
Tell us what happens instead; Attaching the correct docker file to download the dependencies
dockerfile.txt
AWS RDS using Postgres 10.4 permissions issue.
pq: permission denied for tablespace pg_default
Adding the app files to an EC2 instance to communicate with the Postgres 10.4 RDS database and running ./TechTestAppLinux updatedb -s
Dropping and recreating table: tasks
DROP TABLE IF EXISTS tasks CASCADE
CREATE TABLE tasks ( id SERIAL PRIMARY KEY, completed boolean NOT NULL, priority integer NOT NULL, title text NOT NULL)
Seeding table with data
Dropping and recreating database: <dbname>
DROP DATABASE IF EXISTS <dbname>
CREATE DATABASE <dbname>
WITH
OWNER = postgres
ENCODING = 'UTF8'
LC_COLLATE = 'en_US.utf8'
LC_CTYPE = 'en_US.utf8'
TABLESPACE = pg_default
CONNECTION LIMIT = -1
TEMPLATE template0;
pq: permission denied for tablespace pg_default
Use Postgres 9.6 for the RDS to solve this issue.
UpdateDB command currently will create a database in the Postgres server. To accommodate different cloud PaaS solutions this should be made optional.
I am unable to create seed test database in my Azure PostgreSQL server. An error is thrown by CREATE DATABASE query in updatedb.go when the owner has the format username@hostname. This format is expected from the pgsql server to be able to connect to it.
servian/TechChallengeApp
I should be able to run below and create seed database in Azure Postgresql server.
./TechChallengeApp updatedb
If I pass DbUser without @, Azure PostgreSQL does not like it. The app is unable to connect to database server.
If I pass DbUser with @, updatedb.go does not like it. It fails at the CREATE DATABASE step,
When running updatedb when the server collation is different than the default collation in the create scripts, it will fail.
Run updatedb against a postgres db with a different collation than en_US.utf8
database should be updated
pq: new collation (en_US.utf8) is incompatible with the collation of the template database (en_US.UTF-8)
Would be nice to be able to pass environment variable arguments to the executable at runtime and/or for the app to read from local environment variables as a way to override what's specified in the the config.toml.
Adds flexibility to certain cloud hosting scenarios. E.g. Running the app daemon inside the HttpPlatformHandler bootstrap on Azure Web Apps generates a random HTTP_PLATFORM_PORT the app needs to listen on, which isn't known until the App Services provider assigns it one when instantiating a new instance.
Fail to Connect to Postgres from Docker 18.0 application
Describe your issue here.
Tell us how to reproduce this issue:
If you are using Postgres 9.3 above with docker 18 the connection to DB Fails
Tell us what should happen
Tell us what happens instead
Syntax error in database setup SQL
Build the executable from source and run "./TechTestApp updatedb" with valid database configuration
Database creation script should execute
Syntax error causes database creation script to fail
When an environment variable is passed or read by the config.go module, it doesn't clean environment variable input of whitespace. This can cause some errors in the app later where whitespace at the beginning or end of a value is unexpected.
Set the environment variable VTT_LISTENPORT to "12345 " causes:
Error creating listener - listen tcp: lookup tcp/12345 : getaddrinfow: The specified class was not found.
If conf settings were cleaned of whitespace the error wouldn't occur.
Clean whitespace using the strings.TrimSpace() method, as per below:
import ( strings )
conf.DbUser = strings.TrimSpace(v.GetString("DbUser"))
conf.DbPassword = strings.TrimSpace(v.GetString("DbPassword"))
conf.DbName = strings.TrimSpace(v.GetString("DbName"))
conf.DbHost = strings.TrimSpace(v.GetString("DbHost"))
conf.DbPort = strings.TrimSpace(v.GetString("DbPort"))
conf.ListenHost = strings.TrimSpace(v.GetString("ListenHost"))
conf.ListenPort = strings.TrimSpace(v.GetString("ListenPort"))
Permission to servian/TechChallengeApp.git denied to sweet-aus.
servian/TechChallengeApp
Found minor errors in 12 different files.
✖License
✖root.go
✖serve.go
✖updatedb.go
✖config.go
✖deamon.go
✖db.go
✖main.go
✖task.go
✖api.go
✖index.go
✖ui.go
✅ Clone the repo
✅ Create a new branch
✅Go through the code
✅ Troubleshoot and update the code locally
✅ Push the code
Unable to push the code to the repository.
Permission to servian/TechChallengeApp.git denied
Let's arrange a meeting and discuss about this.
Currently, versioning is done using a sub-command, the convention with Cobra is to use a flag. We should use the common convention for this rather than our own way.
Example:
https://github.com/nathandines/forge/blob/master/commands/root.go#L26-L36
This means the CI tools that expect the version
sub-command will have to be updated to use the --version
flag instead
docker container unable to authenticate to azure postgresql DB with provided variables.
Describe your issue here.
while docker container trying to connect to postgres db, db.go is expecting 'username@host' if we supply variable in in above mentioned format line 73 in db.go OWNER is expecting 'username' format, this will cause db creation will fail.
both values are supplied using same variable may causing issue.
Azure posgresql rdb
reproducible
clone repo, build and run container
in azure env with postgresql db integration will fail
Tell us how to reproduce this issue
containered app should be able to provision azure postgresql database
Tell us what should happen
containered app not able to provision azure postgresql database
Tell us what happens instead
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.