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

Add validation logic for references to outputs from prior modules #840

Merged
merged 4 commits into from
Jan 20, 2023

Conversation

tpdownes
Copy link
Member

@tpdownes tpdownes commented Jan 18, 2023

This PR adds the validation logic for references to outputs from modules in earlier deployment groups. It does not yet add full support for these references; this will require further PRs to implement. However, it puts into place the validation logic such that these "intergroup references" are rejected for cases we never intend to support. For example, intergroup references are rejected when:

  • the reference does not include an explicit group ID
  • they refer to a later group

There is an implicit change here that allows the user to use references with explicit groups even in the "intragroup reference" case. The behavior of these references is identical to the status quo (module_id.output_name). I believe it would be more complicated to enforce and communicate "implicitness" requirements for intragroup references, so it is better to allow them.

With this PR, unit test coverage for the package improves from 84.9% to 85.3%.

Submission Checklist

  • Have you installed and run this change against pre-commit? (pre-commit install)
  • Are all tests passing? (make tests)
  • Have you written unit tests to cover this change?
  • Is unit test coverage still above 80%?
  • Have you updated all applicable documentation?
  • Have you followed the guidelines in our Contributing document?

@tpdownes tpdownes marked this pull request as ready for review January 18, 2023 15:09
pkg/config/expand.go Outdated Show resolved Hide resolved
pkg/config/expand.go Outdated Show resolved Hide resolved
pkg/config/expand.go Outdated Show resolved Hide resolved
pkg/config/expand.go Outdated Show resolved Hide resolved
pkg/config/expand_test.go Outdated Show resolved Hide resolved
@heyealex heyealex assigned tpdownes and unassigned heyealex Jan 18, 2023
tpdownes added a commit to tpdownes/hpc-toolkit that referenced this pull request Jan 20, 2023
Copy link
Contributor

@heyealex heyealex left a comment

Choose a reason for hiding this comment

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

Thanks for the updates! LGTM

@heyealex heyealex assigned tpdownes and unassigned heyealex Jan 20, 2023
@tpdownes tpdownes merged commit 932f262 into GoogleCloudPlatform:develop Jan 20, 2023
@tpdownes tpdownes deleted the feat_igc_refs branch January 20, 2023 21:54
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