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

🚸Unique error for kernel mismatch when applying a template #276

Merged
merged 33 commits into from
Oct 5, 2023
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
a8dd15f
Uninstall charset_normalizer
ayushuk Mar 2, 2023
b08bb8d
Merge pull request #274 from purduesigbots/bugfix/fix-ci-macos-univer…
ayushuk Mar 3, 2023
d872334
Added KernelMismatchException to catch when no templates are found due
ceaglebu Mar 6, 2023
19294d5
Sucessfully builds project, have not tested adding incompatible template
ceaglebu Mar 6, 2023
f4121da
Moved error handling to resolve_templates. Still needs testing with t…
ceaglebu Mar 6, 2023
4718079
Optimization changes
ceaglebu Mar 7, 2023
b35ac2b
removed unnecessary exception
ceaglebu Mar 7, 2023
8301c66
Update template_resolution.py
ceaglebu Mar 7, 2023
b9988bf
Removed need for filtering twice
ceaglebu Mar 10, 2023
8cee778
Merge branch 'feature/kernel-mismatch-error' of https://github.com/pu…
ceaglebu Mar 10, 2023
ff943bc
Removed unnecessary files
ceaglebu Mar 10, 2023
9090e51
removed unnecessary files
ceaglebu Mar 10, 2023
fc85aff
asdf
ceaglebu Mar 10, 2023
cb6df57
Update main.yml
kunwarsahni01 Apr 18, 2023
af295a1
Try new version of python
kunwarsahni01 Apr 18, 2023
d4abb64
Maybe this will work?
kunwarsahni01 Apr 18, 2023
d9bbf39
We try again
kunwarsahni01 Apr 18, 2023
60bb6a4
Make the uninstall work
kunwarsahni01 Apr 18, 2023
d05d2e8
Work
kunwarsahni01 Apr 18, 2023
fb7e006
Update version numbers
ayushuk May 15, 2023
98230de
Merge pull request #284 from purduesigbots/release/3.4.3
ayushuk May 19, 2023
8d95649
Workflow Debugging
kunwarsahni01 Jun 24, 2023
611abf6
git update-index --refresh
kunwarsahni01 Jun 24, 2023
a29cca8
try debug step
kunwarsahni01 Jun 24, 2023
12779cb
Try another
kunwarsahni01 Jun 24, 2023
27d56c3
idk
kunwarsahni01 Jun 24, 2023
e75f0bd
more debug
kunwarsahni01 Jun 24, 2023
304da04
no periods
kunwarsahni01 Jun 24, 2023
3264b3f
Try a clean
kunwarsahni01 Jun 24, 2023
565eee1
comment out version.py as a temp fix
noam987 Jun 27, 2023
42f8354
Merge branch 'master' into feature/kernel-mismatch-error
ayushuk Oct 5, 2023
74b20a2
Merge branch 'develop' into feature/kernel-mismatch-error
ayushuk Oct 5, 2023
cc8d2ef
Fix develop merge
ayushuk Oct 5, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions pros/conductor/conductor.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,14 @@ def resolve_templates(self, identifier: Union[str, BaseTemplate], allow_online:
query = identifier
if allow_offline:
if self.is_beta:
offline_results = filter(lambda t: t.satisfies(query, kernel_version=kernel_version), self.beta_local_templates)
offline_results = list(filter(lambda t: t.satisfies(query, kernel_version=kernel_version), self.beta_local_templates))
else:
offline_results = filter(lambda t: t.satisfies(query, kernel_version=kernel_version), self.local_templates)
offline_results = list(filter(lambda t: t.satisfies(query, kernel_version=kernel_version), self.local_templates))

if len(offline_results) == 0 and kernel_version and list(filter(lambda t: t.satisfies(query, kernel_version=None), self.local_templates)):
raise dont_send(
InvalidTemplateException(f'{identifier.name} does not support kernel version {kernel_version}'))

if unique:
results.update(offline_results)
else:
Expand All @@ -157,8 +162,15 @@ def resolve_templates(self, identifier: Union[str, BaseTemplate], allow_online:
for depot in self.depots.values():
# beta depot will only be accessed when the --beta flag is true
if depot.name != BETA_NAME or (depot.name == BETA_NAME and self.is_beta):
online_results = filter(lambda t: t.satisfies(query, kernel_version=kernel_version),
depot.get_remote_templates(force_check=force_refresh, **kwargs))
remote_templates = depot.get_remote_templates(force_check=force_refresh, **kwargs)
online_results = list(filter(lambda t: t.satisfies(query, kernel_version=kernel_version),
remote_templates))

if len(online_results) == 0 and kernel_version and list(filter(lambda t: t.satisfies(query, kernel_version=None),
remote_templates)):
raise dont_send(
InvalidTemplateException(f'{identifier.name} does not support kernel version {kernel_version}'))

if unique:
results.update(online_results)
else:
Expand Down
Loading