Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

GitHub Actions workflow to validate go.mod, go.sum, and vendor directory#5498

Merged
ocket8888 merged 12 commits intoapache:masterfrom
zrhoffman:include-go.mod
Feb 4, 2021
Merged

GitHub Actions workflow to validate go.mod, go.sum, and vendor directory#5498
ocket8888 merged 12 commits intoapache:masterfrom
zrhoffman:include-go.mod

Conversation

@zrhoffman
Copy link
Member

What does this PR (Pull Request) do?

As a follow-up to #5229, this PR

  • Adds a GitHub Actions workflow to verify that go.mod, go.sum, and the vendor directory have no uncommitted Git changes when modules are vendored.
  • Removes an unused dependency and updates go.sum
  • Gets go mod vendor to run successfully in the CiaB Traffic Ops integration service's Dockerfile by including the v4-client directory. Error from go mod vendor that is fixed:
    #29 28.09 github.com/apache/trafficcontrol/traffic_ops/testing/api/v4 tested by
    #29 28.09       github.com/apache/trafficcontrol/traffic_ops/testing/api/v4.test imports
    #29 28.09       github.com/apache/trafficcontrol/traffic_ops/v4-client: no matching versions for query "latest"
  • Gets the Dockerized TO and TM unit tests to working again by including go.mod/go.sum in the Docker image.
  • is not related to any Issue

Which Traffic Control components are affected by this PR?

  • CDN in a Box
  • CI tests

What is the best way to verify this PR?

  • Verify the GitHub Action is working as intended.

    • Check the result of the Check Go modules workflow at 0e54b99. The following steps are expected to have failed:

      • Untracked changes to vendored dependencies
      • Changes to go.sum
    • Check the result of the Check Go modules workflow at fb9f772. It is expected to succeed.

  • Run the TO API tests in CDN in a Box. On my computer, it took 55 minutes from the time when the API tests started running.

    docker-compose -f docker-compose.yml -f docker-compose.traffic-ops-test.yml up --no-deps -d edge dns db smtp trafficops-perl trafficops trafficvault integration;
    docker-compose -f docker-compose.traffic-ops-test.yml logs -f integration;
  • Run the Traffic Monitor unit tests in Docker

    docker-compose -f traffic_monitor/tests/docker-compose.yml up --build
  • Run the Traffic Ops unit tests in Docker

    docker-compose -f traffic_ops/app/bin/tests/docker-compose.yml up --build

If this is a bug fix, what versions of Traffic Control are affected?

The following criteria are ALL met by this PR

  • This PR includes tests
  • This PR includes documentation
  • An update to CHANGELOG.md is not necessary
  • This PR includes any and all required license headers
  • This PR DOES NOT FIX A SERIOUS SECURITY VULNERABILITY (see the Apache Software Foundation's security guidelines for details)

@zrhoffman zrhoffman added tests related to tests and/or testing infrastructure cdn-in-a-box related to the Docker-based CDN-in-a-Box system automation related to automated testing/deployment/packaging etc. dependencies Pull requests that update a dependency file labels Feb 4, 2021
@zrhoffman zrhoffman requested a review from ocket8888 February 4, 2021 17:12
Copy link
Contributor

@ocket8888 ocket8888 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - also happy to get rid of some more references to the un-versioned client

@ocket8888 ocket8888 merged commit 3039f2f into apache:master Feb 4, 2021
@zrhoffman zrhoffman deleted the include-go.mod branch February 4, 2021 20:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

automation related to automated testing/deployment/packaging etc. cdn-in-a-box related to the Docker-based CDN-in-a-Box system dependencies Pull requests that update a dependency file tests related to tests and/or testing infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants