Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tank API V2 Clients Release #245

Merged
merged 73 commits into from
Jun 29, 2023
Merged

Tank API V2 Clients Release #245

merged 73 commits into from
Jun 29, 2023

Conversation

Zakaria-Kofiro
Copy link
Collaborator

@Zakaria-Kofiro Zakaria-Kofiro commented Jun 12, 2023

Tank API V2 Clients Release

This PR contains the addition of Tank V2 API clients to replace the existing V1 clients, as well as updated references in the codebase to point to new V2 endpoints and cloud-api files.

Changes:

  • agent: Main agent logic (apiharness) now uses V2 Clients to make calls while running tests, replacing the agent ready and update agent status calls (PUT /v2/agent/instance/status/instance-id), among other calls. Agent Startup has also been updated with the V2 routes to grab the required files to start agents. Agent Standalone has also been updated with V2 references.

  • api: Cloud API code, mainly VMTracker, that controllers interaction with jobs and agents have been moved out of the V1 cloud api module into the shared api module along with its data models. Since several parts of the codebase depend on this code and models, it makes more sense to move it to the common API module that contains similar logic. Most of the file changes in this PR are import reference changes to point to this new location. Dependency Injection has also been updated to use Java EE CDI across the project over Spring, since switching over to using the Spring Framework for dependency injection would require updating the entire codebase. Java EE CDI will be kept project-wide for now.

  • rest-mvc: Addition of V2 API Clients using Spring WebClient along with Dep Injection changes, log4j configurations and updated references to cloud api code. All references to script data models have been moved to V1 while external scripts are being updated to support V2.

  • rest: Minor changes to V1 module rest to reference the moved cloud api code to pass build over removing in this PR. The module will eventually be sunset as a whole in a follow-up PR.

  • tank_vmManager: Controller logic (i.e JobController) now referencing the moved cloud api code

  • tools: Updated Tank tools to reference new V2 clients, as well as added changes to increase the speed of certain processes (the initial pull for project/scripts list in Agent Debugger Tool is now almost instant regardless of the number of projects/scripts).

  • web: Updated reference to cloud api code, as well as the addition of a temporary banner warning users to replace their version of Tank tools with the updated version with V2 clients. The banner follows the user across screens until closed, where it will stay closed for the session until the user logs in again.

  • Log4j Changes: The introduction of Spring WebClient also introduced a log4j issue affecting logging configurations across modules. These errors affected the creation of logs and resulted in dropped logs. This was resolved by updating each affected module's maven plugins assembly.xml to exclude a cached log4j file while ensuring there were no changes to the build process of the updated modules.

Please make sure these check boxes are checked before submitting

  • ** Squashed Commits **
  • ** All Tests Passed ** - mvn clean test -P default

** PR review process **

  • Requires one +1 from a reviewer
  • Repository owners will merge your PR once it is approved.

zkofiro added 30 commits March 23, 2023 10:29
fix: supports both normal and gzip file uploads

fix: updating get specific script to script JSON description, download handles content

fix: updated max file size and added exception handling for file exceptions

fix: set debug to false

fix: group all exception handlers

fix: updating prefix

fix: unneeded file

fix: reverting file change

Revert "fix: reverting file change"

This reverts commit 0ba90f6.

fix: revert file

fix: reverting file as well

fix: detailed error msg for incorrect request
…, and testing agent client with APIHarness
@Zakaria-Kofiro Zakaria-Kofiro marked this pull request as ready for review June 14, 2023 22:26
@Zakaria-Kofiro Zakaria-Kofiro merged commit ec74378 into master Jun 29, 2023
@Zakaria-Kofiro Zakaria-Kofiro deleted the zkofiro/v2-clients branch June 29, 2023 21:49
Zakaria-Kofiro added a commit that referenced this pull request Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants