Skip to content

Commit 8694525

Browse files
ezilber-akamaiyec-akamaiykim-akamaiAniJ98dependabot[bot]
authored
Merge main into proj/linodego_v2.0 (#675)
* Support missing domain-related endpoints for API parity (#620) * update domains * nit * test: Update default test image to reflect the deprecation of Debian 9 support (#623) * update tests since debian9 support ended * update tests since debian9 support ended * Added support for updated Reserved IP behavior to existing resources (instance, network_ips) (#610) * added reserved field to InstanceIP struct for IP Reservation response * Reserved IP resource for handling IP reservation API's * Added integration test covering multiple scenarios of reserving IP addresses * The fixture files for different scenarios of IP Reservation - EndToEnd, InsuffecientPermission, ReserveIP, GetReservedIP, getReservedIPs, DeleteReservedIPs * Updated the fixture files with responses after the user has permissions to reserve IP * Changed the error message to relay invalid token for insufficient permission tests * Updated the error message for Insufficient Permission tests to display appropriate error message along with code * Made changes to Delete, List, Get, Reserve, EndtoEnd fixtures to record user with adequate permissions * changed variable name from id to address to keep it consistent with other functions * Made changes to variable names, achanged logf statements to errorf and fatalf wherever necessary * changed fixture file names to improve consistency, re-recorded fixtures with latest error messages * removed debugging fmt statement * Made changes to reserve IP addresses before listing them using fitler feature. Removed for loop to reserve IPs till limit is reached. * uncommenting unaffected tests * Made changes to error messages, added mandatory checks and re-recorded fixtures to reflect new error messages * Added new middleware system (#571) * build(deps): bump golang.org/x/oauth2 from 0.22.0 to 0.23.0 (#574) * build(deps): bump golang.org/x/oauth2 from 0.22.0 to 0.23.0 Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.22.0 to 0.23.0. - [Commits](golang/oauth2@v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/oauth2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Ran make tidy --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: ezilber-akamai <ezilber@akamai.com> * build(deps): bump golang.org/x/text from 0.17.0 to 0.18.0 (#575) * build(deps): bump golang.org/x/text from 0.17.0 to 0.18.0 Bumps [golang.org/x/text](https://github.com/golang/text) from 0.17.0 to 0.18.0. - [Release notes](https://github.com/golang/text/releases) - [Commits](golang/text@v0.17.0...v0.18.0) --- updated-dependencies: - dependency-name: golang.org/x/text dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * make tidy --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ye Chen <yechen@akamai.com> * new: Add support LKE, Volume, NodeBalancer, and network transfer pricing endpoints (#573) * Add LKE types endpoints * Support base struct; add NB types endpoints * Add volume types * Add network transfer prices * Add price and region price structs * Revert IPv6 fixtures * Add missing fixtures * Add test case for ip limit exceed * add cleanup for TestReservedIPAddresses_ExceedLimit * added interactions to fixture and changed the ecpected error message * Added note indicating feature is currently not available to all users * added support for creating a linode with reserved IP address along with associated tests * Added support for adding additional reserved IP to linodes along with the corresponding tests and fixtures * added ipv4 field in the InstanceCreateOptions struct * moved InstanceReservedIPOptions and the method to AddReservedIPToInsatance to instance_ips.go * Split the variants tests of createInstanceWithReservedIP into individual test funcitons and removed debugging log statements * Re-recorded fixtures after splitting variants test into individual test functions, made changes to error messages * added teardown funcitnality to handle accidental instance creations * removed unnecessary defer keyword from test functions * moved tests related to creating a linode with reserved IP and adding additonal reserved IPs to a linode to a separate file * Removing the sensitive token from the previous commit * made changes to maintain consistency and improve readability * added tests for deletion of linode created with reserved IP address * added test for verifying the status of the reserved field when listing addresses of a linode * Added support for existing resources to support reserved IP feature and corresponding tests * Updated fixtures with required interactions for reserved IP feature and recorded new ones for allocating and assigning reserved IPs * changed the name of the test function to keeop it more succinct * setting reserved as an optional field * Made change to make reserved a part of the update IP address functionality * Removed test for exceeding IP MAX and changed the type of the reserved field in the IPAddressUpdateOptions struct * Changed struct name from LinodeReserveIPOptions to AllocateReserveIPOptions --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Erik Zilber <ezilber@akamai.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ye Chen <yechen@akamai.com> Co-authored-by: Lena Garber <114949949+lgarber-akamai@users.noreply.github.com> Co-authored-by: ykim-1 <ykim@akamai.com> Co-authored-by: Zhiwei Liang <121905282+zliang-akamai@users.noreply.github.com> * build(deps): bump github.com/go-resty/resty/v2 from 2.16.1 to 2.16.2 (#629) * build(deps): bump github.com/go-resty/resty/v2 from 2.16.1 to 2.16.2 Bumps [github.com/go-resty/resty/v2](https://github.com/go-resty/resty) from 2.16.1 to 2.16.2. - [Release notes](https://github.com/go-resty/resty/releases) - [Commits](go-resty/resty@v2.16.1...v2.16.2) --- updated-dependencies: - dependency-name: github.com/go-resty/resty/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * make tidy --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Zhiwei Liang <zliang@akamai.com> Co-authored-by: Zhiwei Liang <121905282+zliang-akamai@users.noreply.github.com> Co-authored-by: Jacob Riddle <87780794+jriddle-linode@users.noreply.github.com> * build(deps): bump slackapi/slack-github-action from 1.27.0 to 2.0.0 (#619) * build(deps): bump slackapi/slack-github-action from 1.27.0 to 2.0.0 Bumps [slackapi/slack-github-action](https://github.com/slackapi/slack-github-action) from 1.27.0 to 2.0.0. - [Release notes](https://github.com/slackapi/slack-github-action/releases) - [Commits](slackapi/slack-github-action@v1.27.0...v2.0.0) --- updated-dependencies: - dependency-name: slackapi/slack-github-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * fix payloads * fix smoke test --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jacob Riddle <87780794+jriddle-linode@users.noreply.github.com> Co-authored-by: ykim-1 <ykim@akamai.com> Co-authored-by: Youjung Kim <126618609+ykim-akamai@users.noreply.github.com> * doc: Remove Image Services Gen2 LA notice (#628) * remove la * oops * build(deps): bump github.com/stretchr/testify from 1.9.0 to 1.10.0 (#631) * build(deps): bump github.com/stretchr/testify from 1.9.0 to 1.10.0 Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.9.0 to 1.10.0. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](stretchr/testify@v1.9.0...v1.10.0) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * make tidy --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Zhiwei Liang <zliang@akamai.com> Co-authored-by: Zhiwei Liang <121905282+zliang-akamai@users.noreply.github.com> * build(deps): bump golang.org/x/oauth2 from 0.23.0 to 0.24.0 (#608) * build(deps): bump golang.org/x/oauth2 from 0.23.0 to 0.24.0 Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.23.0 to 0.24.0. - [Commits](golang/oauth2@v0.23.0...v0.24.0) --- updated-dependencies: - dependency-name: golang.org/x/oauth2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * make tidy --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Zhiwei Liang <zliang@akamai.com> * build(deps): bump golang.org/x/net from 0.30.0 to 0.31.0 (#614) * build(deps): bump golang.org/x/net from 0.30.0 to 0.31.0 Bumps [golang.org/x/net](https://github.com/golang/net) from 0.30.0 to 0.31.0. - [Commits](golang/net@v0.30.0...v0.31.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * make tidy --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Zhiwei Liang <zliang@akamai.com> * doc: add info for kubeconfig as base64 (#607) Co-authored-by: Zhiwei Liang <121905282+zliang-akamai@users.noreply.github.com> * Added support for missing User-related fields (#622) * Added support for missing user fields * Reran GetMonthlyTransfer fixture * Add hardware type and linode label fields to volume struct (#604) * Add hardware type and linode label fields to volume struct * Update tests * build(deps): bump golang.org/x/text from 0.20.0 to 0.21.0 (#638) * build(deps): bump golang.org/x/text from 0.20.0 to 0.21.0 Bumps [golang.org/x/text](https://github.com/golang/text) from 0.20.0 to 0.21.0. - [Release notes](https://github.com/golang/text/releases) - [Commits](golang/text@v0.20.0...v0.21.0) --- updated-dependencies: - dependency-name: golang.org/x/text dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * make tidy --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ye Chen <yechen@akamai.com> * build(deps): bump golang.org/x/net from 0.31.0 to 0.32.0 (#637) * build(deps): bump golang.org/x/net from 0.31.0 to 0.32.0 Bumps [golang.org/x/net](https://github.com/golang/net) from 0.31.0 to 0.32.0. - [Commits](golang/net@v0.31.0...v0.32.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * make tidy --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Zhiwei Liang <zliang@akamai.com> * Updated migrations field to be pointer (#639) * Added support for missing Service Transfer related endpoints (#632) * Added support for service transfers * Fix lint * Reran GetMonthlyTransfer fixture * Added support for missing Obj-related endpoints (#634) * Added missing obj related endpoints * Fix lint * Added unit test * Fixed time format to match API response * Reran GetMonthlyTransfer fixture * Addressed PR comments * Ran make tidy * add account test coverage (#636) * new: Introduce UpdateIPAddressV2; deprecate UpdateIPAddress (#641) * Introduce UpdateIPAddressV2; deprecate UpdateIPAddress * Update fixtures * Add advanced CodeQL and dependencies review workflows (#640) * NewClient panics if http.client is nil and LINODE_CA is set (#635) I tried a new linodego with a custom CA and a nil HTTP client and encountered a panic. Co-authored-by: Zhiwei Liang <121905282+zliang-akamai@users.noreply.github.com> * build(deps): bump golang.org/x/net from 0.32.0 to 0.33.0 (#646) * build(deps): bump golang.org/x/net from 0.32.0 to 0.33.0 Bumps [golang.org/x/net](https://github.com/golang/net) from 0.32.0 to 0.33.0. - [Commits](golang/net@v0.32.0...v0.33.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * make tidy --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Zhiwei Liang <zliang@akamai.com> Co-authored-by: Erik Zilber <ezilber@akamai.com> * Support DBaaS V2.0 (#633) * Implemented changes for DBaaS v2.0 and added deprecation notices * Added fork field to ManagedDB struct * Addressed PR comments * Addressed more PR comments * build(deps): bump golang.org/x/net from 0.33.0 to 0.34.0 (#650) * build(deps): bump golang.org/x/net from 0.33.0 to 0.34.0 Bumps [golang.org/x/net](https://github.com/golang/net) from 0.33.0 to 0.34.0. - [Commits](golang/net@v0.33.0...v0.34.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * make tidy * Update the fixture --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Lena Garber <lgarber@akamai.com> Co-authored-by: Zhiwei Liang <zliang@akamai.com> * build(deps): bump golang.org/x/oauth2 from 0.24.0 to 0.25.0 (#648) * build(deps): bump golang.org/x/oauth2 from 0.24.0 to 0.25.0 Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.24.0 to 0.25.0. - [Commits](golang/oauth2@v0.24.0...v0.25.0) --- updated-dependencies: - dependency-name: golang.org/x/oauth2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * make tidy --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Zhiwei Liang <zliang@akamai.com> * Remove unnecessary permissions (#643) * Add unit test coverage for Type, Vlan and Tag related methods/functions (#647) * types_unit_tests * vlan_tests * unit_test_tag * address_PR_comments * fix * fix lint * VPU Support (#645) ## 📝 Description **What does this PR do and why is this change necessary?** Adds `AcceleratedDevices` to `Instnace.Stats` and `GET linode/types` Also adds `NETINT Quadra T1U` Capability enum. ## ✔️ How to Test **How do I run the relevant unit/integration tests?** ``` make fixtures ARGS="-run TestInstance_withVPU" ``` * Support `tier` field for LKE-E (#651) * Support tier field for LKE-E * Reran fixture for failing test * build(deps): bump github.com/go-resty/resty/v2 from 2.16.2 to 2.16.3 (#653) * build(deps): bump github.com/go-resty/resty/v2 from 2.16.2 to 2.16.3 Bumps [github.com/go-resty/resty/v2](https://github.com/go-resty/resty) from 2.16.2 to 2.16.3. - [Release notes](https://github.com/go-resty/resty/releases) - [Commits](go-resty/resty@v2.16.2...v2.16.3) --- updated-dependencies: - dependency-name: github.com/go-resty/resty/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * make tidy --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ye Chen <yechen@akamai.com> * Add support for object storage services gen2 (#649) * rfc: doPOSTRequestNoResponseBody (#654) Co-authored-by: Ye Chen <127243817+yec-akamai@users.noreply.github.com> * Add unit test coverage for Stackscripts, Database and Region related methods/functions (#652) * unit_tests * add_test * database_tests * test/workflow: Update make test commands and related workflows (#657) * update make test commands and workflows * add TEST_ARGS to unit and integration test commands * roll back boto3 version for test report upload * Added missign db-related fields (#659) * remove unnecessary TEST_ARGS (#664) * build(deps): bump github.com/go-resty/resty/v2 from 2.16.3 to 2.16.5 (#662) * build(deps): bump github.com/go-resty/resty/v2 from 2.16.3 to 2.16.5 Bumps [github.com/go-resty/resty/v2](https://github.com/go-resty/resty) from 2.16.3 to 2.16.5. - [Release notes](https://github.com/go-resty/resty/releases) - [Commits](go-resty/resty@v2.16.3...v2.16.5) --- updated-dependencies: - dependency-name: github.com/go-resty/resty/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * make tidy --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Zhiwei Liang <121905282+zliang-akamai@users.noreply.github.com> Co-authored-by: Zhiwei Liang <zliang@akamai.com> * Checking for DefaultTransport in NewClient (#663) * new tests * do not compare against defaulttransport * Add unit test coverage for Volume,Volume types and Longview related methods/functions (#661) * unit_tests * add_test * database_tests * volume_unittests * fix * fix * longview_tests * fix int_test * Reformatted endpoint functions to simplify them (#668) * add domain and domain record unit test coverage (#656) * build(deps): bump crazy-max/ghaction-github-labeler from 5.1.0 to 5.2.0 (#667) Bumps [crazy-max/ghaction-github-labeler](https://github.com/crazy-max/ghaction-github-labeler) from 5.1.0 to 5.2.0. - [Release notes](https://github.com/crazy-max/ghaction-github-labeler/releases) - [Commits](crazy-max/ghaction-github-labeler@b54af0c...31674a3) --- updated-dependencies: - dependency-name: crazy-max/ghaction-github-labeler dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Lena Garber <114949949+lgarber-akamai@users.noreply.github.com> Co-authored-by: Jacob Riddle <87780794+jriddle-linode@users.noreply.github.com> * build(deps): bump golang.org/x/oauth2 from 0.25.0 to 0.26.0 (#672) * build(deps): bump golang.org/x/oauth2 from 0.25.0 to 0.26.0 Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.25.0 to 0.26.0. - [Commits](golang/oauth2@v0.25.0...v0.26.0) --- updated-dependencies: - dependency-name: golang.org/x/oauth2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * make tidy --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Lena Garber <lgarber@akamai.com> Co-authored-by: Zhiwei Liang <121905282+zliang-akamai@users.noreply.github.com> * remove deprecated Cluster variable in tests (#666) * Allow to enable LKE APL (#665) * apl enable * lint * nit * Ran make tidy --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Ye Chen <127243817+yec-akamai@users.noreply.github.com> Co-authored-by: Youjung Kim <126618609+ykim-akamai@users.noreply.github.com> Co-authored-by: AniJ98 <ajagadis@akamai.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ye Chen <yechen@akamai.com> Co-authored-by: Lena Garber <114949949+lgarber-akamai@users.noreply.github.com> Co-authored-by: ykim-1 <ykim@akamai.com> Co-authored-by: Zhiwei Liang <121905282+zliang-akamai@users.noreply.github.com> Co-authored-by: Zhiwei Liang <zliang@akamai.com> Co-authored-by: Jacob Riddle <87780794+jriddle-linode@users.noreply.github.com> Co-authored-by: Guilhem Lettron <guilhem@barpilot.io> Co-authored-by: Ondrej Kokes <ondrej.kokes@gmail.com> Co-authored-by: Lena Garber <lgarber@akamai.com> Co-authored-by: Vinay <143587840+vshanthe@users.noreply.github.com>
1 parent b4016dd commit 8694525

File tree

284 files changed

+24786
-57015
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

284 files changed

+24786
-57015
lines changed

.github/workflows/ci.yml

Lines changed: 30 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
python-version: '3.x'
5151

5252
- name: Install Python deps
53-
run: pip3 install requests wheel boto3
53+
run: pip3 install requests wheel boto3==1.35.99
5454

5555
- name: Install go-junit-report
5656
run: go install github.com/jstemmer/go-junit-report/v2@latest
@@ -80,66 +80,37 @@ jobs:
8080

8181
notify-slack:
8282
runs-on: ubuntu-latest
83-
needs: [test]
84-
if: ${{ (success() || failure()) && github.ref == 'refs/heads/main' && github.event_name == 'push' && github.repository == 'linode/linodego' }} # Run even if integration tests fail and only on main repository
83+
needs: [ test ]
84+
if: ${{ (success() || failure()) && github.ref == 'refs/heads/main' && github.event_name == 'push' && github.repository == 'linode/linodego' }}
8585

8686
steps:
8787
- name: Notify Slack
88-
uses: slackapi/slack-github-action@v1.27.0
88+
uses: slackapi/slack-github-action@v2.0.0
8989
with:
90-
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
90+
method: chat.postMessage
91+
token: ${{ secrets.SLACK_BOT_TOKEN }}
9192
payload: |
92-
{
93-
"blocks": [
94-
{
95-
"type": "section",
96-
"text": {
97-
"type": "mrkdwn",
98-
"text": ":rocket: *${{ github.workflow }} Completed in: ${{ github.repository }}* :white_check_mark:"
99-
}
100-
},
101-
{
102-
"type": "divider"
103-
},
104-
{
105-
"type": "section",
106-
"fields": [
107-
{
108-
"type": "mrkdwn",
109-
"text": "*Build Result:*\n${{ needs.test.result == 'success' && ':large_green_circle: Build Passed' || ':red_circle: Build Failed' }}"
110-
},
111-
{
112-
"type": "mrkdwn",
113-
"text": "*Branch:*\n`${{ github.ref_name }}`"
114-
}
115-
]
116-
},
117-
{
118-
"type": "section",
119-
"fields": [
120-
{
121-
"type": "mrkdwn",
122-
"text": "*Commit Hash:*\n<${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}>"
123-
},
124-
{
125-
"type": "mrkdwn",
126-
"text": "*Run URL:*\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Run Details>"
127-
}
128-
]
129-
},
130-
{
131-
"type": "divider"
132-
},
133-
{
134-
"type": "context",
135-
"elements": [
136-
{
137-
"type": "mrkdwn",
138-
"text": "Triggered by: :bust_in_silhouette: `${{ github.actor }}`"
139-
}
140-
]
141-
}
142-
]
143-
}
144-
env:
145-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
93+
channel: ${{ secrets.SLACK_CHANNEL_ID }}
94+
blocks:
95+
- type: section
96+
text:
97+
type: mrkdwn
98+
text: ":rocket: *${{ github.workflow }} Completed in: ${{ github.repository }}* :white_check_mark:"
99+
- type: divider
100+
- type: section
101+
fields:
102+
- type: mrkdwn
103+
text: "*Build Result:*\n${{ needs.test.result == 'success' && ':large_green_circle: Build Passed' || ':red_circle: Build Failed' }}"
104+
- type: mrkdwn
105+
text: "*Branch:*\n`${{ github.ref_name }}`"
106+
- type: section
107+
fields:
108+
- type: mrkdwn
109+
text: "*Commit Hash:*\n<${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}>"
110+
- type: mrkdwn
111+
text: "*Run URL:*\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Run Details>"
112+
- type: divider
113+
- type: context
114+
elements:
115+
- type: mrkdwn
116+
text: "Triggered by: :bust_in_silhouette: `${{ github.actor }}`"

.github/workflows/codeql.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: "CodeQL Advanced"
2+
3+
on:
4+
push:
5+
branches: [ "dev", "main", "proj/*" ]
6+
pull_request:
7+
branches: [ "dev", "main", "proj/*" ]
8+
schedule:
9+
- cron: '39 0 * * 6'
10+
11+
jobs:
12+
analyze:
13+
name: Analyze (${{ matrix.language }})
14+
runs-on: ubuntu-latest
15+
permissions:
16+
security-events: write
17+
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
include:
22+
- language: go
23+
build-mode: autobuild
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@v4
27+
28+
- name: Initialize CodeQL
29+
uses: github/codeql-action/init@v3
30+
with:
31+
languages: ${{ matrix.language }}
32+
build-mode: ${{ matrix.build-mode }}
33+
queries: security-and-quality
34+
35+
- name: Perform CodeQL Analysis
36+
uses: github/codeql-action/analyze@v3
37+
with:
38+
category: "/language:${{matrix.language}}"

.github/workflows/labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
uses: actions/checkout@v4
2222
-
2323
name: Run Labeler
24-
uses: crazy-max/ghaction-github-labeler@b54af0c25861143e7c8813d7cbbf46d2c341680c
24+
uses: crazy-max/ghaction-github-labeler@31674a3852a9074f2086abcf1c53839d466a47e7
2525
with:
2626
github-token: ${{ secrets.GITHUB_TOKEN }}
2727
yaml-file: .github/labels.yml

.github/workflows/nightly_smoke_tests.yml

Lines changed: 28 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -32,67 +32,38 @@ jobs:
3232
- name: Run smoke tests
3333
id: smoke_tests
3434
run: |
35-
make smoketest
35+
make test-smoke
3636
env:
3737
LINODE_TOKEN: ${{ secrets.DX_LINODE_TOKEN }}
3838

3939
- name: Notify Slack
4040
if: (success() || failure()) && github.repository == 'linode/linodego'
41-
uses: slackapi/slack-github-action@v1.27.0
41+
uses: slackapi/slack-github-action@v2.0.0
4242
with:
43-
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
43+
method: chat.postMessage
44+
token: ${{ secrets.SLACK_BOT_TOKEN }}
4445
payload: |
45-
{
46-
"blocks": [
47-
{
48-
"type": "section",
49-
"text": {
50-
"type": "mrkdwn",
51-
"text": ":rocket: *${{ github.workflow }} Completed in: ${{ github.repository }}* :white_check_mark:"
52-
}
53-
},
54-
{
55-
"type": "divider"
56-
},
57-
{
58-
"type": "section",
59-
"fields": [
60-
{
61-
"type": "mrkdwn",
62-
"text": "*Build Result:*\n${{ steps.smoke_tests.outcome == 'success' && ':large_green_circle: Build Passed' || ':red_circle: Build Failed' }}"
63-
},
64-
{
65-
"type": "mrkdwn",
66-
"text": "*Branch:*\n`${{ github.ref_name }}`"
67-
}
68-
]
69-
},
70-
{
71-
"type": "section",
72-
"fields": [
73-
{
74-
"type": "mrkdwn",
75-
"text": "*Commit Hash:*\n<${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}>"
76-
},
77-
{
78-
"type": "mrkdwn",
79-
"text": "*Run URL:*\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Run Details>"
80-
}
81-
]
82-
},
83-
{
84-
"type": "divider"
85-
},
86-
{
87-
"type": "context",
88-
"elements": [
89-
{
90-
"type": "mrkdwn",
91-
"text": "Triggered by: :bust_in_silhouette: `${{ github.actor }}`"
92-
}
93-
]
94-
}
95-
]
96-
}
97-
env:
98-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
46+
channel: ${{ secrets.SLACK_CHANNEL_ID }}
47+
blocks:
48+
- type: section
49+
text:
50+
type: mrkdwn
51+
text: ":rocket: *${{ github.workflow }} Completed in: ${{ github.repository }}* :white_check_mark:"
52+
- type: divider
53+
- type: section
54+
fields:
55+
- type: mrkdwn
56+
text: "*Build Result:*\n${{ steps.smoke_tests.outcome == 'success' && ':large_green_circle: Build Passed' || ':red_circle: Build Failed' }}"
57+
- type: mrkdwn
58+
text: "*Branch:*\n`${{ github.ref_name }}`"
59+
- type: section
60+
fields:
61+
- type: mrkdwn
62+
text: "*Commit Hash:*\n<${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}>"
63+
- type: mrkdwn
64+
text: "*Run URL:*\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Run Details>"
65+
- type: divider
66+
- type: context
67+
elements:
68+
- type: mrkdwn
69+
text: "Triggered by: :bust_in_silhouette: `${{ github.actor }}`"

.github/workflows/release-cross-repo-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ jobs:
3636
3737
- name: run tests
3838
run: |
39-
make int-test
39+
make test-int
4040
env:
4141
LINODE_TOKEN: ${{ secrets.DX_LINODE_TOKEN }}

.github/workflows/release-notify-slack.yml

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,14 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Notify Slack - Main Message
13-
id: main_message
14-
uses: slackapi/slack-github-action@v1.27.0
13+
uses: slackapi/slack-github-action@v2.0.0
1514
with:
16-
channel-id: ${{ secrets.DEV_DX_SLACK_CHANNEL_ID }}
15+
method: chat.postMessage
16+
token: ${{ secrets.SLACK_BOT_TOKEN }}
1717
payload: |
18-
{
19-
"blocks": [
20-
{
21-
"type": "section",
22-
"text": {
23-
"type": "mrkdwn",
24-
"text": "*New Release Published: _linodego_ <${{ github.event.release.html_url }}|${{ github.event.release.tag_name }}> is now live!* :tada:"
25-
}
26-
}
27-
]
28-
}
29-
env:
30-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
18+
channel: ${{ secrets.DEV_DX_SLACK_CHANNEL_ID }}
19+
blocks:
20+
- type: section
21+
text:
22+
type: mrkdwn
23+
text: "*New Release Published: _linodego_ <${{ github.event.release.html_url }}|${{ github.event.release.tag_name }}> is now live!* :tada:"
Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,21 @@
1-
name: Gosec Scan
1+
name: Security Checks for Pull Requests
22
on:
33
pull_request: null
44

55
jobs:
6+
dependency-review:
7+
permissions:
8+
contents: read
9+
pull-requests: write
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: 'Checkout repository'
13+
uses: actions/checkout@v4
14+
- name: 'Dependency Review'
15+
uses: actions/dependency-review-action@v4
16+
with:
17+
comment-summary-in-pr: on-failure
18+
619
gosec_scan:
720
runs-on: ubuntu-latest
821
env:

Makefile

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ PACKAGES := $(shell go list ./... | grep -v integration)
1717

1818
SKIP_LINT ?= 0
1919

20-
.PHONY: build vet test refresh-fixtures clean clean-cov clean-fixtures lint run_fixtures sanitize fixtures godoc testint testunit testcov tidy
20+
.PHONY: build vet test refresh-fixtures clean clean-cov clean-fixtures lint run_fixtures sanitize fixtures godoc test-int test-unit test-smoke testcov tidy
2121

22-
test: build lint testunit testint
22+
test: build lint test-unit test-int
2323

2424
citest: lint test
2525

26-
testunit:
27-
go test -v $(PACKAGES) $(ARGS)
28-
cd test && make testunit
26+
test-unit:
27+
go test -v $(PACKAGES) $(TEST_ARGS)
28+
cd test && make test-unit
2929

30-
testint:
31-
cd test && make testint
30+
test-int:
31+
cd test && make test-int
3232

3333
testcov-func:
3434
@go test -v -coverprofile="coverage.txt" . > /dev/null 2>&1
@@ -39,8 +39,8 @@ testcov-html:
3939
@go test -v -coverprofile="coverage.txt" . > /dev/null 2>&1
4040
@go tool cover -html coverage.txt
4141

42-
smoketest:
43-
cd test && make smoketest
42+
test-smoke:
43+
cd test && make test-smoke
4444

4545
build: vet lint
4646
go build ./...
@@ -77,7 +77,7 @@ run_fixtures:
7777
LINODE_API_VERSION="v4beta" \
7878
LINODE_URL="$(LINODE_URL)" \
7979
GO111MODULE="on" \
80-
go test --tags $(TEST_TAGS) -timeout=$(TEST_TIMEOUT) -v $(ARGS)
80+
go test --tags $(TEST_TAGS) -timeout=$(TEST_TIMEOUT) -v $(TEST_ARGS)
8181

8282
sanitize:
8383
@echo "* Sanitizing fixtures"

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,15 +168,15 @@ When performing a `POST` or `PUT` request, multiple field related errors will be
168168

169169
## Tests
170170

171-
Run `make testunit` to run the unit tests.
171+
Run `make test-unit` to run the unit tests.
172172

173-
Run `make testint` to run the integration tests. The integration tests use fixtures.
173+
Run `make test-int` to run the integration tests. The integration tests use fixtures.
174174

175175
To update the test fixtures, run `make fixtures`. This will record the API responses into the `fixtures/` directory.
176176
Be careful about committing any sensitive account details. An attempt has been made to sanitize IP addresses and
177177
dates, but no automated sanitization will be performed against `fixtures/*Account*.yaml`, for example.
178178

179-
To prevent disrupting unaffected fixtures, target fixture generation like so: `make ARGS="-run TestListVolumes" fixtures`.
179+
To prevent disrupting unaffected fixtures, target fixture generation like so: `make TEST_ARGS="-run TestListVolumes" fixtures`.
180180

181181
## Discussion / Help
182182

account_agreements.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,5 @@ func (c *Client) GetAccountAgreements(ctx context.Context) (*AccountAgreements,
3232

3333
// AcknowledgeAccountAgreements acknowledges account agreements for the Account
3434
func (c *Client) AcknowledgeAccountAgreements(ctx context.Context, opts AccountAgreementsUpdateOptions) error {
35-
_, err := doPOSTRequest[AccountAgreements](ctx, c, "account/agreements", opts)
36-
return err
35+
return doPOSTRequestNoResponseBody(ctx, c, "account/agreements", opts)
3736
}

0 commit comments

Comments
 (0)