Skip to content

Default adaptor version#3069

Merged
stuartc merged 3 commits intomainfrom
default-adaptor-version
Mar 27, 2025
Merged

Default adaptor version#3069
stuartc merged 3 commits intomainfrom
default-adaptor-version

Conversation

@stuartc
Copy link
Copy Markdown
Member

@stuartc stuartc commented Mar 27, 2025

Description

When selecting a new adaptor, default to using the latest specific version number
instead of @latest. The @latest option remains available but requires explicit
opt-in and displays a warning pill about potential breaking changes.

Closes #2843

Screenshot 2025-03-27 at 10 26 56

Additional notes for the reviewer

This does not change the default adaptor version when creating a new job or workflow, that is controlled by the workflow store/front end right now - so is arguably out of scope for now.

However as mentioned above, when changing the adaptor itself in the form; the latest version is selected (but not @latest).

This supercedes #3042.

AI Usage

Please disclose how you've used AI in this work (it's cool, we just want to know!):

  • Code generation (copilot but not intellisense)
  • Learning or fact checking
  • Strategy / design
  • Optimisation / refactoring
  • Translation / spellchecking / doc gen
  • Other
  • I have not used AI

You can read more details in our Responsible AI Policy

Pre-submission checklist

  • I have performed a self-review of my code.
  • I have implemented and tested all related authorization policies. (e.g., :owner, :admin, :editor, :viewer)
  • I have updated the changelog.
  • I have ticked a box in "AI usage" in this PR

stuartc added 2 commits March 27, 2025 10:45
When selecting a new adaptor, default to using the latest specific version number
instead of @latest. The @latest option remains available but requires explicit
opt-in and displays a warning pill about potential breaking changes.

Closes #2843

- Removed unused import of PetalComponents.Badge in lightning_web.ex.
- Changed attr type from :string to :any for class in icons.ex.
- Added color attr to pill component with color attribute.
- Adjusted form component styles for better responsiveness in form.ex.
- Improved layout and tooltip handling in adaptor_picker.ex, including version selection logic and UI updates.
- Introduced unit tests for the `get_adaptor_version_options/1` function in the AdaptorPicker module.
- Verified that the function returns sorted version options and handles specific versions correctly.
- Ensured proper formatting and ordering of version outputs.

This addition enhances test coverage for adaptor selection functionality.
@github-project-automation github-project-automation bot moved this to New Issues in Core Mar 27, 2025
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2025

Codecov Report

Attention: Patch coverage is 54.16667% with 11 lines in your changes missing coverage. Please review.

Project coverage is 91.19%. Comparing base (3e7ed60) to head (987e894).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
lib/lightning_web/components/pills.ex 41.66% 7 Missing ⚠️
lib/lightning_web/live/job_live/adaptor_picker.ex 66.66% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3069      +/-   ##
==========================================
- Coverage   91.22%   91.19%   -0.03%     
==========================================
  Files         356      356              
  Lines       13119    13135      +16     
==========================================
+ Hits        11968    11979      +11     
- Misses       1151     1156       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@stuartc stuartc requested a review from taylordowns2000 March 27, 2025 09:39
Copy link
Copy Markdown
Member

@taylordowns2000 taylordowns2000 left a comment

Choose a reason for hiding this comment

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

it's gorgeous. thank you. huge improvement.

@stuartc stuartc marked this pull request as ready for review March 27, 2025 12:36
@stuartc stuartc merged commit d563157 into main Mar 27, 2025
6 of 8 checks passed
@stuartc stuartc deleted the default-adaptor-version branch March 27, 2025 12:36
@github-project-automation github-project-automation bot moved this from New Issues to Done in Core Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Lock adaptor versions by default

2 participants