Skip to content
Snippets Groups Projects

Log when deprecated Jira DVCS endpoints are hit

Merged Luke Duncalfe requested to merge 362168-log-when-deprecated-endpoints-are-hit into master
All threads resolved!

What does this MR do and why?

This MR introduces logging when the deprecated Jira DVCS endpoints are hit.

This will allow us to gather data about who is using the endpoints.

QA

To make it easier, comment out the authentication of the Jira user agent:

diff --git a/lib/api/v3/github.rb b/lib/api/v3/github.rb
index 7348ed612fce..11359528e743 100644
--- a/lib/api/v3/github.rb
+++ b/lib/api/v3/github.rb
@@ -29,7 +29,7 @@ class Github < ::API::Base
       feature_category :integrations

       before do
-        authorize_jira_user_agent!(request)
+        # authorize_jira_user_agent!(request)
         authenticate!
         reversible_end_of_life!
       end

Tail the integrations_json.log file:

tail -f log/integrations_json.log

Make the following curl request (replace <YOUR TOKEN> with a PAT for your local user):

curl --location 'http://gdk.test:3000/api/v3/user/repos?private_token=<YOUR TOKEN>'

You should not see a new log appear.

Enable the flag:

Feature.enable(:jira_dvcs_end_of_life_amnesty)

Make the curl request again.

You should see a log appear (note, sometimes due to caching of flag the flag might not enable immediately, just try again in a few seconds).

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #362168 (closed)

Edited by Luke Duncalfe

Merge request reports

Merged results pipeline #875011459 passed

Pipeline: GitLab

#875020864

    Merged results pipeline passed for 42f4f713

    Test coverage 82.56% from 2 jobs

    Merged by Tetiana ChuprynaTetiana Chupryna 1 year ago (May 22, 2023 6:47pm UTC)

    Loading

    Pipeline #875078709 passed

    Pipeline passed for 61336f46 on master

    Test coverage 67.10% from 2 jobs
    10 environments impacted.

    Activity

    Filter activity
    • Approvals
    • Assignees & reviewers
    • Comments (from bots)
    • Comments (from users)
    • Commits & branches
    • Edits
    • Labels
    • Lock status
    • Mentions
    • Merge request status
    • Tracking
  • Luke Duncalfe
  • Carla Drago approved this merge request

    approved this merge request

  • Carla Drago requested review from @brytannia and removed review request for @carlad-gl

    requested review from @brytannia and removed review request for @carlad-gl

  • :wave: @carlad-gl, thanks for approving this merge request.

    This is the first time the merge request is approved. To ensure full test coverage, a new pipeline will be started shortly.

    For more info, please refer to the following links:

  • Tetiana Chupryna approved this merge request

    approved this merge request

  • Tetiana Chupryna resolved all threads

    resolved all threads

  • Tetiana Chupryna enabled an automatic merge when the pipeline for 42f4f713 succeeds

    enabled an automatic merge when the pipeline for 42f4f713 succeeds

  • Tetiana Chupryna mentioned in commit 61336f46

    mentioned in commit 61336f46

  • added workflowstaging label and removed workflowcanary label

  • Please register or sign in to reply
    Loading