-
Notifications
You must be signed in to change notification settings - Fork 213
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
Sqitch docker deployment from jenkins is failing #602
Comments
Few other errors
|
If I have created a manual sqitch registry schema it is using the schema and failing in the next step where it is not finding changes table in sqitch registry. |
Given that it's working in production, it seems like a configuration or permissions issue in your non-prod environment. You're certain that |
$SNOWSQL_USER and $SNOWSQL_ROLE have enough permission to perform the deployment in non-prod. Running Sqitch docker in a Jenkins env, using different pipelines for the deployment. The docker image created for production has only one argument "sf_account" we can see it inside the container under "connection"(var/.snowsql/config) and on "odbc.ini"(/etc/odbc.ini). The docker image created for non- production has extra argument along "sf_region" along with the argument "sf_account" we can see it inside the container under "connection"(var/.snowsql/config) and on "odbc.ini"(/etc/odbc.ini). The weirdest thing is, the non-prod created docker image container runs sqicth deploy to non-prod DB with the region and we can see the history where sqitch related registries logs "odbc 2.21" in the history and can see the "snowsql" run happening on prod DB, not on non-prod DB. Can we use env variables like $SNOWSQL_NP_USER and $SNOWSQL_NP_ACCOUNT in the docker container?
And the deploy command inside the docker container will be |
The environment variables supported by Sqitch are documented in sqitch-environment; I have not noticed use of
I honestly don't know what to tell you that might help here; the original error, |
I just missed out on using $SNOWSQL_ROLE in the above example of JenkinsFile. Yes, added While creating a second docker image, in the Jenkins server where the production docker image existing facing a security error (i.e: Any insights on using variables in two different docker images in a server, still not able to figure out how the non-prod image with The non-prod URL will be |
I am still trying to get help to find more evidence from |
I'm afraid there is way more context for your particular environment than I can follow. Have you got it working? If so, what was the key to make it work? Personally I don't use the |
@theory But the URL we are trying to connect from Jenkins instance is something like abc.def.us-west-2.snowflakecomputing.com. Does sqitch support this kind of URL while connecting with snowsql? And found in the snowsql_rt.log it is not looking for the override config file to look for the new URL mentioned above rather it is using default abc.snowfalkecomputing.com |
Yes, Sqitch supports that kind of url; see here for an example: SQITCH_TEST_SNOWFLAKE_URI: db:snowflake://${{ secrets.SNOWFLAKE_USERNAME }}:${{ secrets.SNOWFLAKE_PASSWORD }}@sra81677.us-east-1/sqitchtest?Driver=Snowflake;warehouse=compute_wh The host name is It could be that the extra subdomains in your example are messing with things, though I'm not sure how. It should be |
Ah, it could cause problems because the format of the URL, as far as I understand is, is
So in your example, |
Looking at the docs, it may be that you need to use a dash instead of a dot between
That's assuming that
That's assuming that |
I have a working Sqitch deployment running in the production with no issues. But the issue is in the lower environment where the target snowflake URL consists an region and it is not able to create a registry while running the sqitch. I have verified the
/etc/odbc.ini
will have the sf_account and sf_region inside the container, related changes in Dockerfile also updated. No issue with the image but running thesqitch deploy --registry sqitch --set DATABASE=$SNOWSQL_DATABASE "db:snowflake://$SNOWSQL_USER:$SNOWSQL_PWD@$SNOWSQL_ACCOUNT.$SNOWSQL_REGION.snowflakecomputing.com/$SNOWSQL_DATABASE?Driver=Snowflake;warehouse=$SNOWSQL_WAREHOUSE;role=$SNOWSQL_ROLE"
is returning an error
003041 (42710): SQL compilation error: Schema 'SQITCH’ already exists, but the current role has no privileges on it. If “snowsql” unexpectedly returned exit value 5
Able to create/drop other schemas as well as
sqitch/lib/App/Sqitch/Engine/snowflake.sql
Line 1 in 1fb6713
The text was updated successfully, but these errors were encountered: