GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add warning and update PR checks for Swift on Linux by angelapwen · Pull Request #2399 · github/codeql-action

Conversation

@angelapwen

@angelapwen angelapwen commented Jul 31, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

We are deprecating Swift support on Linux for code scanning (changenote in #2403).

This PR logs a warning for users in the init Action if it's determined that Swift on Linux is being run.

This change also updates the manual build script build.sh which we also use in internal repositories for testing: the swift command will only be run on MacOS rather than on both MacOS and Linux.

As a result, we can also update our PR checks that only test on Linux, to remove the setup-swift Action step as it is no longer needed; and other checks that look for the existence of Swift databases on Linux.

I've removed Swift analysis using a custom build command check on Linux images from required checks for main, releases/v3, and releases/v2 already as well.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm the readme has been updated if necessary.
  • Confirm the changelog has been updated if necessary.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@angelapwen
angelapwen force-pushed the angelapwen/stop-testing-swift-linux branch 3 times, most recently from 7bac0e4 to c470a9e Compare July 31, 2024 13:48
angelapwen added 2 commits July 31, 2024 15:53
@angelapwen
PR checks: Only run Swift build command on MacOS
8d601c3
@angelapwen
PR checks: update to only test Swift on MacOS
9fbd0b9
@angelapwen
angelapwen force-pushed the angelapwen/stop-testing-swift-linux branch 3 times, most recently from cb826c1 to d0fa9dd Compare July 31, 2024 14:00
@angelapwen
PR checks: Manually exclude Swift from init languages on Linux
ea4581b
@angelapwen
angelapwen force-pushed the angelapwen/stop-testing-swift-linux branch from d0fa9dd to ea4581b Compare July 31, 2024 14:20
@angelapwen
angelapwen marked this pull request as ready for review July 31, 2024 14:47
@angelapwen
angelapwen requested a review from a team as a code owner July 31, 2024 14:47
henrymercer
henrymercer previously approved these changes Jul 31, 2024
View reviewed changes

@henrymercer henrymercer left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Looks good, a couple of suggestions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pr-checks/checks/multi-language-autodetect.yml
@@ -1,28 +1,30 @@
name: "Multi-language repository"
description: "An end-to-end integration test of a multi-language repository using automatic language detection"
description: "An end-to-end integration test of a multi-language repository using automatic language detection for MacOS"

@henrymercer henrymercer Jul 31, 2024

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Suggested change
description: "An end-to-end integration test of a multi-language repository using automatic language detection for MacOS"
description: "An end-to-end integration test of a multi-language repository using automatic language detection"

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@angelapwen angelapwen Aug 2, 2024

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

🤔 I added the bit about MacOS because the test actually no longer tests autodetect for MacOS (since I had to manually exclude Swift from the languages input).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pr-checks/checks/multi-language-autodetect.yml Outdated
Comment on lines +10 to +19
if: runner.os == 'Linux'
with:
db-location: "${{ runner.temp }}/customDbLocation"
# We manually exclude Swift from the languages list here, as it is not supported on Ubuntu
languages: cpp,csharp,go,java,javascript,python,ruby
tools: ${{ steps.prepare-test.outputs.tools-url }}

- uses: ./../action/init
id: init-macos
if: runner.os == 'macOS'

@henrymercer henrymercer Jul 31, 2024

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Alternatively we could make the languages input conditional, e.g. something like languages: ${{ runner.os == 'Linus' && 'cpp,csharp,go,java,javascript,python,ruby' || '' }}

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@angelapwen angelapwen Aug 2, 2024

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Ah that's a good point! I had thought that an empty languages input might cause us to run with no languages but it looks like we guard against that and turn autodetect on:

codeql-action/src/config-utils.ts

Lines 384 to 392 in 5cdd182

let rawLanguages = (languagesInput || "")
.split(",")
.map((x) => x.trim().toLowerCase())
.filter((x) => x.length > 0);
let autodetected: boolean;
if (rawLanguages.length) {
autodetected = false;
} else {
autodetected = true;
🧠 I'll make the change 👍

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
angelapwen added 2 commits August 2, 2024 14:50
@angelapwen
Log warning if workflow is running Swift on Ubuntu
762301c
@angelapwen
Address PR review, clean up comments
1f0a037
@angelapwen
angelapwen dismissed henrymercer’s stale review via 1f0a037 August 2, 2024 12:51
@angelapwen angelapwen changed the title PR checks: stop testing Swift on Linux Add warning and update PR checks for Swift on Linux Aug 2, 2024
@angelapwen angelapwen mentioned this pull request Aug 2, 2024
Add swift+linux deprecation #2403
Merged
3 tasks done
@angelapwen
angelapwen requested a review from aeisenberg August 2, 2024 12:54
aeisenberg
aeisenberg previously approved these changes Aug 2, 2024
View reviewed changes

@aeisenberg aeisenberg left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks. Looks good after the typo is fixed.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/init-action.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@angelapwen @aeisenberg
Update src/init-action.ts
e05cdae
Co-authored-by: Andrew Eisenberg <[email protected]>
@angelapwen
angelapwen dismissed aeisenberg’s stale review via e05cdae August 2, 2024 13:54
@angelapwen angelapwen added the Rebuild Re-transpile JS & re-generate workflows label Aug 2, 2024
@github-actions github-actions Bot removed the Rebuild Re-transpile JS & re-generate workflows label Aug 2, 2024
@github-actions
Rebuild
64d954f
@github-actions

github-actions Bot commented Aug 2, 2024

Copy link
Copy Markdown
Contributor

Pushed a commit to rebuild the Action. Please mark the PR as ready for review to trigger PR checks.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions
github-actions Bot marked this pull request as draft August 2, 2024 13:56
@angelapwen
angelapwen marked this pull request as ready for review August 2, 2024 13:56
@angelapwen

angelapwen commented Aug 2, 2024

Copy link
Copy Markdown
Contributor Author

Huh.. not sure why the Unit Test workflow isn't being picked up. I'll push an empty commit to try to force it to run.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@angelapwen
Empty commit
b496819
aeisenberg
aeisenberg approved these changes Aug 2, 2024
View reviewed changes
@angelapwen
angelapwen merged commit 9c646c2 into main Aug 2, 2024
@angelapwen
angelapwen deleted the angelapwen/stop-testing-swift-linux branch August 2, 2024 14:27
@github-actions github-actions Bot mentioned this pull request Aug 6, 2024
Merge main into releases/v3 #2410
Merged
8 tasks
@henrymercer henrymercer mentioned this pull request Aug 6, 2024
Merge releases/v3 into releases/v2 #2413
Merged
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@aeisenberg aeisenberg aeisenberg approved these changes
@henrymercer henrymercer henrymercer left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@angelapwen @aeisenberg @henrymercer
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.