diff --git a/.assistance/Vagrantfile b/.assistance/Vagrantfile index 154203b15e99..814206b97b2f 100644 --- a/.assistance/Vagrantfile +++ b/.assistance/Vagrantfile @@ -45,9 +45,6 @@ Vagrant.configure("2") do |config| echo "export GOLANG_VERSION=1.14" >> /home/vagrant/.env echo "export RVM_VERSION=1.29.12" >> /home/vagrant/.env echo "export RUBY_VERSION=2.4.2" >> /home/vagrant/.env - echo "export artifactory_user=$artifactory_user" >> /home/vagrant/.env - echo "export artifactory_password=$artifactory_password" >> /home/vagrant/.env - echo "export GITLAB_PACKAGE_REGISTRY_PYPI_SIMPLE_URL=gitlab.com/api/v4/projects/71271774/packages/pypi/simple" >> /home/vagrant/.env echo "export HOST_DIR=/home/vagrant/stackstate-agent-host" >> /home/vagrant/.env echo "export CI_PROJECT_DIR=/home/vagrant/stackstate-agent" >> /home/vagrant/.env echo "export C_MAKE_SETUP_PATH=~/cmake" >> /home/vagrant/.env diff --git a/.github/workflows/build-deb.yml b/.github/workflows/build-deb.yml index 6fbfe3a4179a..825037edee99 100644 --- a/.github/workflows/build-deb.yml +++ b/.github/workflows/build-deb.yml @@ -112,10 +112,6 @@ jobs: bazel-${{ matrix.arch }}- - name: Build DEB package with omnibus - env: - GITLAB_PACKAGE_REGISTRY_PYPI_SIMPLE_URL: ${{ vars.GITLAB_PACKAGE_REGISTRY_PYPI_SIMPLE_URL }} - GITLAB_PACKAGE_REGISTRY_USER: ${{ secrets.GITLAB_PACKAGE_REGISTRY_USER }} - GITLAB_PACKAGE_REGISTRY_READONLY_PASSWORD: ${{ secrets.GITLAB_PACKAGE_REGISTRY_READONLY_PASSWORD }} run: | set -eo pipefail export PATH="$PATH:/usr/local/go/bin" @@ -173,10 +169,6 @@ jobs: inv agent.version -u > version.txt cat version.txt - # Writes pip.conf + ~/.netrc for the private Python index. Hard-exits if - # the GITLAB_PACKAGE_REGISTRY_* variables above are unset. - source ./.gitlab-scripts/setup_artifact_registry.sh - export LD_LIBRARY_PATH="/opt/stackstate-agent/embedded/lib/python3.12/site-packages/psycopg2_binary.libs:/opt/stackstate-agent/embedded/lib" # --install-directory pins the omnibus paths to the BRANDED install dir. diff --git a/.gitlab-scripts/setup_artifact_registry.sh b/.gitlab-scripts/setup_artifact_registry.sh deleted file mode 100644 index f13aeeb392fd..000000000000 --- a/.gitlab-scripts/setup_artifact_registry.sh +++ /dev/null @@ -1,41 +0,0 @@ -## python artifactory dependency -# pip.conf gets the URL only — no credentials interpolated into the URL. -# Auth goes into ~/.netrc instead, which pip / pip-compile / pip-tools all -# honour for HTTP basic auth without echoing credentials into output -# requirements files. See STAC-24642. - -missing= -for var in GITLAB_PACKAGE_REGISTRY_PYPI_SIMPLE_URL GITLAB_PACKAGE_REGISTRY_USER GITLAB_PACKAGE_REGISTRY_READONLY_PASSWORD; do - if [ -z "${!var}" ]; then - missing="$missing $var" - fi -done -if [ -n "$missing" ]; then - echo "ERROR: Required environment variables not set:$missing" >&2 - exit 1 -fi - -mkdir -p ~/.pip -cat > ~/.pip/pip.conf < ~/.netrc <`, # there's no need to refer to `pip`, the interpreter will pick the right script. # --no-emit-{index-url,find-links}: defence in depth so the resolved - # requirements file does not echo any auth-bearing URL from pip.conf - # back into the image. Source-side fix is in tasks/agent.py and - # .gitlab-scripts/setup_artifactory.sh (STAC-24642); these flags - # prevent future regressions reaching the image even if a pip.conf - # with credentials-in-URL is reintroduced upstream. + # requirements file does not echo any auth-bearing URL from pip.conf back + # into the image (STAC-24642). No authenticated index is configured any more + # (STAC-25553), so these flags now only guard against one being reintroduced. if windows? command "#{python} -m pip install --no-deps #{windows_safe_path(project_dir)}\\stackstate_checks_base" diff --git a/omnibus/package-scripts/publish_image.sh b/omnibus/package-scripts/publish_image.sh index 47a42eaac37e..1858c971bf67 100755 --- a/omnibus/package-scripts/publish_image.sh +++ b/omnibus/package-scripts/publish_image.sh @@ -8,7 +8,6 @@ DOCKERFILE_PATH="${3}" EXTRA_TAG="${4}-${ARCH}" REGISTRY="quay.io" ORGANIZATION="stackstate" -GITLAB_PACKAGE_REGISTRY_PYPI_SIMPLE_URL="https://gitlab.com/api/v4/projects/71271774/packages/pypi/simple" S6_ARCH="${5}" echo "IMAGE_TAG=${IMAGE_TAG}" diff --git a/tasks/omnibus.py b/tasks/omnibus.py index 0cd886d750ec..0274975fe9ae 100644 --- a/tasks/omnibus.py +++ b/tasks/omnibus.py @@ -261,19 +261,6 @@ def build( # If a python_mirror is set then use it for pip by adding it in the pip.conf file pip_index_url = f"[global]\nindex-url = {python_mirror}" if python_mirror else "" - # [sts] Add private GitLab PyPI registry as extra-index-url if credentials are available. - # Credentials are not included in the URL here, they are expected to be in ~/.netrc (see - # .gitlab-scripts/setup_artifact_registry.sh). Without this block, the omnibus-managed - # pip.conf is empty, pip only queries PyPI default, and STS-only packages like - # vsphere-automation-sdk==1.82.0 fail with "Could not find a version that satisfies". - artifact_registry_pypi_url = os.environ.get("GITLAB_PACKAGE_REGISTRY_PYPI_SIMPLE_URL") - if artifact_registry_pypi_url: - python_extra_mirror = f"https://{artifact_registry_pypi_url}" - if pip_index_url: - pip_index_url += f"\nextra-index-url = {python_extra_mirror}" - else: - pip_index_url = f"[global]\nextra-index-url = {python_extra_mirror}" - # We're passing the --index-url arg through a pip.conf file so that omnibus doesn't leak the token with open(pip_config_file, 'w') as f: f.write(pip_index_url)