Compare commits

..

No commits in common. 'master' and 'bug/sc-240023/wscc-carto-4-carto-2-import-auto-guessing' have entirely different histories.

9
.gitmodules vendored

@ -1,9 +1,12 @@
[submodule "lib/assets/javascripts/cdb"]
path = lib/assets/javascripts/cdb
url = https://github.com/CartoDB/carto.js.git
url = git@github.com:CartoDB/carto.js.git
[submodule "app/assets/stylesheets/old_common"]
path = app/assets/stylesheets/old_common
url = https://github.com/CartoDB/cartodb.css.git
url = git@github.com:CartoDB/cartodb.css.git
[submodule "lib/sql"]
path = lib/sql
url = https://github.com/CartoDB/cartodb-postgresql.git
url = git@github.com:CartoDB/cartodb-postgresql.git
[submodule "private"]
path = private
url = git@github.com:CartoDB/cartodb-private.git

@ -1,4 +0,0 @@
version: 2
submodules:
exclude: all

@ -2,10 +2,9 @@ Development
-----------
### NOTICES
- None yet
- None yet
### Features
* Display GeoParquet link in Catalog [16453](https://github.com/CartoDB/cartodb/pull/16453)
* Display notifications about the new CARTO platform release [16352](https://github.com/CartoDB/cartodb/pull/16352)
* Upgrade to deck.gl 8.5.6 [16338](https://github.com/CartoDB/cartodb/pull/16338)
* Update DO Catalog dependencies and some changes to use bundle on CARTO Workspace [#16325](https://github.com/CartoDB/cartodb/pull/16325)
@ -38,7 +37,6 @@ Development
- Update browser version checker to allow Firefox/100.0 [#16415](https://github.com/CartoDB/cartodb/pull/16415)
- Update analysis schemas after giving required permissions on user promotion [#16390](https://github.com/CartoDB/cartodb/pull/16390)
- Add timeout for SQL API exports [#16377](https://github.com/CartoDB/cartodb/pull/16377)
- Avoid deleting a user if it has shared entities [#16424](https://github.com/CartoDB/cartodb/pull/16424)
- Remove all references to Spatial Data Catalog and Kepler GL maps in on-premises [#16293](https://github.com/CartoDB/cartodb/pull/16293)
- Increase hard-limit of MAX_TABLES_PER_IMPORT [#16374](https://github.com/CartoDB/cartodb/pull/16374)
- Guard code for vizjson users [#16267](https://github.com/CartoDB/cartodb/pull/16267)
@ -99,9 +97,6 @@ Development
- Fix error while rolling back a user migration from one cloud to another [#16421](https://github.com/CartoDB/cartodb/pull/16421)
- Add retry if a timeout is thrown when swapping the tables related with a sync process [#16430](https://github.com/CartoDB/cartodb/pull/16430)
- Add AUTODETECT_SIZE_LIMIT to ogr2ogr process when guessing CSV file column types [#16431](https://github.com/CartoDB/cartodb/pull/16431)
- Log pg locks if there is any problem during a sync table import process [#16432](https://github.com/CartoDB/cartodb/pull/16432)
- Check pg locks during sync table swap and terminate locking queries [#16433](https://github.com/CartoDB/cartodb/pull/16433)
- Add deprecation notice in docs [#16446](https://github.com/CartoDB/cartodb/pull/16446)
4.45.0 (2021-04-14)
-------------------

@ -1,10 +1,3 @@
# [DEPRECATED]
Hey! This content applies only to previous CARTO products.
Please check if it's relevant to your use case. On October 2021 we released the current version of our platform.
You can learn more and read the latest documentation at docs.carto.com
# What is CARTO?
[![Code Climate](https://codeclimate.com/github/CartoDB/cartodb20.png)](https://codeclimate.com/github/CartoDB/cartodb20)

@ -121,8 +121,8 @@ module Carto
force_destroy = params[:force].present?
if !force_destroy && @user.has_shared_entities?
error_message = "Can't delete user. Has shared entities"
render_jsonp(error_message, 401) and return
error_message = "Can't delete @user. 'Has shared entities"
render_jsonp(error_message, 410 ) and return
end
@user.set_force_destroy if force_destroy

@ -111,13 +111,7 @@ module Carto
deletion_password_confirmation = params[:deletion_password_confirmation]
if user.needs_password_confirmation? && !user.validate_old_password(deletion_password_confirmation)
render_jsonp({ message: "Error deleting user: #{PASSWORD_DOES_NOT_MATCH_MESSAGE}" }, 400)
return
end
if user.has_shared_entities?
render_jsonp({ message: "User can't be deleted because there are shared entities. Please, unshare or delete them and try again." }, 401)
return
render_jsonp({ message: "Error deleting user: #{PASSWORD_DOES_NOT_MATCH_MESSAGE}" }, 400) and return
end
user.destroy_account

@ -11,7 +11,7 @@ module CartoDB
THE_GEOM = 'the_geom'.freeze
OVERWRITE_ERROR = 2013
def initialize(table_name, runner, database, user, overviews_creator, synchronization_id, logger = nil)
def initialize(table_name, runner, database, user, overviews_creator, synchronization_id)
@table_name = table_name
@runner = runner
@database = database
@ -25,7 +25,6 @@ module CartoDB
)
@error_code = nil
@synchronization_id = synchronization_id
@logger = logger
end
def run(&tracker)
@ -394,24 +393,6 @@ module CartoDB
end
rescue Exception => exception
if exception.message.include?('canceling statement due to statement timeout')
# Check if the table has any lock and cancel locking queries
locks = user.in_database(as: :superuser).fetch(%Q{
SELECT pid, query
FROM pg_stat_activity
WHERE pid in (
SELECT pid FROM pg_locks l
JOIN pg_class t ON l.relation = t.oid
AND t.relkind = 'r'
WHERE t.relname IN ('#{table_name}')
);
}).all
@logger.append_and_store "Transaction timed out as the table is blocked by other queries. Terminating locking queries and retrying in 60 seconds..." if @logger && locks.present?
locks.each do |lock|
@logger.append_and_store "Terminating query: #{lock[:query]}" if @logger
user.in_database(as: :superuser).execute %Q{
SELECT pg_terminate_backend(#{lock[:pid]});
}
end
sleep(60) # wait 60 seconds and retry the swap
database.transaction do
rename(table_name, temporary_name) if exists?(table_name)

@ -192,7 +192,7 @@ module CartoDB
database = user.in_database
overviews_creator = CartoDB::Importer2::Overviews.new(runner, user)
importer = CartoDB::Synchronization::Adapter.new(name, runner, database, user, overviews_creator, id, @log)
importer = CartoDB::Synchronization::Adapter.new(name, runner, database, user, overviews_creator, id)
importer.run
self.ran_at = Time.now

@ -1,19 +0,0 @@
function ready() {
var div = document.createElement("div");
div.style.position = 'absolute',
div.style.bottom = '40px'
div.style.left = '0'
div.style.right = '0'
div.style.with = '100%'
div.style.padding = '10px'
div.innerHTML = `
<h4>Hey! This content applies only to previous CARTO products</h4>
<p>Please check if it's relevant to your use case. On October 2021 we released a new version of our platform.</p>
<p>You can learn more and read the latest documentation at <a target="_blank" href="https://docs.carto.com">docs.carto.com</a></p>
`;
document.getElementsByTagName("nav")[0].appendChild(div);
}
document.addEventListener("DOMContentLoaded", ready);

@ -267,7 +267,3 @@ texinfo_documents = [
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'http://docs.python.org/': None}
html_js_files = [
'deprecation_popup.js'
]

@ -101,17 +101,6 @@
</router-link>
</p>
</li>
<li
class="u-mb--32 u-mb--12--tablet"
v-if="hasGeoparquetAvailable"
>
<h4 class="text is-small is-txtSoftGrey u-mb--10">
GeoParquet
</h4>
<p class="text is-caption">
<a class="underline" :href="geoparquetUrl" target="_blank">Download</a>
</p>
</li>
</ul>
</div>
</div>
@ -123,7 +112,6 @@ import { temporalAggregationName } from 'new-dashboard/utils/catalog/temporal-ag
import { geometryTypeName } from 'new-dashboard/utils/catalog/geometry-type-name';
import { updateFrequencyName } from 'new-dashboard/utils/catalog/update-frequency-name';
import { sendCustomDimensions } from 'new-dashboard/utils/catalog/custom-dimensions-ga';
import { checkGeoparquetBucket } from 'new-dashboard/utils/catalog/geoparquet';
import CatalogMapPreview from 'new-dashboard/components/Catalog/CatalogMapPreview';
export default {
@ -131,12 +119,6 @@ export default {
components: {
CatalogMapPreview
},
data () {
return {
hasGeoparquetAvailable: false,
geoparquetUrl: undefined
};
},
watch: {
dataset: {
handler (value) {
@ -187,16 +169,10 @@ export default {
id: this.$route.params.entity_id,
type: this.$route.params.entity_type
});
},
async checkIfGeoparquetBucketExists () {
const { ok, url } = await checkGeoparquetBucket(this.$route.params.entity_id);
this.hasGeoparquetAvailable = ok;
this.geoparquetUrl = url;
}
},
mounted () {
this.fetchKeyVariables();
this.checkIfGeoparquetBucketExists();
}
};
</script>

@ -1,9 +0,0 @@
export async function checkGeoparquetBucket (dataset) {
try {
const url = `https://storage.googleapis.com/geoparquet/carto/${dataset}.parquet`;
const response = await fetch(url, { method: 'HEAD' });
return { ok: response.ok, url };
} catch (e) {
return { ok: false };
}
}

@ -1,6 +1,6 @@
{
"name": "cartodb-ui",
"version": "1.0.0-assets.291",
"version": "1.0.0-assets.290",
"description": "CARTO UI frontend",
"repository": {
"type": "git",
@ -23,7 +23,7 @@
"@carto/carto.js": "^4.2.1",
"@carto/toolkit-core": "0.0.1-rc.18",
"@carto/toolkit-custom-storage": "0.0.1-rc.18",
"@carto/viewer": "https://github.com/CartoDB/viewer#v1.0.8",
"@carto/viewer": "github:CartoDB/viewer#v1.0.8",
"@carto/zera": "1.0.7",
"@deck.gl/carto": "8.5.6",
"@deck.gl/core": "8.5.6",
@ -65,7 +65,7 @@
"moment": "2.18.1",
"moment-timezone": "^0.5.13",
"node-polyglot": "1.0.0",
"perfect-scrollbar": "https://github.com/CartoDB/perfect-scrollbar.git#master",
"perfect-scrollbar": "github:CartoDB/perfect-scrollbar.git#master",
"postcss": "5.0.19",
"postcss-scss": "0.4.0",
"postcss-strip-inline-comments": "0.1.5",

@ -208,7 +208,7 @@ steps:
fi
waitFor: ['build-cartodb-onprem', 'build-cartodb', 'build-cartodb-onprem-cron']
timeout: 3600s
timeout: 1800s
substitutions:
_BRANCH_TAG: ${BRANCH_NAME//\//-}
_DOCKER_IMAGE_NAME: gcr.io/cartodb-on-gcp-main-artifacts/builder

@ -155,7 +155,7 @@ steps:
docker build --label="org.opencontainers.image.created=$$(date --rfc-3339=seconds)" --label=org.opencontainers.image.revision=${COMMIT_SHA} -t ${_DOCKER_IMAGE_NAME}-onprem-cron:latest -t ${_DOCKER_IMAGE_NAME}-onprem-cron:${_BRANCH_TAG} -t ${_DOCKER_IMAGE_NAME}-onprem-cron:${SHORT_SHA} -t ${_DOCKER_IMAGE_NAME}-onprem-cron:${_BRANCH_TAG}--${SHORT_SHA} -f Dockerfile.cron .
waitFor: ['build-cartodb-onprem']
timeout: 3600s
timeout: 2700s
images:
- ${_DOCKER_IMAGE_NAME}:${_BRANCH_TAG}--${SHORT_SHA}
- ${_DOCKER_IMAGE_NAME}:${_BRANCH_TAG}

@ -1,3 +1 @@
|1|ueDZd5nj+jew6gJuR6J043fBwRc=|+HaH18kuYx21mjgs1Uz/SWRhQEY= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6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