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

Ensure that PythonAutoContainerTask has a container_image attribute #2527

Merged
merged 16 commits into from
Jun 26, 2024

Conversation

pingsutw
Copy link
Member

@pingsutw pingsutw commented Jun 24, 2024

Tracking issue

Why are the changes needed?

Fix unit test. https://github.com/flyteorg/flytekit/actions/runs/9620004661/job/26621714719

What changes were proposed in this pull request?

Call super().__init__ after setting container_image because PythonAutoContainerTask
is added to the FlyteEntities in super().__init__. The translator will iterate over
FlyteEntities and call container_image. Therefore, we should ensure the container_image attribute is set
before appending the task to FlyteEntities.

for e in context_manager.FlyteEntities.entities:

How was this patch tested?

unit test

Setup process

Screenshots

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

NA

Docs link

NA

Signed-off-by: Kevin Su <pingsutw@apache.org>
Signed-off-by: Kevin Su <pingsutw@apache.org>
Signed-off-by: Kevin Su <pingsutw@apache.org>
Signed-off-by: Kevin Su <pingsutw@apache.org>
@pingsutw pingsutw changed the title test Ensure that PythonAutoContainerTask has a container_image attribute Jun 24, 2024
Signed-off-by: Kevin Su <pingsutw@apache.org>
Signed-off-by: Kevin Su <pingsutw@apache.org>
Signed-off-by: Kevin Su <pingsutw@apache.org>
Copy link

codecov bot commented Jun 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.57%. Comparing base (876877a) to head (a3bceed).
Report is 2 commits behind head on master.

Current head a3bceed differs from pull request most recent head 876afef

Please upload reports for the commit 876afef to get more accurate results.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #2527       +/-   ##
===========================================
+ Coverage   52.89%   78.57%   +25.68%     
===========================================
  Files         297      182      -115     
  Lines       23957    18567     -5390     
  Branches     3655     3655               
===========================================
+ Hits        12671    14589     +1918     
+ Misses      11178     3319     -7859     
- Partials      108      659      +551     

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

Signed-off-by: Kevin Su <pingsutw@apache.org>
Signed-off-by: Kevin Su <pingsutw@apache.org>
Signed-off-by: Kevin Su <pingsutw@apache.org>
Signed-off-by: Kevin Su <pingsutw@apache.org>
Signed-off-by: Kevin Su <pingsutw@apache.org>
Signed-off-by: Kevin Su <pingsutw@apache.org>
Signed-off-by: Kevin Su <pingsutw@apache.org>
Signed-off-by: Kevin Su <pingsutw@apache.org>
Signed-off-by: Kevin Su <pingsutw@apache.org>
Copy link
Collaborator

@eapolinario eapolinario left a comment

Choose a reason for hiding this comment

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

I agree in principle with this PR, but I'd like to understand a bit more how this started failing all of a sudden (esp. after #2485).

@@ -1,7 +1,7 @@
name: Monodocs Build

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

why are we removing this?

Copy link
Member Author

Choose a reason for hiding this comment

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

It allows the GA workflow to run against all pushed commits without being canceled when a new PR is merged

Copy link
Collaborator

Choose a reason for hiding this comment

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

Makes sense. We use this pattern in a bunch of our repos, can you also make sure these are changed?

flytekit/core/python_auto_container.py Show resolved Hide resolved
@pingsutw pingsutw merged commit 553ec20 into master Jun 26, 2024
44 of 46 checks passed
bgedik pushed a commit to bgedik/flytekit that referenced this pull request Jul 3, 2024
…lyteorg#2527)

Signed-off-by: Kevin Su <pingsutw@apache.org>
Signed-off-by: bugra.gedik <bugra.gedik@predera.ai>
fiedlerNr9 pushed a commit that referenced this pull request Jul 25, 2024
…2527)

Signed-off-by: Kevin Su <pingsutw@apache.org>
Signed-off-by: Jan Fiedler <jan@union.ai>
mao3267 pushed a commit to mao3267/flytekit that referenced this pull request Jul 29, 2024
…lyteorg#2527)

Signed-off-by: Kevin Su <pingsutw@apache.org>
Signed-off-by: mao3267 <chenvincent610@gmail.com>
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