From 918eaf47367ae825239c785bfec52ecb39474d4e Mon Sep 17 00:00:00 2001 From: Alex Rabey Date: Fri, 11 Oct 2019 14:55:11 -0400 Subject: [PATCH 01/26] Added patch functionality to call an UPSERT to the salesforce rest api --- sfdclib/rest.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sfdclib/rest.py b/sfdclib/rest.py index 801cb65..10f32dc 100644 --- a/sfdclib/rest.py +++ b/sfdclib/rest.py @@ -46,6 +46,12 @@ def post(self, uri, data): response = self._session.post(url, headers=self._get_headers(), json=data) return self._parse_get_post_response(response) + def patch(self, uri, data): + """" HTTP PATCH request""" + url = self._session.construct_url(self._get_api_uri() + uri) + response = self._session.patch(url, headers=self._get_headers(), json=data) + return self._parse_get_post_response(response) + def delete(self, uri): """ HTTP DELETE request """ try: From 470c0df63d0c9f024d8b628fd1ebfa6e859b048b Mon Sep 17 00:00:00 2001 From: Jeremy Budnack Date: Thu, 24 Oct 2019 16:25:05 -0400 Subject: [PATCH 02/26] Set version so we can curate this library separately in Artifactory --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 176654a..4ee073c 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name='sfdclib', - version='0.2.26', + version='0.2.26.1-acv', author='Andrey Shevtsov', author_email='ashevtsov@rbauction.com', packages=['sfdclib'], From a57bacf2c1db22a77ba767c5ec45a0019fe4d439 Mon Sep 17 00:00:00 2001 From: Jeremy Budnack Date: Thu, 24 Oct 2019 16:35:04 -0400 Subject: [PATCH 03/26] Add CICD goodies. --- Jenkinsfile | 23 +++++++++++++++++++++++ Makefile | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 Jenkinsfile create mode 100644 Makefile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..830d9a6 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,23 @@ +pipeline { + agent any + environment { + ARTIFACTORY_CREDS = credentials('ARTIFACTORY_CREDS') + ARTIFACTORY_USER = "${ARTIFACTORY_CREDS_USR}" + ARTIFACTORY_PASSWORD = "${ARTIFACTORY_CREDS_PSW}" + } + stages { + stage('Publish') { + when { + expression { env.BRANCH_NAME.endsWith('-acv') } + } + steps { + sh 'make deploy' + } + } + } + post { + always { + sh 'make --ignore-errors stop-ci' + } + } +} \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..54572f4 --- /dev/null +++ b/Makefile @@ -0,0 +1,33 @@ +CONTAINER_NAME := acv-sfdc-ci +VERSION := $(shell git fetch --tags && git describe --tags) + +.PHONY: clean +clean: + find . -type f -name '.DS_Store' -delete -o -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete + +.PHONY: deps +deps: + pipenv install + pipenv install --dev + +build: clean + git submodule update --init --recursive + @docker build \ + --build-arg ARTIFACTORY_USER=${ARTIFACTORY_USER} \ + --build-arg ARTIFACTORY_PASSWORD=${ARTIFACTORY_PASSWORD} \ + --build-arg VERSION=${VERSION} \ + --tag $(CONTAINER_NAME):$(VERSION) . + +.PHONY: deploy +deploy: build + docker run \ + -e APP_MODE=deploy \ + -e ARTIFACTORY_USER=${ARTIFACTORY_USER} \ + -e ARTIFACTORY_PASSWORD=${ARTIFACTORY_PASSWORD} \ + -v /var/run/docker.sock:/var/run/docker.sock \ + $(CONTAINER_NAME):$(VERSION) + +.PHONY: stop-ci +stop-ci: + docker ps -a -q --filter ancestor=$(CONTAINER_NAME):$(VERSION) | xargs docker rm -f + docker ps -a -q --filter ancestor=mysql:5.7git s | xargs docker rm -f From e4b0b4a2996f50e25c6f6499301bceb39d038187 Mon Sep 17 00:00:00 2001 From: Jeremy Budnack Date: Thu, 24 Oct 2019 16:40:39 -0400 Subject: [PATCH 04/26] Add Dockerfile for building the library --- sfdclib/Dockerfile | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 sfdclib/Dockerfile diff --git a/sfdclib/Dockerfile b/sfdclib/Dockerfile new file mode 100644 index 0000000..25d2efa --- /dev/null +++ b/sfdclib/Dockerfile @@ -0,0 +1,32 @@ +FROM python:3.7.3-alpine3.9 + +RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk && apk add --no-cache gcc bash musl-dev libffi-dev \ +openssl-dev build-base git + +RUN mkdir -p /opt/sfdclib +WORKDIR /opt/sfdclib +RUN pip install --user pipenv +ENV PATH="/root/.local/bin:${PATH}" + +COPY Pipfile /opt/sfdclib/ + +ARG ARTIFACTORY_USER +ENV ARTIFACTORY_USER=$ARTIFACTORY_USER + +ARG ARTIFACTORY_PASSWORD +ENV ARTIFACTORY_PASSWORD=$ARTIFACTORY_PASSWORD + +RUN pipenv lock +RUN pipenv sync --dev + +ARG VERSION +ENV APP_VERSION=$VERSION + +COPY acv_sfclient /opt/sfdclib/acv_sfclient/ +COPY tests /opt/sfdclib/tests/ +COPY .pypirc /root/.pypirc +COPY run.sh /opt/sfdclib/run.sh +COPY setup.py /opt/sfdclib/setup.py + +ENV APP_MODE=$APP_MODE +CMD ["sh", "-c", "./run.sh"] From 557d4e62a88697b2f5bb8eae894797df6335e8bc Mon Sep 17 00:00:00 2001 From: Jeremy Budnack Date: Thu, 24 Oct 2019 16:42:48 -0400 Subject: [PATCH 05/26] Oops --- sfdclib/Dockerfile => Dockerfile | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sfdclib/Dockerfile => Dockerfile (100%) diff --git a/sfdclib/Dockerfile b/Dockerfile similarity index 100% rename from sfdclib/Dockerfile rename to Dockerfile From 0a1e2eabe06d5ad46f8f6912fb6ee1387cfefeca Mon Sep 17 00:00:00 2001 From: Jeremy Budnack Date: Thu, 24 Oct 2019 16:46:39 -0400 Subject: [PATCH 06/26] More additions for building/deploying --- .pypirc | 8 ++++++++ Dockerfile | 6 ++---- run.sh | 10 ++++++++++ 3 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 .pypirc create mode 100755 run.sh diff --git a/.pypirc b/.pypirc new file mode 100644 index 0000000..993e39d --- /dev/null +++ b/.pypirc @@ -0,0 +1,8 @@ +[distutils] +index-servers = + artifactory + +[artifactory] +repository: https://acv.jfrog.io/acv/api/pypi/pypi +username: +password: diff --git a/Dockerfile b/Dockerfile index 25d2efa..59ee4c1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,8 +8,6 @@ WORKDIR /opt/sfdclib RUN pip install --user pipenv ENV PATH="/root/.local/bin:${PATH}" -COPY Pipfile /opt/sfdclib/ - ARG ARTIFACTORY_USER ENV ARTIFACTORY_USER=$ARTIFACTORY_USER @@ -22,11 +20,11 @@ RUN pipenv sync --dev ARG VERSION ENV APP_VERSION=$VERSION -COPY acv_sfclient /opt/sfdclib/acv_sfclient/ -COPY tests /opt/sfdclib/tests/ +COPY sfdclib /opt/sfdclib/sfdclib COPY .pypirc /root/.pypirc COPY run.sh /opt/sfdclib/run.sh COPY setup.py /opt/sfdclib/setup.py +COPY README.* /opt/sfdclib/ ENV APP_MODE=$APP_MODE CMD ["sh", "-c", "./run.sh"] diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..637cd07 --- /dev/null +++ b/run.sh @@ -0,0 +1,10 @@ +[ -z "$APP_MODE" ] && APP_MODE="test" + +sed -i'.old' 's/username:/username: '$(echo $ARTIFACTORY_USER)'/g' /root/.pypirc +sed -i'.old' 's/password:/password: '$(echo $ARTIFACTORY_PASSWORD)'/g' /root/.pypirc +sed -i'.old' 's/\%40/\@/g' /root/.pypirc + +if [ $APP_MODE = "deploy" ]; then + cat /root/.pypirc + python setup.py sdist upload -r artifactory +fi From 7a0881aef2658d6e048b8948268b7e689f0573c1 Mon Sep 17 00:00:00 2001 From: Jeremy Budnack Date: Wed, 21 Apr 2021 14:01:56 -0400 Subject: [PATCH 07/26] Add patch method for the Tooling API client --- setup.py | 2 +- sfdclib/tooling.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 176654a..bb5320c 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name='sfdclib', - version='0.2.26', + version='0.2.26.1', author='Andrey Shevtsov', author_email='ashevtsov@rbauction.com', packages=['sfdclib'], diff --git a/sfdclib/tooling.py b/sfdclib/tooling.py index 45ad9c8..8847119 100644 --- a/sfdclib/tooling.py +++ b/sfdclib/tooling.py @@ -60,6 +60,12 @@ def post(self, uri, data): response = self._session.post(url, headers=self._get_headers(), data=data) return self._parse_get_post_response(response) + def patch(self, uri, data): + ''' HTTP PATCH request ''' + url = self._session.construct_url(self._get_tooling_api_uri() + uri) + response = self._session.patch(url, headers=self._get_headers(), json=data) + return self._parse_get_post_response(response) + def delete(self, uri): ''' HTTP DELETE request ''' try: From 8a0c6707b869fce2d53cf521674e040e3972c7e7 Mon Sep 17 00:00:00 2001 From: Jeremy Budnack Date: Wed, 21 Apr 2021 15:29:03 -0400 Subject: [PATCH 08/26] Fix version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index bb5320c..57ef73a 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name='sfdclib', - version='0.2.26.1', + version='0.2.26.2-acv', author='Andrey Shevtsov', author_email='ashevtsov@rbauction.com', packages=['sfdclib'], From 33086af56df79320cb3c57692f32fa8722556b48 Mon Sep 17 00:00:00 2001 From: Jeremy Budnack Date: Wed, 21 Apr 2021 15:42:36 -0400 Subject: [PATCH 09/26] Fix Jenkinsfile and nexus deploy --- .pypirc | 6 +++--- Dockerfile | 8 ++++---- Jenkinsfile | 16 ++++++++++++---- Makefile | 8 ++++---- run.sh | 9 ++++++--- setup.py | 2 +- 6 files changed, 30 insertions(+), 19 deletions(-) diff --git a/.pypirc b/.pypirc index 993e39d..105d83d 100644 --- a/.pypirc +++ b/.pypirc @@ -1,8 +1,8 @@ [distutils] index-servers = - artifactory + nexus -[artifactory] -repository: https://acv.jfrog.io/acv/api/pypi/pypi +[nexus] +repository: https://nexus.infra.acvauctions.com/repository/pypi-releases/ username: password: diff --git a/Dockerfile b/Dockerfile index 59ee4c1..cf06c94 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,11 +8,11 @@ WORKDIR /opt/sfdclib RUN pip install --user pipenv ENV PATH="/root/.local/bin:${PATH}" -ARG ARTIFACTORY_USER -ENV ARTIFACTORY_USER=$ARTIFACTORY_USER +ARG NEXUS_USER +ENV NEXUS_USER=$NEXUS_USER -ARG ARTIFACTORY_PASSWORD -ENV ARTIFACTORY_PASSWORD=$ARTIFACTORY_PASSWORD +ARG NEXUS_PASSWORD +ENV NEXUS_PASSWORD=$NEXUS_PASSWORD RUN pipenv lock RUN pipenv sync --dev diff --git a/Jenkinsfile b/Jenkinsfile index 830d9a6..74f3534 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,9 +1,17 @@ +@Library('acv-jenkins-lib') +import com.acvJenkins.*; + pipeline { - agent any + agent { + kubernetes { + defaultContainer 'docker' + yaml new GlobalVars().runnerPod() + } + } environment { - ARTIFACTORY_CREDS = credentials('ARTIFACTORY_CREDS') - ARTIFACTORY_USER = "${ARTIFACTORY_CREDS_USR}" - ARTIFACTORY_PASSWORD = "${ARTIFACTORY_CREDS_PSW}" + NEXUS_CREDS = credentials('NEXUS_CREDS') + NEXUS_USER = "${NEXUS_CREDS_USR}" + NEXUS_PASSWORD = "${NEXUS_CREDS_PSW}" } stages { stage('Publish') { diff --git a/Makefile b/Makefile index 54572f4..20a5883 100644 --- a/Makefile +++ b/Makefile @@ -13,8 +13,8 @@ deps: build: clean git submodule update --init --recursive @docker build \ - --build-arg ARTIFACTORY_USER=${ARTIFACTORY_USER} \ - --build-arg ARTIFACTORY_PASSWORD=${ARTIFACTORY_PASSWORD} \ + --build-arg NEXUS_USER=${NEXUS_USER} \ + --build-arg NEXUS_PASSWORD=${NEXUS_PASSWORD} \ --build-arg VERSION=${VERSION} \ --tag $(CONTAINER_NAME):$(VERSION) . @@ -22,8 +22,8 @@ build: clean deploy: build docker run \ -e APP_MODE=deploy \ - -e ARTIFACTORY_USER=${ARTIFACTORY_USER} \ - -e ARTIFACTORY_PASSWORD=${ARTIFACTORY_PASSWORD} \ + -e NEXUS_USER=${NEXUS_USER} \ + -e NEXUS_PASSWORD=${NEXUS_PASSWORD} \ -v /var/run/docker.sock:/var/run/docker.sock \ $(CONTAINER_NAME):$(VERSION) diff --git a/run.sh b/run.sh index 637cd07..829f7b5 100755 --- a/run.sh +++ b/run.sh @@ -1,10 +1,13 @@ [ -z "$APP_MODE" ] && APP_MODE="test" -sed -i'.old' 's/username:/username: '$(echo $ARTIFACTORY_USER)'/g' /root/.pypirc -sed -i'.old' 's/password:/password: '$(echo $ARTIFACTORY_PASSWORD)'/g' /root/.pypirc +sed -i'.old' 's/username:/username: '$(echo $NEXUS_USER)'/g' /root/.pypirc +sed -i'.old' 's/password:/password: '$(echo $NEXUS_PASSWORD)'/g' /root/.pypirc sed -i'.old' 's/\%40/\@/g' /root/.pypirc if [ $APP_MODE = "deploy" ]; then cat /root/.pypirc - python setup.py sdist upload -r artifactory + python setup.py sdist upload -r nexus + EXIT_CODE=$? fi + +exit $EXIT_CODE \ No newline at end of file diff --git a/setup.py b/setup.py index 57ef73a..cfbfb13 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name='sfdclib', - version='0.2.26.2-acv', + version='0.2.26.2', author='Andrey Shevtsov', author_email='ashevtsov@rbauction.com', packages=['sfdclib'], From 8763b16d2eb4a6acab3c5055b5cd3da35bb31d68 Mon Sep 17 00:00:00 2001 From: Jeremy Budnack Date: Wed, 21 Apr 2021 16:11:56 -0400 Subject: [PATCH 10/26] Fix version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 57ef73a..cfbfb13 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name='sfdclib', - version='0.2.26.2-acv', + version='0.2.26.2', author='Andrey Shevtsov', author_email='ashevtsov@rbauction.com', packages=['sfdclib'], From 4d1694e9f78c0059419f0cffbff23e1b8f2ba22d Mon Sep 17 00:00:00 2001 From: Jeremy Budnack Date: Thu, 22 Apr 2021 08:22:28 -0400 Subject: [PATCH 11/26] If PATCH comes back null, do not try to json parse it --- setup.py | 2 +- sfdclib/tooling.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index cfbfb13..68e31a3 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name='sfdclib', - version='0.2.26.2', + version='0.2.26.3', author='Andrey Shevtsov', author_email='ashevtsov@rbauction.com', packages=['sfdclib'], diff --git a/sfdclib/tooling.py b/sfdclib/tooling.py index 8847119..cb571fe 100644 --- a/sfdclib/tooling.py +++ b/sfdclib/tooling.py @@ -64,7 +64,9 @@ def patch(self, uri, data): ''' HTTP PATCH request ''' url = self._session.construct_url(self._get_tooling_api_uri() + uri) response = self._session.patch(url, headers=self._get_headers(), json=data) - return self._parse_get_post_response(response) + if response: + return self._parse_get_post_response(response) + return response def delete(self, uri): ''' HTTP DELETE request ''' From 2598db552a508092ee463ff2fc47327bef88fa3e Mon Sep 17 00:00:00 2001 From: Jeremy Budnack Date: Thu, 22 Apr 2021 08:44:25 -0400 Subject: [PATCH 12/26] Better parsing of response object in case just text is null --- setup.py | 2 +- sfdclib/tooling.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 68e31a3..ae9abd4 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name='sfdclib', - version='0.2.26.3', + version='0.2.26.4', author='Andrey Shevtsov', author_email='ashevtsov@rbauction.com', packages=['sfdclib'], diff --git a/sfdclib/tooling.py b/sfdclib/tooling.py index cb571fe..a082f09 100644 --- a/sfdclib/tooling.py +++ b/sfdclib/tooling.py @@ -64,7 +64,7 @@ def patch(self, uri, data): ''' HTTP PATCH request ''' url = self._session.construct_url(self._get_tooling_api_uri() + uri) response = self._session.patch(url, headers=self._get_headers(), json=data) - if response: + if response and response.text: return self._parse_get_post_response(response) return response From fec6f788722f1364ca64cd404461ac697b9dc2d4 Mon Sep 17 00:00:00 2001 From: Jeremy Budnack Date: Thu, 22 Apr 2021 08:52:18 -0400 Subject: [PATCH 13/26] Use 'is not none' to properly test for null for the response object for tooling patch function --- setup.py | 2 +- sfdclib/tooling.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index ae9abd4..a13dc85 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name='sfdclib', - version='0.2.26.4', + version='0.2.26.5', author='Andrey Shevtsov', author_email='ashevtsov@rbauction.com', packages=['sfdclib'], diff --git a/sfdclib/tooling.py b/sfdclib/tooling.py index a082f09..3e34eb1 100644 --- a/sfdclib/tooling.py +++ b/sfdclib/tooling.py @@ -64,7 +64,8 @@ def patch(self, uri, data): ''' HTTP PATCH request ''' url = self._session.construct_url(self._get_tooling_api_uri() + uri) response = self._session.patch(url, headers=self._get_headers(), json=data) - if response and response.text: + # Had to use "is not None" here to get the desired outcome, despite not being too "pythonic" + if response is not None and response.text is not None: return self._parse_get_post_response(response) return response From ee317049416fe3edda7727ffad2012a1127ba51d Mon Sep 17 00:00:00 2001 From: Jeremy Budnack Date: Fri, 30 Apr 2021 15:47:28 -0400 Subject: [PATCH 14/26] PATCH seems to not be consistent in returning JSON, so making the library a bit more forgiving --- setup.py | 2 +- sfdclib/tooling.py | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index a13dc85..42c465a 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name='sfdclib', - version='0.2.26.5', + version='0.2.26.6', author='Andrey Shevtsov', author_email='ashevtsov@rbauction.com', packages=['sfdclib'], diff --git a/sfdclib/tooling.py b/sfdclib/tooling.py index 3e34eb1..69fc8ea 100644 --- a/sfdclib/tooling.py +++ b/sfdclib/tooling.py @@ -64,10 +64,12 @@ def patch(self, uri, data): ''' HTTP PATCH request ''' url = self._session.construct_url(self._get_tooling_api_uri() + uri) response = self._session.patch(url, headers=self._get_headers(), json=data) - # Had to use "is not None" here to get the desired outcome, despite not being too "pythonic" - if response is not None and response.text is not None: + # Since we can't rely on Salesforce to give us a good JSON response on these PATCH requests, just wrap in + # a try except and hope for the best... + try: return self._parse_get_post_response(response) - return response + except Exception: + return response def delete(self, uri): ''' HTTP DELETE request ''' From 20d9b4c3c257496f43a385e8337e857e77b11f24 Mon Sep 17 00:00:00 2001 From: "Alexander J. Rabey" <46423113+ajrabey@users.noreply.github.com> Date: Thu, 24 Jun 2021 15:42:26 -0700 Subject: [PATCH 15/26] adding apexrest option --- sfdclib/rest.py | 1 + 1 file changed, 1 insertion(+) diff --git a/sfdclib/rest.py b/sfdclib/rest.py index 10f32dc..d7e2948 100644 --- a/sfdclib/rest.py +++ b/sfdclib/rest.py @@ -10,6 +10,7 @@ class SfdcRestApi: """ Class to work with Salesforce REST API """ _API_BASE_URI = "/services/data/v{version}" _SOQL_QUERY_URI = "/query/?{query}" + _API_APEXREST_URI = "/services/apexrest/v{version}" def __init__(self, session): if not session.is_connected(): From f980b0d4d4a9c1e4b39538daadd755fe509d277e Mon Sep 17 00:00:00 2001 From: "Alexander J. Rabey" <46423113+ajrabey@users.noreply.github.com> Date: Thu, 24 Jun 2021 15:55:30 -0700 Subject: [PATCH 16/26] adding version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 42c465a..2eea4d0 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name='sfdclib', - version='0.2.26.6', + version='0.2.26.7', author='Andrey Shevtsov', author_email='ashevtsov@rbauction.com', packages=['sfdclib'], From 99ab27344151d43cc9bae7c30f7c8eb1cb0d1a0c Mon Sep 17 00:00:00 2001 From: "Alexander J. Rabey" <46423113+ajrabey@users.noreply.github.com> Date: Thu, 24 Jun 2021 16:12:22 -0700 Subject: [PATCH 17/26] adding func to call apexrest api --- sfdclib/rest.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sfdclib/rest.py b/sfdclib/rest.py index d7e2948..c15f845 100644 --- a/sfdclib/rest.py +++ b/sfdclib/rest.py @@ -17,6 +17,10 @@ def __init__(self, session): raise Exception("Session must be connected prior to instantiating this class") self._session = session + def _get_apexrest_api_uri(self): + """Returns APEXREST API base URI for this connection""" + return self._API_APEXREST_URI.format(**{'version': self._session.get_api_version()}) + def _get_api_uri(self): """ Returns REST API base URI for this connection """ return self._API_BASE_URI.format(**{'version': self._session.get_api_version()}) From f11e3fa129b2343075c957bd6eac7fec6bb3af55 Mon Sep 17 00:00:00 2001 From: "Alexander J. Rabey" <46423113+ajrabey@users.noreply.github.com> Date: Thu, 24 Jun 2021 16:15:19 -0700 Subject: [PATCH 18/26] version update --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 2eea4d0..92d8f8b 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name='sfdclib', - version='0.2.26.7', + version='0.2.26.8', author='Andrey Shevtsov', author_email='ashevtsov@rbauction.com', packages=['sfdclib'], From d56f914f6c16974e10dcdacc24be73c7ca27dae0 Mon Sep 17 00:00:00 2001 From: "Alexander J. Rabey" <46423113+ajrabey@users.noreply.github.com> Date: Fri, 25 Jun 2021 11:48:51 -0700 Subject: [PATCH 19/26] adding -acv --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 92d8f8b..5b84e90 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name='sfdclib', - version='0.2.26.8', + version='0.2.26.8-acv', author='Andrey Shevtsov', author_email='ashevtsov@rbauction.com', packages=['sfdclib'], From 89d93247971309ec65123025d182c9471ddd614c Mon Sep 17 00:00:00 2001 From: "Alexander J. Rabey" <46423113+ajrabey@users.noreply.github.com> Date: Fri, 25 Jun 2021 13:19:44 -0700 Subject: [PATCH 20/26] Removing version --- setup.py | 2 +- sfdclib/rest.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 5b84e90..ba98b5b 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name='sfdclib', - version='0.2.26.8-acv', + version='0.2.26.9-acv', author='Andrey Shevtsov', author_email='ashevtsov@rbauction.com', packages=['sfdclib'], diff --git a/sfdclib/rest.py b/sfdclib/rest.py index c15f845..6e1545f 100644 --- a/sfdclib/rest.py +++ b/sfdclib/rest.py @@ -10,7 +10,7 @@ class SfdcRestApi: """ Class to work with Salesforce REST API """ _API_BASE_URI = "/services/data/v{version}" _SOQL_QUERY_URI = "/query/?{query}" - _API_APEXREST_URI = "/services/apexrest/v{version}" + _API_APEXREST_URI = "/services/apexrest" def __init__(self, session): if not session.is_connected(): @@ -18,8 +18,8 @@ def __init__(self, session): self._session = session def _get_apexrest_api_uri(self): - """Returns APEXREST API base URI for this connection""" - return self._API_APEXREST_URI.format(**{'version': self._session.get_api_version()}) + """Returns APEXREST API base URI without the version for this connection""" + return self._API_APEXREST_URI def _get_api_uri(self): """ Returns REST API base URI for this connection """ From 7db446d3511ae735ae304014a5c978bc173e2395 Mon Sep 17 00:00:00 2001 From: cantowski <86315377+cantowski@users.noreply.github.com> Date: Wed, 16 Feb 2022 17:31:55 -0500 Subject: [PATCH 21/26] Updating default api version to 53.0 --- sfdclib/session.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sfdclib/session.py b/sfdclib/session.py index f84a5de..4755d08 100644 --- a/sfdclib/session.py +++ b/sfdclib/session.py @@ -5,7 +5,7 @@ class SfdcSession(Session): - _DEFAULT_API_VERSION = "37.0" + _DEFAULT_API_VERSION = "53.0" _LOGIN_URL = "https://{instance}.salesforce.com" _SOAP_API_BASE_URI = "/services/Soap/c/{version}" _XML_NAMESPACES = { From 92d1b23969845edff0a079abe81902f54a6ed006 Mon Sep 17 00:00:00 2001 From: cantowski <86315377+cantowski@users.noreply.github.com> Date: Wed, 16 Feb 2022 17:35:06 -0500 Subject: [PATCH 22/26] Updating version in setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index ba98b5b..b5e62ce 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name='sfdclib', - version='0.2.26.9-acv', + version='0.2.26.10-acv', author='Andrey Shevtsov', author_email='ashevtsov@rbauction.com', packages=['sfdclib'], From 54d6b99ec6250927916ae1fe3e66557631162a68 Mon Sep 17 00:00:00 2001 From: cantowski <86315377+cantowski@users.noreply.github.com> Date: Wed, 16 Feb 2022 17:59:35 -0500 Subject: [PATCH 23/26] Created CODEOWNERS --- .github/CODEOWNERS | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..40cc0ac --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,2 @@ +# These owners will be the default owners for everything in the repo. +* @acv-auctions/enterprise-applications \ No newline at end of file From 18ac04cfa7e1ca665a08c1043c8954fee792a1a6 Mon Sep 17 00:00:00 2001 From: cantowski <86315377+cantowski@users.noreply.github.com> Date: Wed, 16 Feb 2022 18:06:15 -0500 Subject: [PATCH 24/26] Updating CODEOWNERS group --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 40cc0ac..33415f8 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,2 +1,2 @@ # These owners will be the default owners for everything in the repo. -* @acv-auctions/enterprise-applications \ No newline at end of file +* @acv-auctions/Salesforce-Infrastructure \ No newline at end of file From 02f9b29ab58995cd60c73c542ec97f029f127018 Mon Sep 17 00:00:00 2001 From: Chris Antowski <86315377+cantowski@users.noreply.github.com> Date: Wed, 15 Feb 2023 10:31:10 -0500 Subject: [PATCH 25/26] Updating package name --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index b5e62ce..3b102d7 100644 --- a/setup.py +++ b/setup.py @@ -4,8 +4,8 @@ from setuptools import setup setup( - name='sfdclib', - version='0.2.26.10-acv', + name='sfdclib-acv', + version='0.2.26.11', author='Andrey Shevtsov', author_email='ashevtsov@rbauction.com', packages=['sfdclib'], From 4993372747727d3368fa680e2626596b01404268 Mon Sep 17 00:00:00 2001 From: "Alexander J. Rabey" <46423113+ajrabey@users.noreply.github.com> Date: Tue, 1 Aug 2023 08:10:11 -0700 Subject: [PATCH 26/26] version bump --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 3b102d7..29007e6 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name='sfdclib-acv', - version='0.2.26.11', + version='0.2.26.12', author='Andrey Shevtsov', author_email='ashevtsov@rbauction.com', packages=['sfdclib'],